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

fix: correct migrations sorting in getMigrations #9330

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Nov 19, 2024

What?

We sorted migrations by -name in getMigrations as by assumption from generated file names, however, it may be not true as the improved (+ unflaked, previously it failed sometimes) test for migrate:down can reproduce. As in result, migrateDown / migrateRefresh may execute in order different from migrate.

Unflakes the 'should commit multiple operations async' test.
We shouldn't pass the same req that doesn't contain a transaction to different operations that execute in parallel (via Promise.all) without either creating a transaction before or using isolateObjectProperty(req, 'transactionID'). It leads to a race condition because operation can commit a wrong transaction, different from inited

@r1tsuu r1tsuu marked this pull request as ready for review November 19, 2024 11:37
@denolfe denolfe removed the v3 label Nov 19, 2024
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