admin_handler.go ×7

Frontier kind: Code frontier

unlabeled · c_446917eb0a73

2 tests · 3817 LOC · 195 files · introduces 0 tests · 30 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges30 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
618 ranges3817 lines · 195 files · Browse complete extent
All tests (intent)
2 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: 30 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/frontend/admin_handler.go 26 introduced LOC · 7 ranges

Open complete file

564 ctx context.Context,
565 request *adminservice.GetSearchAttributesRequest,
566 > ) (_ *adminservice.GetSearchAttributesResponse, retError error) { admin_handler.go
567 > defer log.CapturePanic(adh.logger, &retError)
568 >
569 > if request == nil {
570 return nil, errRequestNotSet
571 }
572
573 > indexName := request.GetIndexName() admin_handler.go
574 > if indexName == "" {
575 > indexName = adh.visibilityMgr.GetIndexName()
576 > }
577
578 > searchAttributes, err := adh.saProvider.GetSearchAttributes(indexName, true) admin_handler.go
579 > if err != nil {
580 adh.logger.Error("getSearchAttributes error", tag.Error(err))
581 return nil, serviceerror.NewUnavailablef(errUnableToGetSearchAttributesMessage, err)
587 // `skip-schema-update` is set. This is for backward compatibility using
588 // standard visibility.
589 > if adh.visibilityMgr.HasStoreName(elasticsearch.PersistenceName) || indexName == "" { admin_handler.go
590 > return adh.getSearchAttributesElasticsearch(ctx, indexName, searchAttributes)
591 > }
592 return adh.getSearchAttributesSQL(ctx, request, searchAttributes)
593 }
597 indexName string,
598 searchAttributes searchattribute.NameTypeMap,
599 > ) (*adminservice.GetSearchAttributesResponse, error) { admin_handler.go
600 > sdkClient := adh.sdkClientFactory.GetSystemClient()
601 > descResp, err := sdkClient.DescribeWorkflowExecution(ctx, addsearchattributes.WorkflowName, "")
602 > var wfInfo *workflowpb.WorkflowExecutionInfo
603 > if err != nil {
604 // NotFound can happen when no search attributes were added and the workflow has never been executed.
605 if _, isNotFound := err.(*serviceerror.NotFound); !isNotFound {
608 return nil, err
609 }
610 > } else { admin_handler.go
611 > wfInfo = descResp.GetWorkflowExecutionInfo()
612 > }
613
614 > return &adminservice.GetSearchAttributesResponse{ admin_handler.go
615 > CustomAttributes: searchAttributes.Custom(),
616 > SystemAttributes: searchAttributes.System(),
617 > AddWorkflowExecutionInfo: wfInfo,
618 > }, nil
619 }
620
go.temporal.io/server/api/adminservice/v1/request_response.pb.go 4 introduced LOC · 1 range

Open complete file

2058 }
2059
2060 > func (x *GetSearchAttributesRequest) GetIndexName() string { request_response.pb.go
2061 > if x != nil {
2062 > return x.IndexName
2063 > }
2064 return ""
2065 }