Skip to content

chore(server/typescript): brand db to prevent incorrect db being used#4974

Draft
iainsproat wants to merge 1 commit intomainfrom
iain/prevent-regression-db-at-build-time
Draft

chore(server/typescript): brand db to prevent incorrect db being used#4974
iainsproat wants to merge 1 commit intomainfrom
iain/prevent-regression-db-at-build-time

Conversation

@iainsproat
Copy link
Contributor

@iainsproat iainsproat commented Jun 22, 2025

  • we can use typescript branding to catch use of incorrect db at build time
  • reduces chance of reoccurrence of the problem where project Db was used in place of main Db for API token creation

Description & motivation

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

- we can use typescript branding to catch use of incorrect db at build time
- prevents regression of issue where project Db was used in place of main Db for API token creation
@codecov
Copy link

codecov bot commented Jun 22, 2025

Codecov Report

Attention: Patch coverage is 69.44444% with 11 lines in your changes missing coverage. Please review.

Project coverage is 61.70%. Comparing base (944b2cd) to head (aadaae1).

Files with missing lines Patch % Lines
...ckages/shared/src/environment/multiRegionConfig.ts 0.00% 9 Missing ⚠️
...ges/server/modules/multiregion/utils/dbSelector.ts 0.00% 1 Missing ⚠️
...ges/server/modules/workspaces/services/projects.ts 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (944b2cd) and HEAD (aadaae1). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (944b2cd) HEAD (aadaae1)
4 3
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4974      +/-   ##
==========================================
- Coverage   69.18%   61.70%   -7.48%     
==========================================
  Files         600      541      -59     
  Lines       26139    23219    -2920     
  Branches     3837     3450     -387     
==========================================
- Hits        18084    14328    -3756     
- Misses       6871     8001    +1130     
+ Partials     1184      890     -294     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant