-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix auth rds not refreshing after expiration #344
Conversation
Codecov Report
@@ Coverage Diff @@
## master #344 +/- ##
==========================================
+ Coverage 85.24% 85.26% +0.02%
==========================================
Files 137 137
Lines 3679 3678 -1
Branches 405 405
==========================================
Hits 3136 3136
+ Misses 500 499 -1
Partials 43 43
Continue to review full report at Codecov.
|
const fetchConfiguration = async (environment, rdsSandboxId) => ({ | ||
[environment]: { | ||
client: 'postgresql', | ||
connection: async () => await getConnectionParams(environment, rdsSandboxId), | ||
postProcessResponse: recursiveCamelcase, | ||
}, | ||
}); |
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.
This is the important change: don't call await
of getConnectionParams
, pass an async function that knex can await
when necessary instead
Description
There was a problem with the knex connection refresh. It was not setup properly so when a connection expired knex couldn't really do anything about it, now it can call
connection
again properly so it can refresh the db connection.This problem wasn't immediately noticed because we need to leave a staging up for a while to run into this issue
Details
URL to issue
N/A
Link to staging deployment URL (or set N/A)
N/A
Links to any PRs or resources related to this PR
Only the api PR wil lget merged, the ui one was only to be able to test in staging
Integration test branch
master
Merge checklist
Your changes will be ready for merging after all of the steps below have been completed.
Code updates
Have best practices and ongoing refactors being observed in this PR
Manual/unit testing
Integration testing
You must check the box below to run integration tests on the latest commit on your PR branch.
Integration tests have to pass before the PR can be merged. Without checking the box, your PR
will not pass the required status checks for merging.
Documentation updates
Optional