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

Verify migrations have monotonically increasing version numbers #2916

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

Nateowami
Copy link
Collaborator

@Nateowami Nateowami commented Dec 17, 2024

I'm fairly certain there's a way to do this at compile time with the type system, but doing a runtime check is much easier to implement.


This change is Reviewable

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.84%. Comparing base (dc0b712) to head (4a78f2b).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/RealtimeServer/common/migration.ts 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2916      +/-   ##
==========================================
- Coverage   80.84%   80.84%   -0.01%     
==========================================
  Files         532      532              
  Lines       31107    31119      +12     
  Branches     5062     5042      -20     
==========================================
+ Hits        25149    25158       +9     
- Misses       5208     5210       +2     
- Partials      750      751       +1     

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

Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 left a comment

Choose a reason for hiding this comment

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

Thanks for adding this. I can confirm that an error appears when I list the migrations and they are not in increasing order. I'll note that this will not catch an issue if a migration class is missing.

Reviewed 10 of 10 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Nateowami)

@Nateowami Nateowami merged commit 9fa9db8 into master Dec 17, 2024
17 checks passed
@Nateowami Nateowami deleted the feature/verify-migration-version-numbers branch December 17, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants