version_workflow.go ×7

Frontier kind: Joint frontier

unlabeled · c_e786af41cfe4

68 tests · 3025 LOC · 136 files · introduces 4 tests · 33 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges33 lines · 1 files
Tests
4 tests

Contains — complete concept membership

All code (extent)
499 ranges3025 lines · 136 files · Browse complete extent
All tests (intent)
68 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.

4 tests introduced at this concept.

Introduced code

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

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

go.temporal.io/server/service/worker/workerdeployment/version_workflow.go 33 introduced LOC · 7 ranges

Open complete file

731
732 if !withRevisionNumbers { // No need to do this with version data revision number protection
733 > // In case this version just got deleted, we wait until it finished propagating delete to all task queues before reviving it version_workflow.go
734 > err = workflow.Await(ctx, func() bool {
735 > return d.asyncPropagationsInProgress == 0
736 > })
737 > if err != nil {
738 return err
739 }
790 d.syncRegisteredTaskQueueAsync(ctx, args)
791 } else {
792 > err = d.syncRegisteredTaskQueueOld(ctx, args) version_workflow.go
793 > }
794 return err
795 }
808 }
809
810 > func (d *VersionWorkflowRunner) syncRegisteredTaskQueueOld(ctx workflow.Context, args *deploymentspb.RegisterWorkerInVersionArgs) error { version_workflow.go
811 > // initial data
812 > var data *deploymentspb.DeploymentVersionData
813 > if args.GetRoutingConfig() == nil {
814 // Sync mode
815 data = &deploymentspb.DeploymentVersionData{
823 }
824
825 > activityCtx := workflow.WithActivityOptions(ctx, propagationActivityOptions) version_workflow.go
826 >
827 > // sync to user data
828 > var syncRes deploymentspb.SyncDeploymentVersionUserDataResponse
829 > err := workflow.ExecuteActivity(activityCtx, d.a.SyncDeploymentVersionUserData, &deploymentspb.SyncDeploymentVersionUserDataRequest{
830 > Version: d.VersionState.Version,
831 > UpdateRoutingConfig: args.GetRoutingConfig(),
832 > UpsertVersionData: d.versionDataToSync(),
833 > Sync: []*deploymentspb.SyncDeploymentVersionUserDataRequest_SyncUserData{
834 > {
835 > Name: args.TaskQueueName,
836 > Types: []enumspb.TaskQueueType{args.TaskQueueType},
837 > Data: data,
838 > },
839 > },
840 > }).Get(ctx, &syncRes)
841 > if err != nil {
842 return err
843 }
844
845 > if len(syncRes.TaskQueueMaxVersions) > 0 { version_workflow.go
846 // wait for propagation
847 err = workflow.ExecuteActivity(
856 }
857
858 > return nil version_workflow.go
859 }
860
861 > func (d *VersionWorkflowRunner) versionDataToSync() *deploymentspb.WorkerDeploymentVersionData { version_workflow.go
862 > return &deploymentspb.WorkerDeploymentVersionData{Status: d.VersionState.Status}
863 > }
864
865 // If routing update time has changed then we want to let the update through.