Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
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
What?
We sorted migrations by
-name
ingetMigrations
as by assumption from generated file names, however, it may be not true as the improved (+ unflaked, previously it failed sometimes) test formigrate:down
can reproduce. As in result,migrateDown
/migrateRefresh
may execute in order different frommigrate
.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 (viaPromise.all
) without either creating a transaction before or usingisolateObjectProperty(req, 'transactionID')
. It leads to a race condition because operation can commit a wrong transaction, different from inited