handler.go ×4

Frontier kind: Joint frontier

unlabeled · c_1f39c1d63a75

1 test · 2105 LOC · 84 files · introduces 1 test · 61 LOC · 6 files

Introduces — evidence that enters the hierarchy at this concept

Code
13 ranges61 lines · 6 files
Tests
1 test

Contains — complete concept membership

All code (extent)
293 ranges2105 lines · 84 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.

Introduced files, introduced tests, and structurally relevant concept specializationclient_v7.go ×10 · 177 introduced LOCclient_v7.go ×10noop_moving_window_average.go ×1 · 2 introduced LOCnoop_moving_window_avera…search_attribute.go ×12 · 121 introduced LOCsearch_attribute.go ×12key.go ×1 · 6 introduced LOCkey.go ×1priority.go ×1 · 3 introduced LOCpriority.go ×1setting_gen.go ×51 · 335 introduced LOCsetting_gen.go ×51grpc_resolver.go ×2 · 7 introduced LOCgrpc_resolver.go ×2predicates.pb.go ×21 · 54 introduced LOCpredicates.pb.go ×21service.pb.go ×2 · 342 introduced LOCservice.pb.go ×2message.pb.go ×2 · 20 introduced LOCmessage.pb.go ×2constants.go ×1 · 6 introduced LOCconstants.go ×1task.pb.go ×1 · 3 introduced LOCtask.pb.go ×1message.pb.go ×2 · 442 introduced LOCmessage.pb.go ×2defs.go ×5 · 91 introduced LOCdefs.go ×5zap_logger.go ×1 · 6 introduced LOCzap_logger.go ×1zap_logger.go ×1 · 6 introduced LOCzap_logger.go ×1zap_logger.go ×1 · 1 introduced LOCzap_logger.go ×1zap_logger.go ×4 · 12 introduced LOCzap_logger.go ×4zap_tag.go ×1 · 6 introduced LOCzap_tag.go ×1zap_logger.go ×2 · 33 introduced LOCzap_logger.go ×2embed.go ×2 · 4 introduced LOCembed.go ×2zap_logger.go ×1 · 2 introduced LOCzap_logger.go ×1zap_tag.go ×1 · 3 introduced LOCzap_tag.go ×1tags.go ×1 · 6 introduced LOCtags.go ×1zap_logger.go ×1 · 7 introduced LOCzap_logger.go ×1zap_tag.go ×1 · 5 introduced LOCzap_tag.go ×1tags.go ×9 · 37 introduced LOCtags.go ×9message.pb.go ×2 · 49 introduced LOCmessage.pb.go ×2cluster.pb.go ×2 · 200 introduced LOCcluster.pb.go ×2wildcard.go ×1 · 2 introduced LOCwildcard.go ×1wildcard.go ×4 · 14 introduced LOCwildcard.go ×4retrypolicy.go ×3 · 19 introduced LOCretrypolicy.go ×3message.pb.go ×2 · 20 introduced LOCmessage.pb.go ×2payload.go ×1 · 3 introduced LOCpayload.go ×1TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/api/adminservice/v1/request_response.pb.go · 6661 LOCv1/request_response.pb.g…go.temporal.io/server/api/adminservice/v1/service.pb.go · 297 LOCv1/service.pb.gogo.temporal.io/server/api/chasm/v1/message.pb.go · 230 LOCv1/message.pb.gogo.temporal.io/server/api/clock/v1/message.pb.go · 217 LOCv1/message.pb.gogo.temporal.io/server/api/cluster/v1/message.pb.go · 366 LOCv1/message.pb.gogo.temporal.io/server/api/common/v1/api_category.pb.go · 230 LOCv1/api_category.pb.gogo.temporal.io/server/api/common/v1/dlq.pb.go · 319 LOCv1/dlq.pb.gogo.temporal.io/server/api/deployment/v1/message.pb.go · 4650 LOCv1/message.pb.gogo.temporal.io/server/api/enums/v1/cluster.pb.go · 233 LOCv1/cluster.pb.gogo.temporal.io/server/api/enums/v1/common.pb.go · 288 LOCv1/common.pb.gogo.temporal.io/server/api/enums/v1/dlq.pb.go · 211 LOCv1/dlq.pb.gogo.temporal.io/server/api/enums/v1/fairness_state.pb.go · 147 LOCv1/fairness_state.pb.gogo.temporal.io/server/api/enums/v1/nexus.pb.go · 182 LOCv1/nexus.pb.gogo.temporal.io/server/api/enums/v1/predicate.pb.go · 194 LOCv1/predicate.pb.gogo.temporal.io/server/api/enums/v1/replication.pb.go · 338 LOCv1/replication.pb.gogo.temporal.io/server/api/enums/v1/task.pb.go · 480 LOCv1/task.pb.gogo.temporal.io/server/api/enums/v1/workflow.pb.go · 299 LOCv1/workflow.pb.gogo.temporal.io/server/api/enums/v1/workflow_task_type.pb.go · 148 LOCv1/workflow_task_type.pb…go.temporal.io/server/api/errordetails/v1/message.pb.go · 649 LOCv1/message.pb.gogo.temporal.io/server/api/health/v1/message.pb.go · 324 LOCv1/message.pb.gogo.temporal.io/server/api/history/v1/message.pb.go · 522 LOCv1/message.pb.gogo.temporal.io/server/api/historyservice/v1/request_response.pb.go · 12003 LOCv1/request_response.pb.g…go.temporal.io/server/api/historyservice/v1/service.pb.go · 452 LOCv1/service.pb.gogo.temporal.io/server/api/matchingservice/v1/request_response.pb.go · 6878 LOCv1/request_response.pb.g…go.temporal.io/server/api/matchingservice/v1/service.pb.go · 274 LOCv1/service.pb.gogo.temporal.io/server/api/metrics/v1/message.pb.go · 128 LOCv1/message.pb.gogo.temporal.io/server/api/namespace/v1/message.pb.go · 138 LOCv1/message.pb.gogo.temporal.io/server/api/persistence/v1/chasm.pb.go · 1215 LOCv1/chasm.pb.gogo.temporal.io/server/api/persistence/v1/chasm_visibility.pb.go · 170 LOCv1/chasm_visibility.pb.g…go.temporal.io/server/api/persistence/v1/cluster_metadata.pb.go · 313 LOCv1/cluster_metadata.pb.g…go.temporal.io/server/api/persistence/v1/executions.pb.go · 5768 LOCv1/executions.pb.gogo.temporal.io/server/api/persistence/v1/history_tree.pb.go · 298 LOCv1/history_tree.pb.gogo.temporal.io/server/api/persistence/v1/hsm.pb.go · 929 LOCv1/hsm.pb.gogo.temporal.io/server/api/persistence/v1/namespaces.pb.go · 560 LOCv1/namespaces.pb.gogo.temporal.io/server/api/persistence/v1/nexus.pb.go · 509 LOCv1/nexus.pb.gogo.temporal.io/server/api/persistence/v1/predicates.go-helpers.pb.go · 413 LOCv1/predicates.go-helpers…go.temporal.io/server/api/persistence/v1/predicates.pb.go · 864 LOCv1/predicates.pb.gogo.temporal.io/server/api/persistence/v1/queue_metadata.pb.go · 129 LOCv1/queue_metadata.pb.gogo.temporal.io/server/api/persistence/v1/queues.pb.go · 641 LOCv1/queues.pb.gogo.temporal.io/server/api/persistence/v1/task_queues.pb.go · 924 LOCv1/task_queues.pb.gogo.temporal.io/server/api/persistence/v1/tasks.pb.go · 870 LOCv1/tasks.pb.gogo.temporal.io/server/api/persistence/v1/update.pb.go · 455 LOCv1/update.pb.gogo.temporal.io/server/api/persistence/v1/workflow_mutable_state.pb.go · 560 LOCv1/workflow_mutable_stat…go.temporal.io/server/api/replication/v1/message.pb.go · 2481 LOCv1/message.pb.gogo.temporal.io/server/api/taskqueue/v1/message.pb.go · 1363 LOCv1/message.pb.gogo.temporal.io/server/api/token/v1/message.pb.go · 809 LOCv1/message.pb.gogo.temporal.io/server/api/visibilityservice/v1/request_response.pb.go · 426 LOCv1/request_response.pb.g…go.temporal.io/server/api/workflow/v1/message.pb.go · 302 LOCv1/message.pb.gogo.temporal.io/server/chasm/library.go · 60 LOCchasm/library.gogo.temporal.io/server/chasm/registrable_component.go · 233 LOCchasm/registrable_compon…go.temporal.io/server/chasm/search_attribute.go · 525 LOCchasm/search_attribute.g…go.temporal.io/server/common/aggregate/noop_moving_window_average.go · 13 LOCaggregate/noop_moving_wi…go.temporal.io/server/common/backoff/retrypolicy.go · 347 LOCbackoff/retrypolicy.gogo.temporal.io/server/common/build/build.go · 56 LOCbuild/build.gogo.temporal.io/server/common/dynamicconfig/collection.go · 779 LOCdynamicconfig/collection…go.temporal.io/server/common/dynamicconfig/deepcopy.go · 78 LOCdynamicconfig/deepcopy.g…go.temporal.io/server/common/dynamicconfig/gradual_change.go · 196 LOCdynamicconfig/gradual_ch…go.temporal.io/server/common/dynamicconfig/key.go · 21 LOCdynamicconfig/key.gogo.temporal.io/server/common/dynamicconfig/registry.go · 44 LOCdynamicconfig/registry.g…go.temporal.io/server/common/dynamicconfig/setting_gen.go · 1972 LOCdynamicconfig/setting_ge…go.temporal.io/server/common/dynamicconfig/shared_structure.go · 69 LOCdynamicconfig/shared_str…go.temporal.io/server/common/log/tag/tags.go · 1039 LOCtag/tags.gogo.temporal.io/server/common/log/tag/zap_tag.go · 242 LOCtag/zap_tag.gogo.temporal.io/server/common/log/zap_logger.go · 318 LOClog/zap_logger.gogo.temporal.io/server/common/membership/grpc_resolver.go · 169 LOCmembership/grpc_resolver…go.temporal.io/server/common/metrics/defs.go · 76 LOCmetrics/defs.gogo.temporal.io/server/common/metrics/defs_base.go · 30 LOCmetrics/defs_base.gogo.temporal.io/server/common/metrics/noop_impl.go · 58 LOCmetrics/noop_impl.gogo.temporal.io/server/common/metrics/option.go · 21 LOCmetrics/option.gogo.temporal.io/server/common/metrics/registry.go · 75 LOCmetrics/registry.gogo.temporal.io/server/common/payload/payload.go · 127 LOCpayload/payload.gogo.temporal.io/server/common/persistence/noop_health_signal_aggregator.go · 31 LOCpersistence/noop_health_…go.temporal.io/server/common/persistence/visibility/store/elasticsearch/client/client_factory.go · 35 LOCclient/client_factory.gogo.temporal.io/server/common/persistence/visibility/store/elasticsearch/client/client_v7.go · 451 LOCclient/client_v7.gogo.temporal.io/server/common/persistence/visibility/store/elasticsearch/client/config.go · 106 LOCclient/config.gogo.temporal.io/server/common/persistence/visibility/store/elasticsearch/client/logger.go · 33 LOCclient/logger.gogo.temporal.io/server/common/searchattribute/sadefs/constants.go · 396 LOCsadefs/constants.gogo.temporal.io/server/common/tasks/priority.go · 81 LOCtasks/priority.gogo.temporal.io/server/common/util/wildcard.go · 50 LOCutil/wildcard.gogo.temporal.io/server/schema/embed.go · 66 LOCschema/embed.gogo.temporal.io/server/service/history/tasks/key.go · 144 LOCtasks/key.gogo.temporal.io/server/tools/elasticsearch/handler.go · 242 LOCelasticsearch/handler.gogo.temporal.io/server/tools/elasticsearch/main.go · 213 LOCelasticsearch/main.gogo.temporal.io/server/tools/elasticsearch/tasks.go · 210 LOCelasticsearch/tasks.goTestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestTSCBWithDynamicSettings · introduced test · go.temporal.io/server/common/circuitbreaker/TestTSCBWithDynamicSettingsTestTSCBWithDynamicSetti…TestDeepCopy_OtherReferenceTypes_Nil · introduced test · go.temporal.io/server/common/dynamicconfig/TestDeepCopy_OtherReferenceTypes_NilTestDeepCopy_OtherRefere…TestMutexMapBaggage · introduced test · go.temporal.io/server/common/metrics/TestBaggageBenchSuite/TestMutexMapBaggageTestMutexMapBaggageTestSyncMapBaggage · introduced test · go.temporal.io/server/common/metrics/TestBaggageBenchSuite/TestSyncMapBaggageTestSyncMapBaggageTestElasticsearchIndexTemplateIsLatest · introduced test · go.temporal.io/server/schema/TestElasticsearchIndexTemplateIsLatestTestElasticsearchIndexTe…TestAPIPrioritiesOrdered · introduced test · go.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIPrioritiesOrderedTestAPIPrioritiesOrderedTestAPIToPriorityMapping · introduced test · go.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIToPriorityMappingTestAPIToPriorityMappingTestSetupSchemaError · introduced test · go.temporal.io/server/tools/elasticsearch/TestMainTestSuite/TestSetupSchemaErrorTestSetupSchemaErrorFocused concept · handler.go ×4 · 61 introduced LOChandler.go ×4

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.

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

