version_workflow.go ×6

Frontier kind: Joint frontier

unlabeled · c_0151b03233fa

1 test · 3254 LOC · 140 files · introduces 1 test · 50 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges50 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
546 ranges3254 lines · 140 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.

3 files ranked by introduced lines: 50 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/worker/workerdeployment/version_workflow.go 27 introduced LOC · 6 ranges

Open complete file

647 err := workflow.ExecuteActivity(activityCtx, d.a.SyncDeploymentVersionUserData, syncReq).Get(ctx, &syncRes)
648 if err != nil {
649 > return err version_workflow.go
650 > }
651
652 // wait for propagation
741
742 if d.deleteVersion {
743 > if workflow.GetVersion(ctx, "awaitSerialDelete", workflow.DefaultVersion, 1) == workflow.DefaultVersion { version_workflow.go
744 // In case it was marked as deleted we make it undeleted
745 d.deleteVersion = false
748 d.GetVersionState().RevisionNumber++
749 }
750 > } else { version_workflow.go
751 > // In case this version just got deleted, we wait until it finished propagating delete to all task queues before reviving it.
752 > // This is because the deleted flag propagation is not protected by revision number and if done parallel to other propagations, it can cause a race condition.
753 > err = workflow.Await(ctx, func() bool {
754 > return d.asyncPropagationsInProgress == 0
755 > })
756 > if err != nil {
757 return err
758 }
759 > d.reviveDeleted(ctx) version_workflow.go
760 }
761 }
795 }
796
797 > func (d *VersionWorkflowRunner) reviveDeleted(ctx workflow.Context) { version_workflow.go
798 > // Resetting state to get rid of the info from the past life.
799 > state := makeNewVersionState(d.VersionState.Version.DeploymentName,
800 > d.VersionState.Version.BuildId,
801 > workflow.Now(ctx),
802 > "",
803 > enumspb.WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE,
804 > nil,
805 > d.VersionState.SyncBatchSize)
806 > d.VersionState = state
807 > d.deleteVersion = false
808 > }
809
810 func (d *VersionWorkflowRunner) syncRegisteredTaskQueueOld(ctx workflow.Context, args *deploymentspb.RegisterWorkerInVersionArgs) error {
1483
1484 if err != nil {
1485 > d.logger.Error("async propagation batch failed", "error", err) version_workflow.go
1486 > // Return empty map on error
1487 > return map[string]int64(nil)
1488 > }
1489
1490 return syncRes.TaskQueueMaxVersions
go.temporal.io/server/service/worker/workerdeployment/util.go 19 introduced LOC · 1 range

Open complete file

452 computeConfig *computepb.ComputeConfigSummary,
453 syncBatchSize int32,
454 > ) *deploymentspb.VersionLocalState { util.go
455 > return &deploymentspb.VersionLocalState{
456 > Version: &deploymentspb.WorkerDeploymentVersion{
457 > DeploymentName: deploymentName,
458 > BuildId: buildID,
459 > },
460 > CreateTime: timestamppb.New(createTime),
461 > Status: initialStatus,
462 > RoutingUpdateTime: nil,
463 > CurrentSinceTime: nil, // not current
464 > RampingSinceTime: nil, // not ramping
465 > RampPercentage: 0, // not ramping
466 > DrainageInfo: &deploymentpb.VersionDrainageInfo{}, // not draining or drained
467 > Metadata: nil,
468 > SyncBatchSize: syncBatchSize,
469 > LastModifierIdentity: identity,
470 > ComputeConfig: computeConfig,
471 > }
472 > }
go.temporal.io/server/api/deployment/v1/message.pb.go 4 introduced LOC · 1 range

Open complete file

1944 }
1945
1946 > func (x *SyncDeploymentVersionUserDataRequest) GetForgetVersion() bool { message.pb.go
1947 > if x != nil {
1948 > return x.ForgetVersion
1949 > }
1950 return false
1951 }