Skip to content

Commit 71e068d

Browse files
authored
add unset_versioning_override to WorkflowExecutionOptionsUpdatedEventAttributes (#516)
_**READ BEFORE MERGING:** All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted._ <!-- Describe what has changed in this PR --> ### What: Add unset_versioning_override to WorkflowExecutionOptionsUpdatedEventAttributes <!-- Tell your future self why have you made these changes --> ### Why: So that users of this event don't need to load VersioningOverride from mutable state every time they create this event. This change was prompted because the event is now being used for non-version-override-related things, and I received feedback that it is inefficient / awkward / error-prone to have to load and pass in the current versioning override every time anyone writes to this event. Now, a nil Versioning Override in this event means "no change" instead of "remove". This reduces the chance that someone accidentally unsets an override in the future, and also is more efficient. We've discussed this change internally in the server team and are ok with changing the meaning of this history event, because it is such a small change and the scope of impact is small (pre-release versioning users who have unset a versioning override and are building mutable state from that history). <!-- Are there any breaking changes on binary or code level? --> ### Breaking changes? Now, a nil Versioning Override in this event means "no change" instead of "remove". If an event exists with the previous meaning and the mutable state is rebuilt, the Versioning Override would not be removed. But the chance of that happening is very low. <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> temporalio/temporal#7091
1 parent 2b167f8 commit 71e068d

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

openapi/openapiv2.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13077,7 +13077,11 @@
1307713077
"properties": {
1307813078
"versioningOverride": {
1307913079
"$ref": "#/definitions/v1VersioningOverride",
13080-
"description": "Versioning override in the mutable state after event has been applied."
13080+
"description": "Versioning override upserted in this event.\nIgnored if nil or if unset_versioning_override is true."
13081+
},
13082+
"unsetVersioningOverride": {
13083+
"type": "boolean",
13084+
"description": "Versioning override removed in this event."
1308113085
}
1308213086
}
1308313087
},

openapi/openapiv3.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10572,7 +10572,12 @@ components:
1057210572
versioningOverride:
1057310573
allOf:
1057410574
- $ref: '#/components/schemas/VersioningOverride'
10575-
description: Versioning override in the mutable state after event has been applied.
10575+
description: |-
10576+
Versioning override upserted in this event.
10577+
Ignored if nil or if unset_versioning_override is true.
10578+
unsetVersioningOverride:
10579+
type: boolean
10580+
description: Versioning override removed in this event.
1057610581
WorkflowExecutionSignaledEventAttributes:
1057710582
type: object
1057810583
properties:

temporal/api/history/v1/message.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,11 @@ message ChildWorkflowExecutionTerminatedEventAttributes {
741741
}
742742

743743
message WorkflowExecutionOptionsUpdatedEventAttributes {
744-
// Versioning override in the mutable state after event has been applied.
744+
// Versioning override upserted in this event.
745+
// Ignored if nil or if unset_versioning_override is true.
745746
temporal.api.workflow.v1.VersioningOverride versioning_override = 1;
747+
// Versioning override removed in this event.
748+
bool unset_versioning_override = 2;
746749
}
747750

748751
// Not used anywhere. Use case is replaced by WorkflowExecutionOptionsUpdatedEventAttributes

0 commit comments

Comments
 (0)