command_attr_validator.go ×6

Frontier kind: Code frontier

unlabeled · c_20c093f94398

17 tests · 2656 LOC · 137 files · introduces 0 tests · 36 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges36 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
398 ranges2656 lines · 137 files · Browse complete extent
All tests (intent)
17 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.

1 file ranked by introduced lines: 36 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/command_attr_validator.go 36 introduced LOC · 6 ranges

Open complete file

78 runTimeout *durationpb.Duration,
79 workflowTaskQueue string,
80 > ) (enumspb.WorkflowTaskFailedCause, error) { command_attr_validator.go
81 > const failedCause = enumspb.WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES
82 >
83 > if attributes == nil {
84 return failedCause, serviceerror.NewInvalidArgument("ScheduleActivityTaskCommandAttributes is not set on ScheduleActivityTaskCommand.")
85 }
87 // The typescript SDK requires that the ScheduleToStart and/or the ScheduleToClose timeouts are non-nil.
88 // Since we override those using the potentially-nil run timeout we need to make sure it is always non-nil
89 > if runTimeout == nil { command_attr_validator.go
90 runTimeout = durationpb.New(0)
91 }
92
93 > activityID := attributes.GetActivityId() command_attr_validator.go
94 > activityType := ""
95 > if attributes.ActivityType != nil {
96 > activityType = attributes.ActivityType.GetName()
97 > }
98
99 > if attributes.RetryPolicy == nil { command_attr_validator.go
100 > attributes.RetryPolicy = &commonpb.RetryPolicy{}
101 > }
102
103 > namespaceEntry, err := v.namespaceRegistry.GetNamespaceByID(namespaceID) command_attr_validator.go
104 > if err != nil {
105 return failedCause, err
106 }
107
108 > opts := &activitypb.ActivityOptions{ command_attr_validator.go
109 > TaskQueue: attributes.TaskQueue,
110 > ScheduleToCloseTimeout: attributes.GetScheduleToCloseTimeout(),
111 > ScheduleToStartTimeout: attributes.GetScheduleToStartTimeout(),
112 > StartToCloseTimeout: attributes.GetStartToCloseTimeout(),
113 > HeartbeatTimeout: attributes.GetHeartbeatTimeout(),
114 > RetryPolicy: attributes.RetryPolicy,
115 > }
116 >
117 > err = activity.ValidateAndNormalizeEmbeddedActivity(
118 > activityID,
119 > activityType,
120 > v.getDefaultActivityRetrySettings,
121 > v.maxIDLengthLimit,
122 > namespaceEntry.Name(),
123 > opts,
124 > attributes.GetPriority(),
125 > runTimeout,
126 > workflowTaskQueue)
127 >
128 > if err != nil {
129 return failedCause, err
130 }