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

SIMSBIOHUB-449: Upgrade to Postgres 17 #1428

Merged
merged 19 commits into from
Jan 15, 2025
Merged

SIMSBIOHUB-449: Upgrade to Postgres 17 #1428

merged 19 commits into from
Jan 15, 2025

Conversation

NickPhura
Copy link
Collaborator

@NickPhura NickPhura commented Nov 14, 2024

Links to Jira Tickets

https://apps.nrs.gov.bc.ca/int/jira/browse/SIMSBIOHUB-449

Description of Changes

Upgrade local and remote Postgres versions from 12.5 to 17.

  • Update database build/deployment yaml files
  • Update local dockerfiles/compose
  • Wrap most (but not all) instances of system_user in double quotes (as it is a reserved word and using it unwrapped will fail in the database.
    • Ex:
      const sqlStatement = SQL`
        Select * from "system_user";
      `;
      
  • Do not seem to have to wrap system_user when it is used in a knex query builder.

Cleanup

  • Delete deprecated postgres 12 custom image folder

Testing Notes

Database builds/deploys as usual.
API works as usual.

Note:

  • New env-var that is required 'PG_DATA'
  • Existing env-var that is now required: 'POSTGRES_VERSION'

Migration Plan

I've included all of the steps in a comment in the Jira ticket.

The main thing to be aware of is that this PR disables the dev/test/prod database knex migration step, so that I can run it manually one time during this version upgrade (we can re-enable it afterwards).

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.08%. Comparing base (4e00fba) to head (cfa5176).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1428   +/-   ##
=======================================
  Coverage   46.08%   46.08%           
=======================================
  Files         910      910           
  Lines       23752    23752           
  Branches     3500     3500           
=======================================
  Hits        10947    10947           
  Misses      12189    12189           
  Partials      616      616           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@NickPhura NickPhura force-pushed the SIMSBIOHUB-449-test branch 2 times, most recently from 18c823f to 890817a Compare November 15, 2024 19:16
- Wrap most instances of "system_user" in double quotes, as it is not a reserved word in postgres.
- Add migration to drop biohub_dapi_v1 schema
- Disable static deploy db setup step
@NickPhura NickPhura changed the title SIMSBIOHUB-449: WIP SIMSBIOHUB-449: Upgrade to Postgres 17 Nov 15, 2024
@NickPhura NickPhura added the Ready For Review PR is ready for review label Nov 27, 2024
Copy link
Collaborator

@MacQSL MacQSL left a comment

Choose a reason for hiding this comment

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

🕷️

@NickPhura NickPhura merged commit 6ae74e0 into dev Jan 15, 2025
23 of 24 checks passed
@NickPhura NickPhura deleted the SIMSBIOHUB-449-test branch January 15, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants