1072
wfDeployment *deploymentpb.Deployment,
1073
scheduledDeployment *deploymentpb.Deployment,
1075
>
// TODO: consider using activity and wft Stamp for simplifying validation here.
1076
>
1077
>
// Effective behavior and deployment of the workflow when History scheduled the WFT.
1078
>
directiveBehavior := directive.GetBehavior()
1079
>
if directiveBehavior != wfBehavior &&
1080
>
// Verisoning 3 pre-release (v1.26, Dec 2024) is not populating request.VersionDirective so
1081
>
// we skip this check until v1.28 if directiveBehavior is unspecified.
1082
>
// TODO (shahab): remove this line after v1.27 is released.
1083
>
directiveBehavior != enumspb.VERSIONING_BEHAVIOR_UNSPECIFIED {
1084
// This must be a task scheduled before the workflow changes behavior. Matching can drop it.
1085
return serviceerrors.NewObsoleteMatchingTaskf(