workflow_handler.go ×5

Frontier kind: Joint frontier

unlabeled · c_520f353b1ca4

1 test · 3898 LOC · 199 files · introduces 1 test · 31 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges31 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
588 ranges3898 lines · 199 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

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

go.temporal.io/server/service/frontend/workflow_handler.go 14 introduced LOC · 5 ranges

Open complete file

7375 return nil, serviceerror.NewInvalidArgument("Setting fairness key rate limit on workflow task queues is not allowed.")
7376 }
7377 > if err := validateRateLimit(fairnessKeyRateLimitDefault, "UpdateFairnessKeyRateLimitDefault"); err != nil { workflow_handler.go
7378 return nil, err
7379 }
7380
7381 // Validate identity field
7382 > if err := validateStringField("Identity", request.GetIdentity(), wh.config.MaxIDLengthLimit(), false); err != nil { workflow_handler.go
7383 return nil, err
7384 }
7385
7386 // Validate Fairness Weight Updates
7387 > setFairnessWeightOverrides := request.GetSetFairnessWeightOverrides() workflow_handler.go
7388 > unsetFairnessWeightOverrides := request.GetUnsetFairnessWeightOverrides()
7389 > limit := wh.config.MaxFairnessWeightOverrideConfigLimit(request.GetNamespace(), request.TaskQueue, request.TaskQueueType)
7390 > if err := validateFairnessWeightUpdate(setFairnessWeightOverrides, unsetFairnessWeightOverrides, limit); err != nil {
7391 return nil, err
7392 }
7393
7394 > resp, err := wh.matchingClient.UpdateTaskQueueConfig(ctx, &matchingservice.UpdateTaskQueueConfigRequest{ workflow_handler.go
7395 > NamespaceId: namespaceID.String(),
7396 > UpdateTaskqueueConfig: request,
7397 > })
7398 > if err != nil {
7399 return nil, err
7400 }
7401 > return &workflowservice.UpdateTaskQueueConfigResponse{ workflow_handler.go
7402 > Config: resp.UpdatedTaskqueueConfig,
7403 > }, nil
7404 }
7405
go.temporal.io/server/api/matchingservicemock/v1/service_grpc.pb.mock.go 13 introduced LOC · 3 ranges

Open complete file

804
805 // UpdateTaskQueueConfig mocks base method.
806 > func (m *MockMatchingServiceClient) UpdateTaskQueueConfig(ctx context.Context, in *matchingservice.UpdateTaskQueueConfigRequest, opts ...grpc.CallOption) (*matchingservice.UpdateTaskQueueConfigResponse, error) { service_grpc.pb.mock.go
807 > m.ctrl.T.Helper()
808 > varargs := []any{ctx, in}
809 > for _, a := range opts {
810 varargs = append(varargs, a)
811 }
812 > ret := m.ctrl.Call(m, "UpdateTaskQueueConfig", varargs...) service_grpc.pb.mock.go
813 > ret0, _ := ret[0].(*matchingservice.UpdateTaskQueueConfigResponse)
814 > ret1, _ := ret[1].(error)
815 > return ret0, ret1
816 }
817
818 // UpdateTaskQueueConfig indicates an expected call of UpdateTaskQueueConfig.
819 > func (mr *MockMatchingServiceClientMockRecorder) UpdateTaskQueueConfig(ctx, in any, opts ...any) *gomock.Call { service_grpc.pb.mock.go
820 > mr.mock.ctrl.T.Helper()
821 > varargs := append([]any{ctx, in}, opts...)
822 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTaskQueueConfig", reflect.TypeOf((*MockMatchingServiceClient)(nil).UpdateTaskQueueConfig), varargs...)
823 > }
824
825 // UpdateTaskQueueUserData mocks base method.
go.temporal.io/server/service/frontend/validators.go 4 introduced LOC · 3 ranges

Open complete file

38 }
39
40 > func validateStringField(fieldName string, value string, maxLen int, required bool) error { validators.go
41 > if required && len(value) == 0 {
42 return serviceerror.NewInvalidArgumentf("%s field must be non-empty.", fieldName)
43 }
44 > if len(value) > maxLen { validators.go
45 return serviceerror.NewInvalidArgumentf("%s field too long (max %d characters).", fieldName, maxLen)
46 }
47 > return nil validators.go
48 }
49