Bug Fix: Ignore LastModifierIdentity if server deleted a version for garbage collection #163
+87
−10
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 was changed
Bug Fix: Ignore LastModifierIdentity if server deleted a version for garbage collection
Also, fix issue in describe version that would sometimes cause a deprecated version to be Drained with nil DrainedSince time.
Why?
The server sets the
LastModifierIdentityto"try-delete-for-add-version"when it deletes old versions to do garbage collection upon addition of the a worker version beyond the maximum. We are changing this on the server and will patch v1.29 of the OSS server to handle this more gracefully in v1.29.2 of the server, however, for users who cannot or do not want to use the new patch of the server immediately, this will fix the problem for them on the controller side so that they won't encounter this if they're running against Temporal Server v1.29.1 or v1.29.0.The issue of nil DrainedSince time caused flakiness in tests that involve Deprecated Drained versions. That flakiness appeared a lot in the new test I added to test the bug fix, so I also fixed that.
Checklist
Closes
How was this tested:
New functional test
Any docs updates needed?