admin_handler.go ×6

Frontier kind: Code frontier

unlabeled · c_65b69857f696

6 tests · 4532 LOC · 200 files · introduces 0 tests · 32 LOC · 5 files

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges32 lines · 5 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
740 ranges4532 lines · 200 files · Browse complete extent
All tests (intent)
6 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.

5 files ranked by introduced lines: 32 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/frontend/admin_handler.go 18 introduced LOC · 6 ranges

Open complete file

690 ctx context.Context,
691 request *adminservice.ImportWorkflowExecutionRequest,
692 > ) (_ *adminservice.ImportWorkflowExecutionResponse, retError error) { admin_handler.go
693 > defer log.CapturePanic(adh.logger, &retError)
694 >
695 > if request == nil {
696 return nil, errRequestNotSet
697 }
698
699 > if err := validateExecution(request.Execution); err != nil { admin_handler.go
700 return nil, err
701 }
702
703 > namespaceID, err := adh.namespaceRegistry.GetNamespaceID(namespace.Name(request.GetNamespace())) admin_handler.go
704 > if err != nil {
705 return nil, err
706 }
707
708 > unaliasedBatches, err := adh.unaliasAndValidateSearchAttributes(request.HistoryBatches, namespace.Name(request.GetNamespace())) admin_handler.go
709 > if err != nil {
710 return nil, err
711 }
725 }
726
727 > func (adh *AdminHandler) unaliasAndValidateSearchAttributes(historyBatches []*commonpb.DataBlob, nsName namespace.Name) ([]*commonpb.DataBlob, error) { admin_handler.go
728 > var unaliasedBatches []*commonpb.DataBlob
729 > for _, historyBatch := range historyBatches {
730 > events, err := adh.eventSerializer.DeserializeEvents(historyBatch)
731 > if err != nil {
732 return nil, serviceerror.NewInvalidArgument(err.Error())
733 }
734 > hasSas := false admin_handler.go
735 > for _, event := range events {
736 > sas, _ := searchattribute.GetFromEvent(event)
737 > if sas == nil {
738 continue
739 }
go.temporal.io/server/api/adminservice/v1/request_response.pb.go 4 introduced LOC · 1 range

Open complete file

233 }
234
235 > func (x *ImportWorkflowExecutionRequest) GetNamespace() string { request_response.pb.go
236 > if x != nil {
237 > return x.Namespace
238 > }
239 return ""
240 }
go.temporal.io/server/common/searchattribute/event_gen.go 4 introduced LOC · 2 ranges

Open complete file

27 }
28
29 > func GetFromEvent(event *historypb.HistoryEvent) (*commonpb.SearchAttributes, bool) { event_gen.go
30 > switch e := event.GetAttributes().(type) {
31 case *historypb.HistoryEvent_StartChildWorkflowExecutionInitiatedEventAttributes:
32 return e.StartChildWorkflowExecutionInitiatedEventAttributes.GetSearchAttributes(), true
35 case *historypb.HistoryEvent_WorkflowExecutionContinuedAsNewEventAttributes:
36 return e.WorkflowExecutionContinuedAsNewEventAttributes.GetSearchAttributes(), true
37 > case *historypb.HistoryEvent_WorkflowExecutionStartedEventAttributes: event_gen.go
38 > return e.WorkflowExecutionStartedEventAttributes.GetSearchAttributes(), true
39 default:
40 return nil, false
go.temporal.io/server/common/testing/testvars/any.go 3 introduced LOC · 1 range

Open complete file

50 }
51
52 > func (a Any) Int64() int64 { any.go
53 > return int64(a.Int())
54 > }
55
56 func (a Any) UInt64() uint64 {
go.temporal.io/server/common/testing/testvars/test_vars.go 3 introduced LOC · 1 range

Open complete file

164 }
165
166 > func (tv *TestVars) WithNamespaceName(namespaceName namespace.Name) *TestVars { test_vars.go
167 > return tv.cloneSetVal("namespace_name", namespaceName)
168 > }
169
170 func (tv *TestVars) Namespace() *namespace.Namespace {