api.go ×4

Frontier kind: Code frontier

unlabeled · c_854180794db8

21 tests · 5828 LOC · 197 files · introduces 0 tests · 34 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges34 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1116 ranges5828 lines · 197 files · Browse complete extent
All tests (intent)
21 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: 34 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/recordworkflowtaskstarted/api.go 31 introduced LOC · 4 ranges

Open complete file

405 identity string,
406 wtHeartbeat bool,
407 > ) (*historyservice.RecordWorkflowTaskStartedResponseWithRawHistory, error) { api.go
408 > response := &historyservice.RecordWorkflowTaskStartedResponseWithRawHistory{}
409 > response.WorkflowType = ms.GetWorkflowType()
410 > executionInfo := ms.GetExecutionInfo()
411 > if executionInfo.LastCompletedWorkflowTaskStartedEventId != common.EmptyEventID {
412 response.PreviousStartedEventId = executionInfo.LastCompletedWorkflowTaskStartedEventId
413 }
415 // Starting workflowTask could result in different scheduledEventID if workflowTask was transient and new events came in
416 // before it was started.
417 > response.ScheduledEventId = workflowTask.ScheduledEventID api.go
418 > response.StartedEventId = workflowTask.StartedEventID
419 > response.StickyExecutionEnabled = ms.IsStickyTaskQueueSet()
420 > response.NextEventId = ms.GetNextEventID()
421 > response.Attempt = workflowTask.Attempt
422 > response.WorkflowExecutionTaskQueue = &taskqueuepb.TaskQueue{
423 > Name: executionInfo.TaskQueue,
424 > Kind: enumspb.TASK_QUEUE_KIND_NORMAL,
425 > }
426 > response.ScheduledTime = timestamppb.New(workflowTask.ScheduledTime)
427 > response.StartedTime = timestamppb.New(workflowTask.StartedTime)
428 > response.Version = workflowTask.Version
429 >
430 > // TODO (alex-update): Transient needs to be renamed to "TransientOrSpeculative"
431 > response.TransientWorkflowTask = ms.GetTransientWorkflowTaskInfo(workflowTask, identity)
432 >
433 > currentBranchToken, err := ms.GetCurrentBranchToken()
434 > if err != nil {
435 return nil, err
436 }
437 > response.BranchToken = currentBranchToken api.go
438 >
439 > qr := ms.GetQueryRegistry()
440 > bufferedQueryIDs := qr.GetBufferedIDs()
441 > if len(bufferedQueryIDs) > 0 {
442 response.Queries = make(map[string]*querypb.WorkflowQuery, len(bufferedQueryIDs))
443 for _, bufferedQueryID := range bufferedQueryIDs {
455 // Resend these updates if this is not a heartbeat WT (includeAlreadySent = !wtHeartbeat).
456 // Heartbeat WT delivers only new updates that come while this WT was running (similar to queries and buffered events).
457 > response.Messages = updateRegistry.Send(ctx, !wtHeartbeat, workflowTask.StartedEventID) api.go
458 >
459 > if workflowTask.Type == enumsspb.WORKFLOW_TASK_TYPE_SPECULATIVE && len(response.GetMessages()) == 0 {
460 return nil, serviceerror.NewNotFound("No messages for speculative workflow task.")
461 }
go.temporal.io/server/service/history/workflow/context.go 3 introduced LOC · 1 range

Open complete file

1247 ),
1248 update.WithTotalLimitSuggestCAN(
1249 > func() float64 { context.go
1250 > return c.config.WorkflowExecutionMaxTotalUpdatesSuggestContinueAsNewThreshold(nsName)
1251 > },
1252 ),
1253 )