fix: defer reading of database configuration until needed to fix race#1316
Merged
jescalada merged 18 commits intofinos:mainfrom Dec 13, 2025
Merged
fix: defer reading of database configuration until needed to fix race#1316jescalada merged 18 commits intofinos:mainfrom
jescalada merged 18 commits intofinos:mainfrom
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
kriswest
commented
Dec 9, 2025
kriswest
commented
Dec 9, 2025
kriswest
commented
Dec 9, 2025
kriswest
commented
Dec 9, 2025
Signed-off-by: Kris West <kristopher.west@natwest.com>
…y changes to resolve 1313)
…oxiedHosts into DB adaptor
…y changes to resolve 1313)
Signed-off-by: Kris West <kristopher.west@natwest.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1316 +/- ##
==========================================
- Coverage 80.88% 80.69% -0.20%
==========================================
Files 65 65
Lines 4546 4568 +22
Branches 777 776 -1
==========================================
+ Hits 3677 3686 +9
- Misses 854 867 +13
Partials 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@jescalada I ended up fixing a bunch of tests in this PR that seemed to be missing the |
coopernetes
reviewed
Dec 9, 2025
kriswest
commented
Dec 10, 2025
kriswest
commented
Dec 10, 2025
kriswest
commented
Dec 10, 2025
Removes a duplicated type export and an unnecessary start() call Co-authored-by: Thomas Cooper <57812123+coopernetes@users.noreply.github.com> Signed-off-by: Kris West <kristopher.west@natwest.com>
Co-authored-by: Thomas Cooper <57812123+coopernetes@users.noreply.github.com> Signed-off-by: Kris West <kristopher.west@natwest.com>
jescalada
approved these changes
Dec 10, 2025
Contributor
jescalada
left a comment
There was a problem hiding this comment.
LGTM! 🚀
I did some testing with the skipped tests just in case, but I'm still getting some mysterious errors with the testPush.test.ts file:
Details
FAIL test/testPush.test.ts > Push API > test push API > should allow an authorizer to approve a push
AssertionError: expected 401 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 401
❯ test/testPush.test.ts:158:26
156| },
157| });
158| expect(res.status).toBe(200);
| ^
159| });
160|
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯
FAIL test/testPush.test.ts > Push API > should allow an authorizer to reject a push
AssertionError: expected 401 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 401
❯ test/testPush.test.ts:272:24
270| .post(`/api/v1/push/${TEST_PUSH.id}/reject`)
271| .set('Cookie', `${cookie}`);
272| expect(res.status).toBe(200);
| ^
273| });
274|
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯
FAIL test/testPush.test.ts > Push API > should allow a committer to cancel a push
AssertionError: expected 401 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 401
❯ test/testPush.test.ts:316:24
314| .post(`/api/v1/push/${TEST_PUSH.id}/cancel`)
315| .set('Cookie', `${cookie}`);
316| expect(res.status).toBe(200);
| ^
317|
318| const pushes = await request(app).get('/api/v1/push').set('Cookie', `${cookie…
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/3]⎯
Test Files 1 failed | 45 passed (46)
Tests 3 failed | 536 passed (539)Would be great to have some more clues on this!
kriswest
commented
Dec 12, 2025
Co-authored-by: Juan Escalada <97265671+jescalada@users.noreply.github.com> Signed-off-by: Kris West <kristopher.west@natwest.com>
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
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.
resolves #1313
supercedes #1314
By deferring the setup of the database adaptors until they are first used, we can defer the retrieval of the DB config allowing the user configuration to be loaded before we attempt to use it.