Repository navigation
Stop the reviewbot e2e test from failing on an update conflict - #93
Open
josephschorr wants to merge 1 commit into
Open
josephschorr wants to merge 1 commit into
josephschorr wants to merge 1 commit into
Conversation
The test read the class, changed its capabilities and wrote it back while the AgentClass controller was still validating the class the fixture had just applied. When the controller's status write landed between the read and the write, the update failed with an optimistic-concurrency conflict and the test failed before it exercised anything. The read-modify-write now retries on conflict, as the harness and the other e2e tests that update a live object already do.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
TestReviewbotTriggerStatus_ComposedPublicationKeepsModelTextOffThePullRequestfails intermittently in the e2e suite with an "object has been modified" conflict, unrelated to whatever change is under test.The test reads the AgentClass, changes its capabilities and writes it back. The AgentClass controller is validating that same class at the time, and when its status write lands between the read and the write, the test's update is refused.
Fix
The read, change and write now retry on conflict. This is the same approach the e2e harness and the other e2e tests that update a live object already use.
Test-only change; no product code is touched.
Testing
TestReviewbotTriggerStatus_*tests pass three times in a row locally.