Skip to content
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

feat: automate pg_upgrade testing #695

Merged
merged 16 commits into from
Jun 18, 2024
Merged

Conversation

pcnc
Copy link
Member

@pcnc pcnc commented Jul 11, 2023

  • Removes the DRY_RUN flag and introduces an IS_CI flag
  • Runs the pg_upgrade dry-run command (--check) before every upgrade, should make it easier to spot if any prerequisites are are failing, before the migration actually starts
  • Splits the pg_upgrade script publishing workflow in separate staging/prod deploy jobs to make testing easier, less error prone
    • can be deployed from any branch to staging via workflow dispatch

To FLUP:

  • tests targeting encrypted columns
  • tests targeting problematic extensions (ltree, others)

@pcnc pcnc requested a review from a team as a code owner July 11, 2023 10:20
@pcnc pcnc changed the title feat: automatize pg_upgrade testing feat: automate pg_upgrade testing Jul 11, 2023
@notion-workspace
Copy link

@pcnc pcnc force-pushed the pcnc/auto-pg_upgrade-testing branch from e8ffe54 to 36cdfb8 Compare July 11, 2023 11:33
Copy link
Contributor

@darora darora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed this earlier - gave it a quick skim and looks great. Any changes needed to bring it up to speed?

@supabase/postgres any concerns with this change?

@olirice
Copy link
Contributor

olirice commented Nov 2, 2023

lgtm, @soedirgo could you give this a once over?

@soedirgo
Copy link
Member

soedirgo commented Nov 3, 2023

Looks great! 👍I guess we don't need to include Testinfra tests since this should only affect PG stuff?

@steve-chavez
Copy link
Member

Is it possible to run these tests locally?

@pcnc
Copy link
Member Author

pcnc commented Nov 3, 2023

Sorry I missed this earlier - gave it a quick skim and looks great. Any changes needed to bring it up to speed?

@supabase/postgres any concerns with this change?

Need to follow up on this and merge the more recent upgrade script changes into it.
Also want to add tests around encrypted columns (since those are more critical), some extensions such as ltree now that it is possibly problematic, and have pick it up the last ~5 PG releases to cover, besides the configured baseline

@steve-chavez running debug.sh would run this locally, but it requires the scripts and binaries stored in the dev account. I’ll add some docs around this and ping the team in Slack to confirm that everybody can run it

@pcnc
Copy link
Member Author

pcnc commented Nov 3, 2023

Looks great! 👍I guess we don't need to include Testinfra tests since this should only affect PG stuff?

Yep! This would run as a parallel check to those, so no dependency between the two workflows

@pcnc pcnc requested review from darora and a team June 11, 2024 16:34
@pcnc
Copy link
Member Author

pcnc commented Jun 12, 2024

Will merge after tomorrow's (Jun 13th) prod deploy, to have more ample time for testing the pg_upgrade scripts

@pcnc pcnc merged commit 1dc6753 into develop Jun 18, 2024
11 checks passed
@pcnc pcnc deleted the pcnc/auto-pg_upgrade-testing branch June 18, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants