mutable_state_impl.go ×39

Frontier kind: Joint frontier

unlabeled · c_674de1c1089b

1 test · 10754 LOC · 268 files · introduces 1 test · 221 LOC · 6 files

Introduces — evidence that enters the hierarchy at this concept

Code
54 ranges221 lines · 6 files
Tests
1 test

Contains — complete concept membership

All code (extent)
2370 ranges10754 lines · 268 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

6 files ranked by introduced lines: 221 introduced LOC across 54 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 170 introduced LOC · 39 ranges

Open complete file

3866 // get the most up-to-date pinned entry put it at the front (v3 reachability and v3.1 drainage)
3867 if behavior == enumspb.VERSIONING_BEHAVIOR_PINNED {
3868 > newValues = append(newValues, worker_versioning.PinnedBuildIdSearchAttribute(ms.GetWorkerDeploymentVersionSA())) mutable_state_impl.go
3869 > }
3870
3871 // get the build id entry (all versions of versioning)
3981 // don't expect any of the strings to be unencodable, so I think the all-or-nothing method is worth it
3982 // so that we can merge the SearchAttributes map only once instead of three times.
3983 > func (ms *MutableStateImpl) saveDeploymentSearchAttributes(deployment, version, behavior string, maxSearchAttributeValueSize int) error { mutable_state_impl.go
3984 > saPayloads := make(map[string]*commonpb.Payload)
3985 > if deployment == "" {
3986 saPayloads[sadefs.TemporalWorkerDeployment] = nil
3987 > } else { mutable_state_impl.go
3988 > deploymentPayload, err := sadefs.EncodeValue(deployment, enumspb.INDEXED_VALUE_TYPE_KEYWORD)
3989 > if err != nil {
3990 return err
3991 }
3992 > if len(deploymentPayload.GetData()) <= maxSearchAttributeValueSize { // we know the string won't really be over, but still check mutable_state_impl.go
3993 > saPayloads[sadefs.TemporalWorkerDeployment] = deploymentPayload
3994 > }
3995 }
3996 > if version == "" { mutable_state_impl.go
3997 saPayloads[sadefs.TemporalWorkerDeploymentVersion] = nil
3998 > } else { mutable_state_impl.go
3999 > saPayloads[sadefs.TemporalWorkerDeploymentVersion] = nil
4000 > versionPayload, err := sadefs.EncodeValue(version, enumspb.INDEXED_VALUE_TYPE_KEYWORD)
4001 > if err != nil {
4002 return err
4003 }
4004 > if len(versionPayload.GetData()) <= maxSearchAttributeValueSize { // we know the string won't really be over, but still check mutable_state_impl.go
4005 > saPayloads[sadefs.TemporalWorkerDeploymentVersion] = versionPayload
4006 > }
4007 }
4008 > if behavior == "" { mutable_state_impl.go
4009 saPayloads[sadefs.TemporalWorkflowVersioningBehavior] = nil
4010 > } else { mutable_state_impl.go
4011 > behaviorPayload, err := sadefs.EncodeValue(behavior, enumspb.INDEXED_VALUE_TYPE_KEYWORD)
4012 > if err != nil {
4013 return err
4014 }
4015 > if len(behaviorPayload.GetData()) <= maxSearchAttributeValueSize { // we know the string won't really be over, but still check mutable_state_impl.go
4016 > saPayloads[sadefs.TemporalWorkflowVersioningBehavior] = behaviorPayload
4017 > }
4018 }
4019 > ms.updateSearchAttributes(saPayloads) mutable_state_impl.go
4020 > return nil
4021 }
4022
4055 modifiedBehavior := ""
4056 if b := ms.GetWorkflowVersioningBehaviorSA(); b != enumspb.VERSIONING_BEHAVIOR_UNSPECIFIED {
4057 > modifiedBehavior = b.String() mutable_state_impl.go
4058 > }
4059
4060 // check equality
4087 existingVersion != modifiedVersion ||
4088 existingBehavior != modifiedBehavior {
4089 > err = ms.saveDeploymentSearchAttributes(modifiedDeployment, modifiedVersion, modifiedBehavior, maxSearchAttributeValueSize) mutable_state_impl.go
4090 > if err != nil {
4091 return false, err // if err != nil, nothing will be written
4092 }
5834 timeSkippingConfigUpdated bool,
5835 workflowUpdateOptions []*historypb.WorkflowExecutionOptionsUpdatedEventAttributes_WorkflowUpdateOptionsUpdate,
5836 > ) (*historypb.HistoryEvent, error) { mutable_state_impl.go
5837 > if err := ms.checkMutability(tag.WorkflowActionWorkflowOptionsUpdated); err != nil {
5838 return nil, err
5839 }
5840 > event := ms.hBuilder.AddWorkflowExecutionOptionsUpdatedEvent( mutable_state_impl.go
5841 > versioningOverride,
5842 > unsetVersioningOverride,
5843 > attachRequestID,
5844 > attachCompletionCallbacks,
5845 > links,
5846 > identity,
5847 > priority,
5848 > timeSkippingConfig,
5849 > timeSkippingConfigUpdated,
5850 > workflowUpdateOptions,
5851 > )
5852 > prevEffectiveVersioningBehavior := ms.GetEffectiveVersioningBehavior()
5853 > prevEffectiveDeployment := ms.GetEffectiveDeployment()
5854 >
5855 > if err := ms.ApplyWorkflowExecutionOptionsUpdatedEvent(event); err != nil {
5856 return nil, err
5857 }
5858
5859 > if !proto.Equal(ms.GetEffectiveDeployment(), prevEffectiveDeployment) || mutable_state_impl.go
5860 > ms.GetEffectiveVersioningBehavior() != prevEffectiveVersioningBehavior {
5861 > metrics.WorkerDeploymentVersioningOverrideCounter.With(
5862 > ms.metricsHandler.WithTags(
5863 > metrics.NamespaceTag(ms.namespaceEntry.Name().String()),
5864 > metrics.VersioningBehaviorBeforeOverrideTag(prevEffectiveVersioningBehavior),
5865 > metrics.VersioningBehaviorAfterOverrideTag(ms.GetEffectiveVersioningBehavior()),
5866 > metrics.RunInitiatorTag("", event.GetWorkflowExecutionStartedEventAttributes()),
5867 > ),
5868 > ).Record(1)
5869 > }
5870
5871 > return event, nil mutable_state_impl.go
5872 }
5873
5874 > func (ms *MutableStateImpl) ApplyWorkflowExecutionOptionsUpdatedEvent(event *historypb.HistoryEvent) error { mutable_state_impl.go
5875 > attributes := event.GetWorkflowExecutionOptionsUpdatedEventAttributes()
5876 >
5877 > // Update versioning.
5878 > var err error
5879 > var requestReschedulePendingWorkflowTask bool
5880 > if attributes.GetUnsetVersioningOverride() {
5881 requestReschedulePendingWorkflowTask, err = ms.updateVersioningOverride(nil)
5882 > } else if attributes.GetVersioningOverride() != nil { mutable_state_impl.go
5883 > requestReschedulePendingWorkflowTask, err = ms.updateVersioningOverride(attributes.GetVersioningOverride())
5884 > }
5885 > if err != nil {
5886 return err
5887 }
5888
5889 // Update attached request ID.
5890 > if attributes.GetAttachedRequestId() != "" { mutable_state_impl.go
5891 ms.AttachRequestID(attributes.GetAttachedRequestId(), event.EventType, event.EventId)
5892 }
5893
5894 // Update completion callbacks.
5895 > if err := ms.addCompletionCallbacks( mutable_state_impl.go
5896 > event,
5897 > attributes.GetAttachedRequestId(),
5898 > attributes.GetAttachedCompletionCallbacks(),
5899 > ); err != nil {
5900 return err
5901 }
5902
5903 // Add update callbacks
5904 > for _, updateOptions := range attributes.GetWorkflowUpdateOptions() { mutable_state_impl.go
5905 updateID := updateOptions.GetUpdateId()
5906 requestID := updateOptions.GetAttachedRequestId()
5929
5930 // Update priority.
5931 > if attributes.GetPriority() != nil { mutable_state_impl.go
5932 if !proto.Equal(ms.executionInfo.Priority, attributes.GetPriority()) {
5933 requestReschedulePendingWorkflowTask = true
5942 // (2) same TSC with fast-forward in MergeAndApplyWorkflowExecutionOptions logic may
5943 // either indicate the TSC is untouched or updated to the same value and should refresh related timer tasks
5944 > if attributes.GetTimeSkippingConfigUpdated() { mutable_state_impl.go
5945 tsc := attributes.GetTimeSkippingConfig()
5946 tsi := ms.GetExecutionInfo().GetTimeSkippingInfo()
5957
5958 // Finally, reschedule the pending workflow task if so requested.
5959 > if requestReschedulePendingWorkflowTask { mutable_state_impl.go
5960 > return ms.reschedulePendingWorkflowTask()
5961 > }
5962 return nil
5963 }
5965 func (ms *MutableStateImpl) updateVersioningOverride(
5966 override *workflowpb.VersioningOverride,
5967 > ) (bool, error) { mutable_state_impl.go
5968 > previousEffectiveDeployment := ms.GetEffectiveDeployment()
5969 > previousEffectiveVersioningBehavior := ms.GetEffectiveVersioningBehavior()
5970 > var requestReschedulePendingWorkflowTask bool
5971 >
5972 > if override != nil {
5973 > if ms.GetExecutionInfo().GetVersioningInfo() == nil {
5974 > ms.GetExecutionInfo().VersioningInfo = &workflowpb.WorkflowExecutionVersioningInfo{}
5975 > }
5976 > ms.GetExecutionInfo().VersioningInfo.VersioningOverride = &workflowpb.VersioningOverride{
5977 > Override: override.GetOverride(),
5978 > }
5979 > //nolint:staticcheck // SA1019: worker versioning v0.31
5980 > if override.GetPinnedVersion() != "" {
5981 // If the old Pinned Version field was populated instead of VersioningOverride_Pinned,
5982 // we read from both old and new fields but write in the new fields only.
5991
5992 //nolint:staticcheck // SA1019: worker versioning v0.31
5993 > if override.GetBehavior() == enumspb.VERSIONING_BEHAVIOR_AUTO_UPGRADE { mutable_state_impl.go
5994 // If the old behavior field was set to auto upgrade instead of VersioningOverride_AutoUpgrade,
5995 // we read from both old and new fields but write in the new fields only.
6000
6001 //nolint:staticcheck // SA1019 deprecated Deployment will clean up later
6002 > if d := override.GetDeployment(); d != nil { // v0.30 pinned mutable_state_impl.go
6003 // We read from both old and new fields but write in the new fields only.
6004 ms.GetExecutionInfo().VersioningInfo.VersioningOverride.Override = &workflowpb.VersioningOverride_Pinned{
6011
6012 //nolint:staticcheck // SA1019: worker versioning v0.31
6013 > if vs := override.GetPinnedVersion(); vs != "" { // v0.31 pinned mutable_state_impl.go
6014 // We read from both old and new fields but write in the new fields only.
6015 ms.GetExecutionInfo().VersioningInfo.VersioningOverride.Override = &workflowpb.VersioningOverride_Pinned{
6021 }
6022
6023 > if v := worker_versioning.GetOverrideTargetDeploymentVersion(ms.GetExecutionInfo().VersioningInfo.VersioningOverride); v != nil { mutable_state_impl.go
6024 > // Existing pinned overrides update WorkerDeploymentName immediately; keep one-time overrides aligned.
6025 > ms.GetExecutionInfo().WorkerDeploymentName = v.GetDeploymentName()
6026 > }
6027 } else if vi := ms.GetExecutionInfo().GetVersioningInfo(); vi != nil {
6028 ms.GetExecutionInfo().VersioningInfo.VersioningOverride = nil
6032 }
6033
6034 > if !proto.Equal(ms.GetEffectiveDeployment(), previousEffectiveDeployment) || mutable_state_impl.go
6035 > ms.GetEffectiveVersioningBehavior() != previousEffectiveVersioningBehavior {
6036 > // TODO (carly) part 2: if safe mode, do replay test on new deployment if deployment changed, if fail, revert changes and abort
6037 > // If there is an ongoing transition, we remove it so that tasks from this workflow (including the pending WFT
6038 > // that initiated the transition) can run on our override deployment as soon as possible.
6039 > //
6040 > // We only have to think about the case where the workflow is unpinned, since if the workflow is pinned, no
6041 > // transition will start.
6042 > //
6043 > // If we did NOT remove the transition, we would have to keep the pending WFT scheduled per the transition's
6044 > // deployment, so that when the task is started it can run on the transition's target deployment, complete,
6045 > // and thereby complete the transition. If there is anything wrong with the transition's target deployment,
6046 > // the transition could hang due to the task being stuck, or the transition could fail if the WFT fails.
6047 > // Basically, WF might be stuck in a transition loop, and user wants to pin it to the previous build to move
6048 > // it out of the loop. If we don't remove the transition, it will still be stuck.
6049 > //
6050 > // It is possible for there to be an ongoing transition and an override that both result in the same effective
6051 > // behavior and effective deployment. In that case, we would not hit the code path to remove the transition or
6052 > // reschedule the WFT. For this to happen, the existing behavior and the override would both have to be unpinned.
6053 > // If we don't remove the transition or reschedule pending tasks, the outstanding WFT on the transition's
6054 > // target queue will be started on the transition's target deployment. Most likely this matches user's intention
6055 > // because they add the unpinned override, they want to workflow to do the transition. Even if we removed the
6056 > // transition, the rescheduled task will be redirected by Matching to the old transition's deployment again,
6057 > // and it will start the same transition in the workflow. So removing the transition would not make a difference
6058 > // and would in fact add some extra work for the server.
6059 > ms.executionInfo.GetVersioningInfo().DeploymentTransition = nil
6060 > ms.executionInfo.GetVersioningInfo().VersionTransition = nil
6061 >
6062 > // If effective deployment or behavior change, we need to reschedule any pending tasks, because History will reject
6063 > // the task's start request if the task is being started by a poller that is not from the workflow's effective
6064 > // deployment according to History. Therefore, it is important for matching to match tasks with the correct pollers.
6065 > // Even if the effective deployment does not change, we still need to reschedule tasks into the appropriate
6066 > // default/unpinned queue or the pinned queue, because the two queues will be handled differently if the task queue's
6067 > // Current Deployment changes between now and when the task is started.
6068 > //
6069 > // We choose to let any started WFT that is running on the old deployment finish running, instead of forcing it to fail.
6070 > requestReschedulePendingWorkflowTask = true
6071 > ms.ClearStickyTaskQueue()
6072 >
6073 > // For v3 versioned workflows (ms.GetEffectiveVersioningBehavior() != UNSPECIFIED), this will update the reachability
6074 > // search attribute based on the execution_info.deployment and/or override deployment if one exists.
6075 > limit := ms.config.SearchAttributesSizeOfValueLimit(ms.namespaceEntry.Name().String())
6076 > // Passing nil useVersion because an override by itself should not add to used versions SA
6077 > if err := ms.updateBuildIdsAndDeploymentSearchAttributes(nil, nil, limit); err != nil {
6078 return requestReschedulePendingWorkflowTask, err
6079 }
6080 }
6081
6082 > return requestReschedulePendingWorkflowTask, ms.reschedulePendingActivities(0) mutable_state_impl.go
6083 }
6084
9610 versioningInfo := ms.GetExecutionInfo().GetVersioningInfo()
9611 if override := versioningInfo.GetVersioningOverride(); override != nil {
9612 > if v := worker_versioning.GetOverrideTargetDeploymentVersion(override); v != nil { mutable_state_impl.go
9613 > return v.GetDeploymentName()
9614 > }
9615 }
9616 if v := versioningInfo.GetDeploymentVersion(); v != nil {
9623 versioningInfo := ms.GetExecutionInfo().GetVersioningInfo()
9624 if override := versioningInfo.GetVersioningOverride(); override != nil {
9625 > if v := worker_versioning.GetOverrideTargetDeploymentVersion(override); v != nil { mutable_state_impl.go
9626 > return worker_versioning.ExternalWorkerDeploymentVersionToString(v)
9627 > }
9628 }
9629 if v := versioningInfo.GetDeploymentVersion(); v != nil {
9636 func (ms *MutableStateImpl) GetWorkflowVersioningBehaviorSA() enumspb.VersioningBehavior {
9637 if override := ms.executionInfo.GetVersioningInfo().GetVersioningOverride(); override != nil {
9638 > if override.GetAutoUpgrade() { mutable_state_impl.go
9639 return enumspb.VERSIONING_BEHAVIOR_AUTO_UPGRADE
9640 > } else if worker_versioning.GetOverrideTargetDeploymentVersion(override) != nil { mutable_state_impl.go
9641 > return enumspb.VERSIONING_BEHAVIOR_PINNED
9642 > }
9643 //nolint:staticcheck // SA1019: worker versioning v0.31 and v0.30
9644 return override.GetBehavior()
9767 // reschedulePendingActivities reschedules all the activities that are not started, so they are
9768 // scheduled against the right queue in matching.
9769 > func (ms *MutableStateImpl) reschedulePendingActivities(wftScheduleToClose time.Duration) error { mutable_state_impl.go
9770 > for _, ai := range ms.GetPendingActivityInfos() {
9771 if ai.StartedEventId != common.EmptyEventID {
9772 // TODO: skip task generation also when activity is in backoff period
9798 }
9799
9800 > return nil mutable_state_impl.go
9801 }
9802
9803 // reschedulePendingWorkflowTask reschedules the pending WFT if it is not started yet.
9804 // The currently scheduled WFT will be rejected when attempting to start because its stamp changed.
9805 > func (ms *MutableStateImpl) reschedulePendingWorkflowTask() error { mutable_state_impl.go
9806 > // If the WFT is started but not finished, we let it run its course
9807 > // - once it's completed, failed or timed out a new one will be scheduled.
9808 > if !ms.HasPendingWorkflowTask() || ms.HasStartedWorkflowTask() {
9809 > return nil
9810 > }
9811
9812 // A speculative WFT cannot be rescheduled since it is added directly (without transfer task)
go.temporal.io/server/common/worker_versioning/worker_versioning.go 15 introduced LOC · 4 ranges

Open complete file

100 //
101 // If the workflow becomes unpinned or unversioned, this entry will be removed from that list.
102 > func PinnedBuildIdSearchAttribute(version string) string { worker_versioning.go
103 > return fmt.Sprintf("%s%s%s",
104 > BuildIdSearchAttributePrefixPinned,
105 > BuildIdSearchAttributeDelimiter,
106 > version,
107 > )
108 > }
109
110 // AssignedBuildIdSearchAttribute returns the search attribute value for the currently assigned build ID
678 case *workflowpb.VersioningOverride_Pinned:
679 return GetOverridePinnedVersion(override)
680 > case *workflowpb.VersioningOverride_OneTime: worker_versioning.go
681 > return o.OneTime.GetTargetDeploymentVersion()
682 case *workflowpb.VersioningOverride_AutoUpgrade:
683 // Auto-upgrade has no stored target version; the version is chosen by matching at task dispatch time
689 }
690
691 > func ExtractVersioningBehaviorFromOverride(override *workflowpb.VersioningOverride) enumspb.VersioningBehavior { worker_versioning.go
692 > if override.GetAutoUpgrade() {
693 return enumspb.VERSIONING_BEHAVIOR_AUTO_UPGRADE
694 > } else if override.GetPinned() != nil || override.GetOneTime() != nil { worker_versioning.go
695 > // A pending one-time override routes like pinned; unlike pinned, it clears after a WFT completes on its target.
696 > return enumspb.VERSIONING_BEHAVIOR_PINNED
697 > }
698
699 //nolint:staticcheck // SA1019: worker versioning v0.31
go.temporal.io/server/api/workflow/v1/message.pb.go 10 introduced LOC · 2 ranges

Open complete file

60 mi := &file_temporal_server_api_workflow_v1_message_proto_msgTypes[0]
61 if x != nil {
62 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) message.pb.go
63 > if ms.LoadMessageInfo() == nil {
64 > ms.StoreMessageInfo(mi)
65 > }
66 > return ms
67 }
68 return mi.MessageOf(x)
146 mi := &file_temporal_server_api_workflow_v1_message_proto_msgTypes[1]
147 if x != nil {
148 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) message.pb.go
149 > if ms.LoadMessageInfo() == nil {
150 > ms.StoreMessageInfo(mi)
151 > }
152 > return ms
153 }
154 return mi.MessageOf(x)
go.temporal.io/server/common/metrics/tags.go 10 introduced LOC · 3 ranges

Open complete file

540 }
541
542 > func VersioningBehaviorBeforeOverrideTag(behavior enumspb.VersioningBehavior) Tag { tags.go
543 > return Tag{Key: behaviorBefore, Value: behavior.String()}
544 > }
545
546 > func VersioningBehaviorAfterOverrideTag(behavior enumspb.VersioningBehavior) Tag { tags.go
547 > return Tag{Key: behaviorAfter, Value: behavior.String()}
548 > }
549
550 // RunInitiatorTag creates a tag indicating how a workflow run was initiated.
552 // When attributes is nil (e.g. during AddWorkflowExecutionOptionsUpdatedEvent),
553 // it returns a tag indicating an existing run.
554 > func RunInitiatorTag(prevRunID string, attributes *historypb.WorkflowExecutionStartedEventAttributes) Tag { tags.go
555 > if attributes == nil {
556 > return Tag{Key: runInitiator, Value: existingRun}
557 > } else if attributes.GetParentWorkflowExecution() != nil {
558 return Tag{Key: runInitiator, Value: childRun}
559 }
go.temporal.io/server/service/history/transfer_queue_active_task_executor.go 8 introduced LOC · 3 ranges

Open complete file

986 // Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version.
987 if mutableState.GetEffectiveVersioningBehavior() == enumspb.VERSIONING_BEHAVIOR_PINNED {
988 > inheritedPinnedVersion = worker_versioning.ExternalWorkerDeploymentVersionFromDeployment(mutableState.GetEffectiveDeployment()) transfer_queue_active_task_executor.go
989 > newTQ := attributes.GetTaskQueue().GetName()
990 > if attributes.GetNamespaceId() != mutableState.GetExecutionInfo().GetNamespaceId() { // don't inherit pinned version if child is in a different namespace
991 inheritedPinnedVersion = nil
992 > } else if newTQ != mutableState.GetExecutionInfo().GetTaskQueue() { transfer_queue_active_task_executor.go
993 newTQInPinnedVersion, err = worker_versioning.GetIsWFTaskQueueInVersionDetector(t.matchingRawClient, t.versionCache)(ctx, attributes.GetNamespaceId(), newTQ, inheritedPinnedVersion)
994 if err != nil {
1003 // Pinned and one-time overrides are inherited if Task Queue of new run is compatible with the override version.
1004 if o := mutableState.GetExecutionInfo().GetVersioningInfo().GetVersioningOverride(); worker_versioning.GetOverrideTargetDeploymentVersion(o) != nil {
1005 > inheritedVersioningOverride = o transfer_queue_active_task_executor.go
1006 > newTQ := attributes.GetTaskQueue().GetName()
1007 > if newTQ != mutableState.GetExecutionInfo().GetTaskQueue() && !newTQInPinnedVersion ||
1008 > attributes.GetNamespaceId() != mutableState.GetExecutionInfo().GetNamespaceId() { // don't inherit override if child is in a different namespace
1009 inheritedVersioningOverride = nil
1010 }
go.temporal.io/server/service/history/workflow/util.go 8 introduced LOC · 3 ranges

Open complete file

187 v, _ := worker_versioning.WorkerDeploymentVersionFromStringV31(transition.GetVersion()) //nolint:staticcheck // SA1019: worker versioning v0.31
188 return worker_versioning.DeploymentFromDeploymentVersion(v)
189 > } else if transition := versioningInfo.GetDeploymentTransition(); transition != nil { // //nolint:staticcheck // SA1019: worker versioning v0.30 util.go
190 return transition.GetDeployment()
191 > } else if overrideTarget := worker_versioning.GetOverrideTargetDeploymentVersion(versioningInfo.GetVersioningOverride()); overrideTarget != nil { util.go
192 > // Pinned and pending one-time overrides route to their stored target version.
193 > return worker_versioning.DeploymentFromExternalDeploymentVersion(overrideTarget)
194 > } else if GetEffectiveVersioningBehavior(versioningInfo) != enumspb.VERSIONING_BEHAVIOR_UNSPECIFIED || // v0.30 and v0.31 auto-upgrade
195 versioningInfo.GetVersioningOverride().GetAutoUpgrade() { // v0.32 auto-upgrade
196 //nolint:revive // nesting will be reduced after old code clean up
219 } else if t := versioningInfo.GetVersionTransition(); t != nil {
220 return enumspb.VERSIONING_BEHAVIOR_AUTO_UPGRADE
221 > } else if override := versioningInfo.GetVersioningOverride(); override != nil { util.go
222 > return worker_versioning.ExtractVersioningBehaviorFromOverride(override)
223 > }
224 return versioningInfo.GetBehavior()
225 }