Repository navigation
test(operator): patch the Jumpstarter so status writes cannot conflict - #1350
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The operator e2e specs changed the Jumpstarter resource by reading it, editing the copy and writing the whole object back. The operator writes the resource's status while it reconciles each change, and a status write changes the resource version too, so a spec that runs right after another spec's change can lose the race and fail with "the object has been modified". That happened to "should update provisioning config when autoProvisioning is enabled" on jumpstarter-dev#1319. Every such write now goes through updateJumpstarter, which sends only the changed fields as a merge patch without a resource version, so the API server applies them to the current object. The operator never writes the spec, so the patch lands on the spec the test read. The cleanups that restore a setting after a spec ignored errors from both the read and the write, so a lost race there left the next spec of the ordered container running against the wrong configuration without saying so. They use the same helper, and a failed restore now fails the spec. Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
2f291e6 to
b8a46b4
Compare
The operator e2e specs changed the Jumpstarter resource by reading it, editing the copy and writing it back once. This can cause conflicts