workflow.go ×7

Frontier kind: Code frontier

unlabeled · c_f70fde9f038a

10 tests · 3903 LOC · 200 files · introduces 0 tests · 16 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges16 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
590 ranges3903 lines · 200 files · Browse complete extent
All tests (intent)
10 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: 16 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/frontend/workflow_handler.go 9 introduced LOC · 3 ranges

Open complete file

5738 // Malformed queries (e.g. "()") would otherwise cause the batch activity
5739 // to retry indefinitely since the error is not marked non-retryable.
5740 > if q := request.GetVisibilityQuery(); len(q) > 0 { workflow_handler.go
5741 if _, err := sqlparser.Parse("select * from dummy where " + q); err != nil {
5742 return nil, serviceerror.NewInvalidArgumentf("invalid visibility query: %v", err)
5745
5746 // Validate concurrent batch operation
5747 > maxConcurrentBatchOperation := wh.config.MaxConcurrentBatchOperation(request.GetNamespace()) workflow_handler.go
5748 > countResp, err := wh.CountWorkflowExecutions(ctx, &workflowservice.CountWorkflowExecutionsRequest{
5749 > Namespace: request.GetNamespace(),
5750 > Query: batcher.OpenBatchOperationQuery,
5751 > })
5752 > if err != nil {
5753 return nil, err
5754 }
5755
5756 > openBatchOperationCount := int(countResp.GetCount()) workflow_handler.go
5757 > if openBatchOperationCount >= maxConcurrentBatchOperation {
5758 return nil, &serviceerror.ResourceExhausted{
5759 Cause: enumspb.RESOURCE_EXHAUSTED_CAUSE_CONCURRENT_LIMIT,
go.temporal.io/server/service/worker/batcher/workflow.go 7 introduced LOC · 7 ranges

Open complete file

199 return serviceerror.NewInvalidArgument("JobId is not set on request.")
200 }
201 > if len(params.GetNamespace()) == 0 { workflow.go
202 return serviceerror.NewInvalidArgument("Namespace is not set on request.")
203 }
204 > if numTargetSelectors == 0 { workflow.go
205 return serviceerror.NewInvalidArgument("VisibilityQuery, Executions, or TargetExecutions must be set on request.")
206 }
207 > if numTargetSelectors > 1 { workflow.go
208 return serviceerror.NewInvalidArgument("visibility query, executions, and target executions are mutually exclusive")
209 }
210 > if targetExecutions := params.GetTargetExecutions(); len(targetExecutions) > 0 { workflow.go
211 // TerminateActivitiesOperation/DeleteActivitiesOperation/CancelActivitiesOperation
212 // target standalone activity executions; every other operation targets workflow
227 }
228 }
229 > if len(params.GetReason()) == 0 { workflow.go
230 return serviceerror.NewInvalidArgument("Reason is not set on request.")
231 }
232 > if params.GetOperation() == nil { workflow.go
233 return serviceerror.NewInvalidArgument("Batch operation is not set on request.")
234 }
235
236 > switch op := params.GetOperation().(type) { workflow.go
237 case *workflowservice.StartBatchOperationRequest_TerminateActivitiesOperation,
238 *workflowservice.StartBatchOperationRequest_DeleteActivitiesOperation,