-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Reject versioning override when version does not exist #8791
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
base: main
Are you sure you want to change the base?
Conversation
…ng-override-version-presence
| // TODO (Shivam): Verify if this is the correct way to handle these errors. | ||
| input.NonRetryableErrors = append(input.NonRetryableErrors, "Pinned version is not present in the task queue") |
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.
would love to get some clarity over here - theoretically, this works as I don't want the internal batch workflow's activity to retry on these errors. But should something like this be done in this manner is a different question that I am trying to answer.
Would love to get someone's opinion here - have also mentioned this in our slack channel
| } | ||
|
|
||
| func (s *WorkflowAliasSearchAttributeTestSuite) TestWorkflowAliasSearchAttribute_CustomSearchAttributeOverride() { | ||
| func (s *WorkflowAliasSearchAttributeTestSuite) TestWorkflowAliasSearchAttribute_CustomSAOverride() { |
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.
had to make the test name shorter here otherwise there were registration errors in our worker-versioning entity workflows since we have some length checks
…ng-override-version-presence
| // Validate versioning override, if present. | ||
| if err := worker_versioning.ValidateVersioningOverride(request.GetVersioningOverride()); err != nil { | ||
| return nil, err | ||
| } | ||
|
|
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.
disclaimer for reviewer: all validation checks that you see removed from the frontend, in this PR, are simply moved from frontend to history.
Coincidentally, I had worked on this which had initially moved them from history to frontend. Little did I know that I was wrong and that the authors of these changes had some incredible foresight (or maybe they did not and were just lucky)
…temporalio/temporal into ss/versioning-override-version-presence
What changed?
ValidateVersioningOverrideWhy?
How did you test it?
Potential risks
Note
Adds CheckTaskQueueVersionMembership RPC and uses it (with per-host TTL cache) to validate VersioningOverride only when the version exists; wires through clients/handlers and updates tests.
CheckTaskQueueVersionMembershipRequest/Responseand service RPCCheckTaskQueueVersionMembershipinmatchingservice.versionis present.VersioningOverrideby calling the new RPC; add per-host cache (TTL viahistory.versionMembershipCacheTTL).StartWorkflowExecution,SignalWithStart,Reset,MultiOperation,UpdateWorkflowExecutionOptions).VersionMembershipCacheTTLand initialize cache in history engine.WithDeploymentSeries,WithBuildID).ValidateVersioningOverrideand functional tests covering pinned overrides, batch updates, reset, and the new RPC.Written by Cursor Bugbot for commit 5c31e16. This will update automatically on new commits. Configure here.