go.temporal.io/server/tools/elasticsearch/handler.go 21 introduced LOC · 4 ranges

Open complete file

42
43 // setupSchema creates cluster settings and index template, but not the index
44 > func setupSchema(cli *cli.Context, logger log.Logger) error { handler.go
45 > client, err := createClient(cli, logger)
46 > if err != nil {
47 logger.Error("Unable to read config.", tag.Error(commonschema.NewConfigError(err.Error())))
48 return err
49 }
50
51 > settingsContent := "" handler.go
52 > if !cli.Bool(CLIOptSkipClusterSettings) {
53 > settingsContent, err = schema.ElasticsearchClusterSettings()
54 > if err != nil {
55 logger.Error("Unable to load embedded cluster settings.", tag.Error(err))
56 return err
58 }
59
60 > templateContent, err := schema.ElasticsearchIndexTemplate() handler.go
61 > if err != nil {
62 logger.Error("Unable to load embedded index template.", tag.Error(err))
63 return err
64 }
65
66 > task := SetupTask{ handler.go
67 > esClient: client,
68 > logger: logger,
69 > config: &SetupConfig{
70 > SettingsContent: settingsContent,
71 > TemplateContent: templateContent,
72 > VisibilityIndex: "", // Don't create index in setup-schema
73 > FailSilently: cli.Bool(CLIOptFailSilently),
74 > },
75 > }
76 >
77 > return task.RunSchemaSetup()
78 }
79
go.temporal.io/server/tools/elasticsearch/tasks.go 19 introduced LOC · 4 ranges

Open complete file

29
30 // setupClusterSettings handles cluster settings configuration
31 > func (task *SetupTask) setupClusterSettings() error { tasks.go
32 > config := task.config
33 > if len(config.SettingsContent) == 0 {
34 task.logger.Info("Skipping cluster settings update")
35 return nil
36 }
37
38 > success, err := task.esClient.ClusterPutSettings(context.TODO(), config.SettingsContent) tasks.go
39 > if err != nil {
40 > return task.handleOperationFailure("cluster settings update failed", err)
41 > } else if !success {
42 return task.handleOperationFailure("cluster settings update failed without error", errors.New("acknowledged=false"))
43 }
94
95 // RunSchemaSetup runs only cluster settings and template setup (no index creation)
96 > func (task *SetupTask) RunSchemaSetup() error { tasks.go
97 > task.logger.Info("Starting schema setup (cluster settings and template)", tag.Any("config", task.config))
98 >
99 > if err := task.setupClusterSettings(); err != nil {
100 > task.logger.Error("Failed to setup cluster settings.", tag.Error(err))
101 > return err
102 > }
103
104 if err := task.setupTemplate(); err != nil {
201
202 // handleOperationFailure handles operation failures, optionally failing silently
203 > func (task *SetupTask) handleOperationFailure(msg string, err error) error { tasks.go
204 > if !task.config.FailSilently {
205 > task.logger.Error(msg, tag.Error(err))
206 > return err
207 > }
208 task.logger.Warn(msg, tag.Error(err))
209 return nil
go.temporal.io/server/common/persistence/visibility/store/elasticsearch/client/client_v7.go 11 introduced LOC · 1 range

Open complete file

287 }
288
289 > func (c *clientImpl) ClusterPutSettings(ctx context.Context, bodyString string) (bool, error) { client_v7.go
290 > // Use raw HTTP request since ClusterPutSettings is not available in olivere/elastic v7
291 > resp, err := c.esClient.PerformRequest(ctx, elastic.PerformRequestOptions{
292 > Method: "PUT",
293 > Path: "/_cluster/settings",
294 > Body: bodyString,
295 > ContentType: "application/json",
296 > })
297 > if err != nil {
298 > return false, err
299 > }
300
301 // Parse the response to check if it was acknowledged
go.temporal.io/server/schema/embed.go 4 introduced LOC · 2 ranges

Open complete file

49
50 // ElasticsearchClusterSettings returns the embedded cluster settings for Elasticsearch v7
51 > func ElasticsearchClusterSettings() (string, error) { embed.go
52 > data, err := assets.ReadFile("elasticsearch/visibility/cluster_settings_v7.json")
53 > if err != nil {
54 return "", err
55 }
56 > return string(data), nil embed.go
57 }
58
go.temporal.io/server/common/persistence/visibility/store/elasticsearch/client/logger.go 3 introduced LOC · 1 range

Open complete file

21 }
22
23 > func (l *errorLogger) Printf(format string, v ...any) { logger.go
24 > l.Error(fmt.Sprintf(format, v...))
25 > }
26
27 func newInfoLogger(logger log.Logger) *infoLogger {
go.temporal.io/server/tools/elasticsearch/main.go 3 introduced LOC · 1 range

Open complete file

136 },
137 Action: func(c *cli.Context) error {
138 > cliHandler(c, setupSchema, logger) main.go
139 > return nil
140 > },
141 },
142 {