worker_versioning.go ×6

Frontier kind: Code frontier

unlabeled · c_62bd8602a481

19 tests · 6034 LOC · 206 files · introduces 0 tests · 21 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges21 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1128 ranges6034 lines · 206 files · Browse complete extent
All tests (intent)
19 testsBrowse 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.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

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

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

go.temporal.io/server/common/worker_versioning/worker_versioning.go 21 introduced LOC · 6 ranges

Open complete file

544 }
545
546 > func StampFromCapabilities(capabilities *commonpb.WorkerVersionCapabilities, options *deploymentpb.WorkerDeploymentOptions) *commonpb.WorkerVersionStamp { worker_versioning.go
547 > if options.GetWorkerVersioningMode() == enumspb.WORKER_VERSIONING_MODE_VERSIONED && options.GetDeploymentName() != "" {
548 // Versioning 3, do not return stamp.
549 return nil
550 }
551 > if capabilities.GetUseVersioning() && capabilities.GetDeploymentSeriesName() != "" { worker_versioning.go
552 // Versioning 3, do not return stamp.
553 return nil
556 // between old and new versioning in Record*TaskStart calls. [cleanup-old-wv]
557 // we don't want to add stamp for task started events in old versioning
558 > if capabilities.GetBuildId() != "" { worker_versioning.go
559 return &commonpb.WorkerVersionStamp{UseVersioning: capabilities.UseVersioning, BuildId: capabilities.BuildId}
560 }
1072 wfDeployment *deploymentpb.Deployment,
1073 scheduledDeployment *deploymentpb.Deployment,
1074 > ) error { worker_versioning.go
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(
1088 }
1089
1090 > directiveDeployment := DirectiveDeployment(directive) worker_versioning.go
1091 > if directiveDeployment == nil {
1092 > // TODO: remove this once the ScheduledDeployment field is removed from proto
1093 > directiveDeployment = scheduledDeployment
1094 > }
1095 > if !directiveDeployment.Equal(wfDeployment) {
1096 // This must be a task scheduled before the workflow transitions to the current
1097 // deployment. Matching can drop it.
1100 directiveDeployment.GetBuildId(), wfDeployment.GetBuildId())
1101 }
1102 > return nil worker_versioning.go
1103 }
1104