-
Notifications
You must be signed in to change notification settings - Fork 435
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(releases): when reverting, published versions are used to derive translog #8112
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File moved into __tests__
dir
e82dc3b
to
a19295d
Compare
No changes to documentation |
Component Testing Report Updated Dec 20, 2024 4:14 PM (UTC) ✅ All Tests Passed -- expand for details
|
⚡️ Editor Performance ReportUpdated Fri, 20 Dec 2024 16:17:05 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
a19295d
to
ec0791d
Compare
ec0791d
to
7e76d2b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch, and great fix!
Description
Wrongly, the translog for the version of the document in the published release was being used to derive the revert state for each document. This worked in most cases because the first translog record for the version document is copying the existing publish document - but this fails when the published document is updated before publish but after release creation; or in other cases such as when a document is unpublished in a release.
This PR updates this so that the translog of the published document is always used to lookup the transaction of the release publish. As previously this will also:
usePostPublishTransactions
checks if there are any transactions after the publish tranactionuseDocumentRevertStates
which derives the revert state by looking at the transaction 1 prior to the publish transWhat to review
Testing
Some minor test updates made to correct for the fact that the documents provided to the hooks are the version documents, and then additional mock updates to reflect the changes to logic
Notes for release
N/A