workflow_handler.go ×9

Frontier kind: Code frontier

unlabeled · c_d82b72bdd030

11 tests · 3432 LOC · 178 files · introduces 0 tests · 33 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges33 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
496 ranges3432 lines · 178 files · Browse complete extent
All tests (intent)
11 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: 33 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 31 introduced LOC · 9 ranges

Open complete file

942 // GetWorkflowExecutionHistory returns the history of specified workflow execution. It fails with 'EntityNotExistError' if specified workflow
943 // execution in unknown to the service.
944 > func (wh *WorkflowHandler) GetWorkflowExecutionHistory(ctx context.Context, request *workflowservice.GetWorkflowExecutionHistoryRequest) (_ *workflowservice.GetWorkflowExecutionHistoryResponse, retError error) { workflow_handler.go
945 > defer log.CapturePanic(wh.logger, &retError)
946 >
947 > if request == nil {
948 return nil, errRequestNotSet
949 }
950
951 > if err := validateExecution(request.Execution); err != nil { workflow_handler.go
952 return nil, err
953 }
954
955 > if request.GetMaximumPageSize() <= 0 { workflow_handler.go
956 request.MaximumPageSize = int32(wh.config.HistoryMaxPageSize(request.GetNamespace()))
957 }
958
959 > enums.SetDefaultHistoryEventFilterType(&request.HistoryEventFilterType) workflow_handler.go
960 >
961 > namespaceID, err := wh.namespaceRegistry.GetNamespaceID(namespace.Name(request.GetNamespace()))
962 > if err != nil {
963 return nil, err
964 }
965
966 // force limit page size if exceed
967 > if request.GetMaximumPageSize() > primitives.GetHistoryMaxPageSize { workflow_handler.go
968 wh.throttledLogger.Warn("GetHistory page size is larger than threshold",
969 tag.WorkflowID(request.Execution.GetWorkflowId()),
973 }
974
975 > if !request.GetSkipArchival() { workflow_handler.go
976 enableArchivalRead := wh.archivalMetadata.GetHistoryConfig().ReadEnabled()
977 historyArchived := wh.historyArchived(ctx, request, namespaceID)
981 }
982
983 > response, err := wh.historyClient.GetWorkflowExecutionHistory(ctx, workflow_handler.go
984 > &historyservice.GetWorkflowExecutionHistoryRequest{
985 > NamespaceId: namespaceID.String(),
986 > Request: request,
987 > })
988 > if err != nil {
989 return nil, err
990 }
991
992 > isCloseEventOnly := request.HistoryEventFilterType == enumspb.HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT workflow_handler.go
993 > err = api.ProcessInternalRawHistory(
994 > ctx,
995 > wh.saProvider,
996 > wh.saMapperProvider,
997 > response,
998 > wh.visibilityMgr,
999 > wh.versionChecker,
1000 > namespace.Name(request.GetNamespace()),
1001 > isCloseEventOnly,
1002 > )
1003 > if err != nil {
1004 return nil, err
1005 }
1006 > return response.Response, nil workflow_handler.go
1007 }
1008
go.temporal.io/server/common/enums/defaults.go 2 introduced LOC · 1 range

Open complete file

33 }
34
35 > func SetDefaultHistoryEventFilterType(f *enumspb.HistoryEventFilterType) { defaults.go
36 > if *f == enumspb.HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED {
37 *f = enumspb.HISTORY_EVENT_FILTER_TYPE_ALL_EVENT
38 }