workflow.go ×9

Frontier kind: Joint frontier

unlabeled · c_1da9b8fa589a

1 test · 3566 LOC · 125 files · introduces 1 test · 25 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges25 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
683 ranges3566 lines · 125 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.

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

go.temporal.io/server/service/worker/scheduler/workflow.go 25 introduced LOC · 9 ranges

Open complete file

403 }
404 if s.Schedule.Action == nil {
405 > s.Schedule.Action = &schedulepb.ScheduleAction{} workflow.go
406 > }
407 if s.Schedule.Policies == nil {
408 s.Schedule.Policies = &schedulepb.SchedulePolicies{}
976 startWf := s.Schedule.Action.GetStartWorkflow()
977 if startWf == nil {
978 > return workflow.go
979 > }
980
981 inputPayload, err := startWf.Input.Marshal()
995 func (s *scheduler) processUpdate(req *schedulespb.FullUpdateRequest) {
996 if err := s.checkConflict(req.ConflictToken); err != nil {
997 > s.logger.Warn("Update conflicted with concurrent change") workflow.go
998 > return
999 > }
1000
1001 s.logger.Debug("Schedule update")
1229 }
1230
1231 > upsertMap := map[string]any{} workflow.go
1232 > //workflowcheck:ignore (map iteration order does not affect history)
1233 > for key, valuePayload := range searchAttributes.GetIndexedFields() {
1234 > var value any
1235 > if err := payload.Decode(valuePayload, &value); err != nil {
1236 s.logger.Error("error updating search attributes of the scheule", "error", err)
1237 return
1238 }
1239 > upsertMap[key] = value workflow.go
1240 }
1241
1242 //nolint:staticcheck // SA1019 Use untyped version for backwards compatibility.
1243 > currentSearchAttributes := workflow.GetInfo(s.ctx).SearchAttributes workflow.go
1244 > //workflowcheck:ignore (map iteration order does not affect history)
1245 > for key, currentValuePayload := range currentSearchAttributes.GetIndexedFields() {
1246 > // This might violate determinism when a new system search attribute is added
1247 > // and the user already had a custom search attribute with same name. This is
1248 > // a general issue in the system, and it will be fixed when we introduce
1249 > // a system prefix to fix those conflicts.
1250 > if sadefs.IsReserved(key) {
1251 > continue
1252 }
1253 if newValuePayload, exists := searchAttributes.GetIndexedFields()[key]; !exists {
1259 }
1260 }
1261 > if len(upsertMap) == 0 { workflow.go
1262 return
1263 }
1264 //nolint:staticcheck // SA1019 The untyped function here is more convenient.
1265 > if err := workflow.UpsertSearchAttributes(s.ctx, upsertMap); err != nil { workflow.go
1266 s.logger.Error("error updating search attributes of the scheule", "error", err)
1267 }
1313 return nil
1314 }
1315 > return errUpdateConflict workflow.go
1316 }
1317