admin_handler.go ×6

Frontier kind: Code frontier

unlabeled · c_c5b6d54ef909

4 tests · 3919 LOC · 194 files · introduces 0 tests · 56 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
13 ranges56 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
669 ranges3919 lines · 194 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.

3 files ranked by introduced lines: 56 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 25 introduced LOC · 6 ranges

Open complete file

2240 return nil, fmt.Errorf("%w: %v", errInvalidDLQJobToken, err)
2241 }
2242 > client := adh.sdkClientFactory.GetSystemClient() admin_handler.go
2243 > execution, err := client.DescribeWorkflowExecution(ctx, jt.WorkflowId, jt.RunId)
2244 > if err != nil {
2245 return nil, err
2246 }
2247 > response, err := client.QueryWorkflow(ctx, jt.WorkflowId, jt.RunId, dlq.QueryTypeProgress) admin_handler.go
2248 > if err != nil {
2249 return nil, err
2250 }
2251 > var queryResponse dlq.ProgressQueryResponse admin_handler.go
2252 > if err = response.Get(&queryResponse); err != nil {
2253 return nil, err
2254 }
2255 > var state enumsspb.DLQOperationState admin_handler.go
2256 > switch execution.WorkflowExecutionInfo.Status {
2257 case enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING:
2258 state = enumsspb.DLQ_OPERATION_STATE_RUNNING
2262 state = enumsspb.DLQ_OPERATION_STATE_FAILED
2263 }
2264 > var opType enumsspb.DLQOperationType admin_handler.go
2265 > switch queryResponse.WorkflowType {
2266 case dlq.WorkflowTypeDelete:
2267 opType = enumsspb.DLQ_OPERATION_TYPE_PURGE
2271 return nil, serviceerror.NewInternalf("Invalid DLQ workflow type: %v", opType)
2272 }
2273 > return &adminservice.DescribeDLQJobResponse{ admin_handler.go
2274 > DlqKey: &commonspb.HistoryDLQKey{
2275 > TaskCategory: int32(queryResponse.DlqKey.TaskCategoryID),
2276 > SourceCluster: queryResponse.DlqKey.SourceCluster,
2277 > TargetCluster: queryResponse.DlqKey.TargetCluster,
2278 > },
2279 > OperationType: opType,
2280 > OperationState: state,
2281 > MaxMessageId: queryResponse.MaxMessageIDToProcess,
2282 > LastProcessedMessageId: queryResponse.LastProcessedMessageID,
2283 > MessagesProcessed: queryResponse.NumberOfMessagesProcessed,
2284 > StartTime: execution.WorkflowExecutionInfo.StartTime,
2285 > EndTime: execution.WorkflowExecutionInfo.CloseTime,
2286 > }, nil
2287 }
2288
go.temporal.io/server/common/testing/mocksdk/value_mock.go 18 introduced LOC · 4 ranges

Open complete file

23
24 // NewMockEncodedValue creates a new mock instance.
25 > func NewMockEncodedValue(ctrl *gomock.Controller) *MockEncodedValue { value_mock.go
26 > mock := &MockEncodedValue{ctrl: ctrl}
27 > mock.recorder = &MockEncodedValueMockRecorder{mock}
28 > return mock
29 > }
30
31 // EXPECT returns an object that allows the caller to indicate expected use.
32 > func (m *MockEncodedValue) EXPECT() *MockEncodedValueMockRecorder { value_mock.go
33 > return m.recorder
34 > }
35
36 // Get mocks base method.
37 > func (m *MockEncodedValue) Get(arg0 interface{}) error { value_mock.go
38 > m.ctrl.T.Helper()
39 > ret := m.ctrl.Call(m, "Get", arg0)
40 > ret0, _ := ret[0].(error)
41 > return ret0
42 > }
43
44 // Get indicates an expected call of Get.
45 > func (mr *MockEncodedValueMockRecorder) Get(arg0 interface{}) *gomock.Call { value_mock.go
46 > mr.mock.ctrl.T.Helper()
47 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockEncodedValue)(nil).Get), arg0)
48 > }
49
50 // HasValue mocks base method.
go.temporal.io/server/common/testing/mocksdk/client_mock.go 13 introduced LOC · 3 ranges

Open complete file

498
499 // QueryWorkflow mocks base method.
500 > func (m *MockClient) QueryWorkflow(ctx context.Context, workflowID, runID, queryType string, args ...any) (converter.EncodedValue, error) { client_mock.go
501 > m.ctrl.T.Helper()
502 > varargs := []any{ctx, workflowID, runID, queryType}
503 > for _, a := range args {
504 varargs = append(varargs, a)
505 }
506 > ret := m.ctrl.Call(m, "QueryWorkflow", varargs...) client_mock.go
507 > ret0, _ := ret[0].(converter.EncodedValue)
508 > ret1, _ := ret[1].(error)
509 > return ret0, ret1
510 }
511
512 // QueryWorkflow indicates an expected call of QueryWorkflow.
513 > func (mr *MockClientMockRecorder) QueryWorkflow(ctx, workflowID, runID, queryType any, args ...any) *gomock.Call { client_mock.go
514 > mr.mock.ctrl.T.Helper()
515 > varargs := append([]any{ctx, workflowID, runID, queryType}, args...)
516 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryWorkflow", reflect.TypeOf((*MockClient)(nil).QueryWorkflow), varargs...)
517 > }
518
519 // QueryWorkflowWithOptions mocks base method.