admin_handler.go ×9

Frontier kind: Code frontier

unlabeled · c_c1738d70d528

4 tests · 3764 LOC · 192 files · introduces 0 tests · 40 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
13 ranges40 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
609 ranges3764 lines · 192 files · Browse complete extent
All tests (intent)
4 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.

2 files ranked by introduced lines: 40 introduced LOC across 13 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/frontend/admin_handler.go 24 introduced LOC · 9 ranges

Open complete file

2522 }
2523
2524 > func (adh *AdminHandler) MigrateSchedule(ctx context.Context, request *adminservice.MigrateScheduleRequest) (_ *adminservice.MigrateScheduleResponse, retErr error) { admin_handler.go
2525 > defer log.CapturePanic(adh.logger, &retErr)
2526 > if request == nil {
2527 return nil, errRequestNotSet
2528 }
2529 > if request.GetNamespace() == "" { admin_handler.go
2530 return nil, errNamespaceNotSet
2531 }
2532 > if request.GetScheduleId() == "" { admin_handler.go
2533 return nil, errScheduleIDNotSet
2534 }
2535 > if request.GetTarget() == adminservice.MigrateScheduleRequest_SCHEDULER_TARGET_UNSPECIFIED { admin_handler.go
2536 return nil, errMigrationTargetNotSet
2537 }
2538 > if request.GetIdentity() == "" { admin_handler.go
2539 return nil, errIdentityNotSet
2540 }
2541
2542 > namespaceID, err := adh.namespaceRegistry.GetNamespaceID(namespace.Name(request.GetNamespace())) admin_handler.go
2543 > if err != nil {
2544 return nil, err
2545 }
2546
2547 > switch request.GetTarget() { admin_handler.go
2548 case adminservice.MigrateScheduleRequest_SCHEDULER_TARGET_CHASM:
2549 return adh.migrateScheduleToChasm(ctx, request, namespaceID.String())
2550 > case adminservice.MigrateScheduleRequest_SCHEDULER_TARGET_WORKFLOW: admin_handler.go
2551 > return adh.migrateScheduleToWorkflow(ctx, request, namespaceID.String())
2552 default:
2553 return nil, serviceerror.NewInvalidArgumentf("unknown migration target: %v", request.GetTarget())
2584 request *adminservice.MigrateScheduleRequest,
2585 namespaceID string,
2586 > ) (*adminservice.MigrateScheduleResponse, error) { admin_handler.go
2587 > workflowID := scheduler.WorkflowIDPrefix + request.GetScheduleId()
2588 > descResp, err := adh.historyClient.DescribeWorkflowExecution(ctx, &historyservice.DescribeWorkflowExecutionRequest{
2589 > NamespaceId: namespaceID,
2590 > Request: &workflowservice.DescribeWorkflowExecutionRequest{
2591 > Namespace: request.GetNamespace(),
2592 > Execution: &commonpb.WorkflowExecution{
2593 > WorkflowId: workflowID,
2594 > },
2595 > },
2596 > })
2597 > switch {
2598 case common.IsNotFoundError(err):
2599 case err != nil:
go.temporal.io/server/api/adminservice/v1/request_response.pb.go 16 introduced LOC · 4 ranges

Open complete file

5733 }
5734
5735 > func (x *MigrateScheduleRequest) GetNamespace() string { request_response.pb.go
5736 > if x != nil {
5737 > return x.Namespace
5738 > }
5739 return ""
5740 }
5741
5742 > func (x *MigrateScheduleRequest) GetScheduleId() string { request_response.pb.go
5743 > if x != nil {
5744 > return x.ScheduleId
5745 > }
5746 return ""
5747 }
5748
5749 > func (x *MigrateScheduleRequest) GetTarget() MigrateScheduleRequest_SchedulerTarget { request_response.pb.go
5750 > if x != nil {
5751 > return x.Target
5752 > }
5753 return MigrateScheduleRequest_SCHEDULER_TARGET_UNSPECIFIED
5754 }
5755
5756 > func (x *MigrateScheduleRequest) GetIdentity() string { request_response.pb.go
5757 > if x != nil {
5758 > return x.Identity
5759 > }
5760 return ""
5761 }