Skip to content

Conversation

@jkeifer
Copy link
Member

@jkeifer jkeifer commented Feb 5, 2025

  • Helper to apply migrations in a production setting
  • Helper to initialize a production database We have a test implementation of a db init tool. A general-purpose helper proved to be more complex than we could support for this particular round of work, so we just have the test tool as as template people can reference as needed.

@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 75.29412% with 42 lines in your changes missing coverage. Please review.

Project coverage is 92.92%. Comparing base (1e7bcb3) to head (6226a6d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dbami/helpers/apply_migrations.py 68.88% 28 Missing ⚠️
src/dbami/cli.py 75.86% 7 Missing ⚠️
src/dbami/db.py 84.00% 4 Missing ⚠️
src/dbami/helpers/helper.py 85.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   97.57%   92.92%   -4.66%     
==========================================
  Files           8       10       +2     
  Lines         661      820     +159     
==========================================
+ Hits          645      762     +117     
- Misses         16       58      +42     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@philvarner
Copy link

I haven't figured this out entirely yet, but the RDS "rdsadmin" account is not the same as a standard postgres superuser, so (at least):

  • GRANT :owner_role_user TO current_user has to be done before creating the database with owner_role_user as the owner
  • running SET ROLE :owner_role_user while authenticated as rdsadmin is not sufficient to do the grants and default privilege changes. I think the solution here is just to run these as rdsadmin instead of as the owner user.

@pjhartzell pjhartzell requested a review from philvarner April 30, 2025 12:07
@element84-infra
Copy link

element84-infra commented May 1, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

pjhartzell added 4 commits May 6, 2025 19:30
Set times such that the migration lock acquisition
timeout is longer than the cumulative time waiting
for connections to close and the time waiting for
connections to force-close.
@pjhartzell pjhartzell marked this pull request as ready for review May 14, 2025 14:36
@jkeifer jkeifer merged commit df442e6 into main May 14, 2025
7 checks passed
@jkeifer jkeifer deleted the jak/helpers branch May 14, 2025 17:51
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.

6 participants