-
Notifications
You must be signed in to change notification settings - Fork 846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade SQLAlchemy to 2.0.22 and Pandas to 1.5.3 #2572
Conversation
- Switch to SQLAlchemy ORM syntax for repo filtering - Will replace the large SQL string in repo_load_controller.py - Current implementation located in augur/api/view/utils.py - Add clearer error message when page number is incorrect on repo view - Upgrade SQLAlchemy to v2.0.17 - Required for new syntax that the old version does not support - Specifically `ilike` and `regexp_replace` Signed-off-by: Ulincsys <[email protected]>
Signed-off-by: Sean P. Goggins <[email protected]>
Signed-off-by: Sean P. Goggins <[email protected]>
Signed-off-by: Sean P. Goggins <[email protected]>
…v-dependcy-core-patch
…to use db.config.json
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
…cute() Signed-off-by: Isaac Milarsky <[email protected]>
… with connection object. This allows a commit to be implicit within the resulting context manager and emulates the functionality of the now removed autocommit Signed-off-by: Isaac Milarsky <[email protected]>
…nsert_data method. fix missing .begin() call in block to deal with return columns. fix dict conversion for list of rows in sqlalchemy 2.x in insert_data and contributor breadth worker Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
…nsactions Signed-off-by: Isaac Milarsky <[email protected]>
…x method sqlalchemy Signed-off-by: Isaac Milarsky <[email protected]>
…some reason Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Updating SQLAlchemy_upgrade branch from dev
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Sean P. Goggins <[email protected]>
Signed-off-by: Sean P. Goggins <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
cache_files_requested.append(request) | ||
return render_template('index.j2', body="loading", title="Loading", d=dest, query_key=query, api_url=getSetting('serving')) | ||
|
||
with DatabaseEngine() as engine: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to merge for testing, but before this makes it into main, we need to ensure that the repo load controller gets updated with the below syntax (or something similar). This is just here for testing, and is not intended to be final
Signed-off-by: Isaac Milarsky <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all the engine.connect()
should be using a context manager to ensure the connection is being disposed of. I also don't think we should be removing valid relationships from the orm as this removes functionality without any benefit that I can see
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
I made the suggested changes. I think the orm relationship thing should be resolved in a separate pr so I just reverted all of my changes to the orm relationships for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still a few context managers missing for the engine.connect()
. Also the process_ossf_dependency_metrics
needs to stay in the secondary collection
Signed-off-by: Isaac Milarsky <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Description
This PR fixes #2557 #2556
Signed commits