-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Install the right DB version when updating the DB contents #1426
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
davidgamez
merged 17 commits into
main
from
260-migrate-database-update-github-action-to-a-gcp-function
Oct 31, 2025
Merged
feat: Install the right DB version when updating the DB contents #1426
davidgamez
merged 17 commits into
main
from
260-migrate-database-update-github-action-to-a-gcp-function
Oct 31, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
davidgamez
reviewed
Oct 31, 2025
davidgamez
approved these changes
Oct 31, 2025
Member
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.
Great work on fixing this! 🥇
5 tasks
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: This PR was reverted in #1431 and a new PR was merged to replace it: #1436
Modified the DB update github actions to query the currently installed DB version and use this version for the update.
This was considered simpler that creating a GCP function.
Closes #260
AI summary
This pull request introduces significant improvements to the database update workflows for all environments (dev, QA, prod) by making the process more flexible, safer, and better aligned with the deployed API version. The main enhancements include support for dry runs, the ability to select between deploying the latest or currently deployed API version, and the introduction of a new composite GitHub Action to automatically resolve the deployed API commit and version. These changes help ensure that database schema and content updates are consistent with the actual API deployment, and provide safer manual and automated update options.
Key changes:
1. Workflow flexibility and safety improvements
DRY_RUNandINSTALL_LATESTinputs to all update workflows (db-update.yml,db-update-dev.yml,db-update-qa.yml,db-update-prod.yml), allowing users to skip actual updates or choose which API version to install. [1] [2] [3] [4]DRY_RUNflag, conditionally skipping schema/content updates and secret updates when enabled. [1] [2] [3] [4]2. API version resolution and alignment
.github/actions/resolve-api-meta/action.yml) that queries the API metadata endpoint to resolve the currently deployed API commit SHA and version using a refresh token.resolve-api-metajob todb-update.ymlthat runs before schema/content updates, ensuring that the correct code version (commit SHA ormain) is checked out for database updates, depending on theINSTALL_LATESTflag.3. Improved job dependencies and code checkout
main) for code checkout, ensuring that database updates are always performed against the correct API version. [1] [2]4. General workflow enhancements
These changes collectively make the database update process more robust, transparent, and aligned with the actual API deployment lifecycle.
Testing tips
Testing was done using the DRY_RUN option for dev, QA and prod. Using the INSTALL_LATEST option I could verify both using main or the currently installed version.
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything