Skip to content

chore: migrate run/idp-sql to sqlalchemy 2 #9121

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

Merged
merged 10 commits into from
Feb 28, 2023
Merged

chore: migrate run/idp-sql to sqlalchemy 2 #9121

merged 10 commits into from
Feb 28, 2023

Conversation

kweinmeister
Copy link
Contributor

@kweinmeister kweinmeister commented Feb 14, 2023

SQLAlchemy 2.x PR updates are blocked on the run/idp-sql sample that uses 1.x syntax.

The main changes were:

  1. Use sqlalchemy.text() to wrap SQL statements
  2. Use db.begin() rather than db.connect() to ensure commits were occurring as needed (2.x dropped auto-commit by default)

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: run Issues related to the Cloud Run API. labels Feb 14, 2023
@kweinmeister kweinmeister marked this pull request as ready for review February 27, 2023 02:15
@kweinmeister kweinmeister requested review from a team as code owners February 27, 2023 02:15
@kweinmeister kweinmeister added the snippet-bot:force-run Force snippet-bot runs its logic label Feb 27, 2023
@snippet-bot snippet-bot bot removed the snippet-bot:force-run Force snippet-bot runs its logic label Feb 27, 2023
@leahecole
Copy link
Collaborator

style lgtm, arbitrarily assigning @averikitsch for second review or re-triage to other teammate

@averikitsch averikitsch merged commit f4cd664 into main Feb 28, 2023
@averikitsch averikitsch deleted the idp-sql-update branch February 28, 2023 17:55
telpirion pushed a commit that referenced this pull request Mar 13, 2023
* chore: migrate run/idp-sql to sqlalchemy 2

* linting

* temp remove cleanup for debugging

* switch to db.begin() for commits

* remove cleanup for debugging

* fix index parameters

* add back cleanup

---------

Co-authored-by: Averi Kitsch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: run Issues related to the Cloud Run API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants