@temporalio/core-bridge 1.9.2 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/Cargo.lock +754 -473
  2. package/Cargo.toml +3 -3
  3. package/lib/index.d.ts +33 -2
  4. package/lib/index.js.map +1 -1
  5. package/package.json +4 -4
  6. package/releases/aarch64-apple-darwin/index.node +0 -0
  7. package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
  8. package/releases/x86_64-apple-darwin/index.node +0 -0
  9. package/releases/x86_64-pc-windows-msvc/index.node +0 -0
  10. package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
  11. package/scripts/build.js +4 -3
  12. package/sdk-core/.cargo/config.toml +2 -4
  13. package/sdk-core/.github/workflows/heavy.yml +1 -1
  14. package/sdk-core/.github/workflows/per-pr.yml +6 -4
  15. package/sdk-core/Cargo.toml +10 -3
  16. package/sdk-core/README.md +4 -6
  17. package/sdk-core/client/Cargo.toml +13 -5
  18. package/sdk-core/client/src/lib.rs +123 -34
  19. package/sdk-core/client/src/metrics.rs +70 -18
  20. package/sdk-core/client/src/proxy.rs +85 -0
  21. package/sdk-core/client/src/raw.rs +67 -5
  22. package/sdk-core/client/src/worker_registry/mod.rs +5 -3
  23. package/sdk-core/client/src/workflow_handle/mod.rs +3 -1
  24. package/sdk-core/core/Cargo.toml +31 -37
  25. package/sdk-core/core/src/abstractions/take_cell.rs +3 -3
  26. package/sdk-core/core/src/abstractions.rs +176 -108
  27. package/sdk-core/core/src/core_tests/activity_tasks.rs +4 -13
  28. package/sdk-core/core/src/core_tests/determinism.rs +2 -1
  29. package/sdk-core/core/src/core_tests/local_activities.rs +3 -3
  30. package/sdk-core/core/src/core_tests/mod.rs +3 -3
  31. package/sdk-core/core/src/core_tests/queries.rs +42 -5
  32. package/sdk-core/core/src/core_tests/workers.rs +2 -3
  33. package/sdk-core/core/src/core_tests/workflow_tasks.rs +115 -15
  34. package/sdk-core/core/src/ephemeral_server/mod.rs +109 -136
  35. package/sdk-core/core/src/internal_flags.rs +8 -8
  36. package/sdk-core/core/src/lib.rs +16 -11
  37. package/sdk-core/core/src/pollers/mod.rs +11 -5
  38. package/sdk-core/core/src/pollers/poll_buffer.rs +48 -29
  39. package/sdk-core/core/src/protosext/mod.rs +32 -32
  40. package/sdk-core/core/src/protosext/protocol_messages.rs +14 -24
  41. package/sdk-core/core/src/retry_logic.rs +2 -2
  42. package/sdk-core/core/src/telemetry/log_export.rs +10 -9
  43. package/sdk-core/core/src/telemetry/metrics.rs +233 -330
  44. package/sdk-core/core/src/telemetry/mod.rs +11 -38
  45. package/sdk-core/core/src/telemetry/otel.rs +355 -0
  46. package/sdk-core/core/src/telemetry/prometheus_server.rs +36 -23
  47. package/sdk-core/core/src/test_help/mod.rs +80 -59
  48. package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +6 -6
  49. package/sdk-core/core/src/worker/activities/local_activities.rs +46 -43
  50. package/sdk-core/core/src/worker/activities.rs +45 -46
  51. package/sdk-core/core/src/worker/client/mocks.rs +8 -7
  52. package/sdk-core/core/src/worker/client.rs +40 -39
  53. package/sdk-core/core/src/worker/mod.rs +72 -42
  54. package/sdk-core/core/src/worker/slot_provider.rs +28 -28
  55. package/sdk-core/core/src/worker/slot_supplier.rs +1 -0
  56. package/sdk-core/core/src/worker/tuner/fixed_size.rs +52 -0
  57. package/sdk-core/core/src/worker/tuner/resource_based.rs +561 -0
  58. package/sdk-core/core/src/worker/tuner.rs +122 -0
  59. package/sdk-core/core/src/worker/workflow/driven_workflow.rs +6 -6
  60. package/sdk-core/core/src/worker/workflow/history_update.rs +27 -53
  61. package/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +4 -17
  62. package/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +1 -10
  63. package/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +4 -11
  64. package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +17 -35
  65. package/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +0 -8
  66. package/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +1 -5
  67. package/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +0 -5
  68. package/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +0 -5
  69. package/sdk-core/core/src/worker/workflow/machines/mod.rs +0 -14
  70. package/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +0 -5
  71. package/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +0 -5
  72. package/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +1 -10
  73. package/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +3 -10
  74. package/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +12 -8
  75. package/sdk-core/core/src/worker/workflow/machines/update_state_machine.rs +0 -10
  76. package/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +6 -13
  77. package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +27 -37
  78. package/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +3 -14
  79. package/sdk-core/core/src/worker/workflow/managed_run.rs +84 -54
  80. package/sdk-core/core/src/worker/workflow/mod.rs +63 -160
  81. package/sdk-core/core/src/worker/workflow/run_cache.rs +22 -13
  82. package/sdk-core/core/src/worker/workflow/wft_extraction.rs +16 -3
  83. package/sdk-core/core/src/worker/workflow/wft_poller.rs +15 -12
  84. package/sdk-core/core/src/worker/workflow/workflow_stream.rs +39 -78
  85. package/sdk-core/core-api/Cargo.toml +6 -5
  86. package/sdk-core/core-api/src/errors.rs +8 -0
  87. package/sdk-core/core-api/src/telemetry/metrics.rs +75 -4
  88. package/sdk-core/core-api/src/telemetry.rs +7 -1
  89. package/sdk-core/core-api/src/worker.rs +212 -56
  90. package/sdk-core/fsm/Cargo.toml +3 -0
  91. package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +1 -1
  92. package/sdk-core/sdk/Cargo.toml +5 -7
  93. package/sdk-core/sdk/src/app_data.rs +3 -3
  94. package/sdk-core/sdk/src/lib.rs +5 -3
  95. package/sdk-core/sdk/src/workflow_context/options.rs +1 -1
  96. package/sdk-core/sdk/src/workflow_context.rs +10 -9
  97. package/sdk-core/sdk/src/workflow_future.rs +1 -1
  98. package/sdk-core/sdk-core-protos/Cargo.toml +8 -6
  99. package/sdk-core/sdk-core-protos/build.rs +1 -10
  100. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/PULL_REQUEST_TEMPLATE.md +3 -0
  101. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/ci.yml +26 -0
  102. package/sdk-core/sdk-core-protos/protos/api_upstream/Makefile +42 -20
  103. package/sdk-core/sdk-core-protos/protos/api_upstream/README.md +2 -0
  104. package/sdk-core/sdk-core-protos/protos/api_upstream/api-linter.yaml +36 -26
  105. package/sdk-core/sdk-core-protos/protos/api_upstream/buf.lock +2 -0
  106. package/sdk-core/sdk-core-protos/protos/api_upstream/google/protobuf/struct.proto +95 -0
  107. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv2.json +9632 -0
  108. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml +7337 -0
  109. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/payload_description.txt +2 -0
  110. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/command/v1/message.proto +45 -11
  111. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/common/v1/message.proto +22 -4
  112. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/command_type.proto +2 -0
  113. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/common.proto +44 -0
  114. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/event_type.proto +18 -3
  115. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +20 -0
  116. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +30 -0
  117. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/update.proto +7 -8
  118. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/workflow.proto +23 -5
  119. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/errordetails/v1/message.proto +20 -0
  120. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/failure/v1/message.proto +25 -0
  121. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto +141 -15
  122. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/namespace/v1/message.proto +12 -0
  123. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto +193 -0
  124. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +73 -6
  125. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +46 -4
  126. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/schedule/v1/message.proto +4 -0
  127. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/workflow_metadata.proto +2 -2
  128. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +116 -0
  129. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto +134 -0
  130. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +274 -29
  131. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +57 -1
  132. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +10 -12
  133. package/sdk-core/sdk-core-protos/src/history_builder.rs +1 -1
  134. package/sdk-core/sdk-core-protos/src/lib.rs +54 -51
  135. package/sdk-core/sdk-core-protos/src/task_token.rs +11 -2
  136. package/sdk-core/test-utils/Cargo.toml +7 -4
  137. package/sdk-core/test-utils/src/histfetch.rs +1 -1
  138. package/sdk-core/test-utils/src/lib.rs +44 -62
  139. package/sdk-core/tests/fuzzy_workflow.rs +5 -2
  140. package/sdk-core/tests/heavy_tests.rs +114 -17
  141. package/sdk-core/tests/integ_tests/activity_functions.rs +1 -1
  142. package/sdk-core/tests/integ_tests/client_tests.rs +2 -2
  143. package/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +38 -26
  144. package/sdk-core/tests/integ_tests/metrics_tests.rs +126 -17
  145. package/sdk-core/tests/integ_tests/polling_tests.rs +118 -2
  146. package/sdk-core/tests/integ_tests/update_tests.rs +3 -5
  147. package/sdk-core/tests/integ_tests/visibility_tests.rs +3 -3
  148. package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +1 -1
  149. package/sdk-core/tests/integ_tests/workflow_tests/appdata_propagation.rs +1 -1
  150. package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +1 -1
  151. package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +1 -1
  152. package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +3 -3
  153. package/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +5 -4
  154. package/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +3 -2
  155. package/sdk-core/tests/integ_tests/workflow_tests/eager.rs +6 -10
  156. package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +9 -7
  157. package/sdk-core/tests/integ_tests/workflow_tests/modify_wf_properties.rs +1 -1
  158. package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +14 -9
  159. package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -1
  160. package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +6 -13
  161. package/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +9 -6
  162. package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +5 -5
  163. package/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +1 -1
  164. package/sdk-core/tests/integ_tests/workflow_tests.rs +115 -11
  165. package/sdk-core/tests/main.rs +2 -2
  166. package/src/conversions.rs +57 -0
  167. package/src/lib.rs +1 -0
  168. package/src/runtime.rs +51 -35
  169. package/ts/index.ts +67 -3
  170. package/sdk-core/core/src/worker/workflow/workflow_stream/saved_wf_inputs.rs +0 -117
  171. package/sdk-core/core/src/worker/workflow/workflow_stream/tonic_status_serde.rs +0 -24
  172. package/sdk-core/sdk/src/payload_converter.rs +0 -11
  173. package/sdk-core/sdk-core-protos/protos/api_upstream/.buildkite/Dockerfile +0 -2
  174. package/sdk-core/sdk-core-protos/protos/api_upstream/.buildkite/docker-compose.yml +0 -15
  175. package/sdk-core/sdk-core-protos/protos/api_upstream/.buildkite/pipeline.yml +0 -10
  176. package/sdk-core/test-utils/src/wf_input_saver.rs +0 -50
  177. package/sdk-core/tests/wf_input_replay.rs +0 -32
@@ -1,12 +1,14 @@
1
+ SHELL=/bin/bash -o pipefail
2
+
1
3
  $(VERBOSE).SILENT:
2
4
  ############################# Main targets #############################
3
- ci-build: install proto
5
+ ci-build: install proto http-api-docs
4
6
 
5
7
  # Install dependencies.
6
8
  install: grpc-install api-linter-install buf-install
7
9
 
8
10
  # Run all linters and compile proto files.
9
- proto: grpc
11
+ proto: grpc http-api-docs
10
12
  ########################################################################
11
13
 
12
14
  ##### Variables ######
@@ -20,16 +22,6 @@ STAMPDIR := .stamp
20
22
 
21
23
  COLOR := "\e[1;36m%s\e[0m\n"
22
24
 
23
- # Only prints output if the exit code is non-zero
24
- define silent_exec
25
- @output=$$($(1) 2>&1); \
26
- status=$$?; \
27
- if [ $$status -ne 0 ]; then \
28
- echo "$$output"; \
29
- fi; \
30
- exit $$status
31
- endef
32
-
33
25
  PROTO_ROOT := .
34
26
  PROTO_FILES = $(shell find temporal -name "*.proto")
35
27
  PROTO_DIRS = $(sort $(dir $(PROTO_FILES)))
@@ -38,6 +30,9 @@ PROTO_IMPORTS = \
38
30
  -I=$(PROTO_ROOT)
39
31
  PROTO_PATHS = paths=source_relative:$(PROTO_OUT)
40
32
 
33
+ OAPI_OUT := openapi
34
+ OAPI3_PATH := .components.schemas.Payload
35
+
41
36
  $(PROTO_OUT):
42
37
  mkdir $(PROTO_OUT)
43
38
 
@@ -46,27 +41,54 @@ grpc: buf-lint api-linter buf-breaking clean go-grpc fix-path
46
41
 
47
42
  go-grpc: clean $(PROTO_OUT)
48
43
  printf $(COLOR) "Compile for go-gRPC..."
49
- $(foreach PROTO_DIR,$(PROTO_DIRS),\
50
- protoc --fatal_warnings $(PROTO_IMPORTS) \
51
- --go_out=$(PROTO_PATHS) \
52
- --grpc-gateway_out=allow_patch_feature=false,$(PROTO_PATHS)\
53
- --doc_out=html,index.html,source_relative:$(PROTO_OUT) \
54
- $(PROTO_DIR)*.proto;)
44
+ protogen \
45
+ --root=$(PROTO_ROOT) \
46
+ --output=$(PROTO_OUT) \
47
+ --exclude=internal \
48
+ --exclude=proto/api/google \
49
+ -I $(PROTO_ROOT) \
50
+ -p go-grpc_out=$(PROTO_PATHS) \
51
+ -p grpc-gateway_out=allow_patch_feature=false,$(PROTO_PATHS) \
52
+ -p doc_out=html,index.html,source_relative:$(PROTO_OUT)
55
53
 
56
54
  fix-path:
57
55
  mv -f $(PROTO_OUT)/temporal/api/* $(PROTO_OUT) && rm -rf $(PROTO_OUT)/temporal
58
56
 
57
+ # We need to rewrite bits of this to support our shorthand payload format
58
+ # We use both yq and jq here as they preserve comments and the ordering of the original
59
+ # document
60
+ http-api-docs:
61
+ protoc -I $(PROTO_ROOT) \
62
+ --openapi_out=$(OAPI_OUT) \
63
+ --openapi_opt=enum_type=string \
64
+ --openapiv2_out=openapi \
65
+ --openapiv2_opt=allow_merge=true,merge_file_name=openapiv2,simple_operation_ids=true \
66
+ temporal/api/workflowservice/v1/* \
67
+ temporal/api/operatorservice/v1/*
68
+
69
+ jq --rawfile desc $(OAPI_OUT)/payload_description.txt < $(OAPI_OUT)/openapiv2.swagger.json '.definitions.v1Payload={description: $$desc}' > $(OAPI_OUT)/v2.tmp
70
+ mv -f $(OAPI_OUT)/v2.tmp $(OAPI_OUT)/openapiv2.json
71
+ rm -f $(OAPI_OUT)/openapiv2.swagger.json
72
+ DESC=$$(cat $(OAPI_OUT)/payload_description.txt) yq e -i '$(OAPIV3_PATH).description = strenv(DESC) | del($(OAPI3_PATH).type) | del($(OAPI3_PATH).properties)' $(OAPI_OUT)/openapi.yaml
73
+ yq e -i '(.paths[] | .[] | .operationId) |= sub("\w+_(.*)", "$$1")' $(OAPI_OUT)/openapi.yaml
74
+ mv -f $(OAPI_OUT)/openapi.yaml $(OAPI_OUT)/openapiv3.yaml
75
+
59
76
  ##### Plugins & tools #####
60
77
  grpc-install:
61
78
  @printf $(COLOR) "Install/update protoc and plugins..."
79
+ @go install go.temporal.io/api/cmd/protogen@latest
62
80
  @go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
63
81
  @go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
64
82
  @go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
65
83
  @go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest
84
+ @go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
85
+ @go install github.com/google/gnostic/cmd/protoc-gen-openapi@latest
86
+ @go install github.com/mikefarah/yq/v4@latest
66
87
 
67
88
  api-linter-install:
68
89
  printf $(COLOR) "Install/update api-linter..."
69
90
  go install github.com/googleapis/api-linter/cmd/api-linter@v1.32.3
91
+ go install github.com/itchyny/gojq/cmd/gojq@v0.12.14
70
92
 
71
93
  buf-install:
72
94
  printf $(COLOR) "Install/update buf..."
@@ -75,7 +97,7 @@ buf-install:
75
97
  ##### Linters #####
76
98
  api-linter:
77
99
  printf $(COLOR) "Run api-linter..."
78
- $(call silent_exec, api-linter --set-exit-status $(PROTO_IMPORTS) --config $(PROTO_ROOT)/api-linter.yaml $(PROTO_FILES))
100
+ @api-linter --set-exit-status $(PROTO_IMPORTS) --config $(PROTO_ROOT)/api-linter.yaml --output-format json $(PROTO_FILES) | gojq -r 'map(select(.problems != []) | . as $$file | .problems[] | {rule: .rule_doc_uri, location: "\($$file.file_path):\(.location.start_position.line_number)"}) | group_by(.rule) | .[] | .[0].rule + ":\n" + (map("\t" + .location) | join("\n"))'
79
101
 
80
102
  $(STAMPDIR):
81
103
  mkdir $@
@@ -91,7 +113,7 @@ buf-lint: $(STAMPDIR)/buf-mod-prune
91
113
 
92
114
  buf-breaking:
93
115
  @printf $(COLOR) "Run buf breaking changes check against master branch..."
94
- @(cd $(PROTO_ROOT) && buf breaking --against '.git#branch=master')
116
+ @(cd $(PROTO_ROOT) && buf breaking --against 'https://github.com/temporalio/api.git#branch=master')
95
117
 
96
118
  ##### Clean #####
97
119
  clean:
@@ -1,5 +1,7 @@
1
1
  # Temporal proto files
2
2
 
3
+ This repository contains both the protobuf descriptors and OpenAPI documentation for the Temporal platform.
4
+
3
5
  ## How to use
4
6
 
5
7
  Install as git submodule to the project.
@@ -1,54 +1,64 @@
1
1
  - included_paths:
2
2
  - "**/*.proto"
3
3
  disabled_rules:
4
- - "core::0192::has-comments"
4
+ - "core::0122::name-suffix" # Allow fields to have a "_name" suffix -- https://linter.aip.dev/122/name-suffix
5
+ - "core::0140::uri" # We use "URL" instead of "URI" in many places. -- https://linter.aip.dev/140/uri
6
+ - "core::0192::has-comments" # Don't require comments on every field. -- https://linter.aip.dev/192/has-comments
7
+ - "core::0203::required" # We don't use resource annotations -- https://linter.aip.dev/203/required
8
+ - "core::0203::optional" # Same rationale as `core::0203::required` -- https://linter.aip.dev/203/optional
5
9
 
6
10
  - included_paths:
7
11
  - "**/message.proto"
8
12
  disabled_rules:
9
- - "core::0122::name-suffix"
10
- - "core::0123::resource-annotation"
13
+ - "core::0123::resource-annotation" # We don't require resource annotations on all messages -- https://linter.aip.dev/123/resource-annotation
11
14
 
12
15
  - included_paths:
13
16
  - "**/workflowservice/v1/request_response.proto"
14
17
  - "**/operatorservice/v1/request_response.proto"
15
18
  disabled_rules:
16
- - "core::0122::name-suffix"
17
- - "core::0131::request-name-required"
18
- - "core::0131::request-unknown-fields"
19
- - "core::0132::request-parent-required"
20
- - "core::0132::request-unknown-fields"
21
- - "core::0132::response-unknown-fields"
22
- - "core::0134::request-unknown-fields"
23
- - "core::0158::request-page-size-field"
24
- - "core::0158::request-page-token-field"
25
- - "core::0158::response-next-page-token-field"
26
- - "core::0158::response-plural-first-field"
27
- - "core::0158::response-repeated-first-field"
19
+ - "core::0131::request-name-behavior" # We don't add non-HTTP annotations -- https://linter.aip.dev/131/request-name-behavior
20
+ - "core::0131::request-name-reference" # We don't add non-HTTP annotations -- https://linter.aip.dev/131/request-name-reference
21
+ - "core::0131::request-name-required" # Don't require the `name` field in RPCs -- https://linter.aip.dev/131/request-name-required
22
+ - "core::0131::request-unknown-fields" # Allow things other than `name`, like `namespace`, in RPCs. This could've been `parent`, but that ship has sailed. -- https://linter.aip.dev/131/request-unknown-fields
23
+ - "core::0132::request-parent-required" # Don't require the `parent` field in List RPCs -- https://linter.aip.dev/132/request-parent-required
24
+ - "core::0132::request-unknown-fields" # Same rationale as `core::0131::request-unknown-fields`, but for List RPCs -- https://linter.aip.dev/132/request-unknown-fields
25
+ - "core::0132::response-unknown-fields" # We have a lot of List APIs which have more than just X's in the response. -- https://linter.aip.dev/132/response-unknown-fields
26
+ - "core::0133::request-parent-required" # Same rationale as `core::0132::request-parent-required`, but for Create RPCs -- https://linter.aip.dev/133/request-parent-required
27
+ - "core::0133::request-resource-behavior" # We don't add non-HTTP annotations -- https://linter.aip.dev/133/request-resource-behavior
28
+ - "core::0133::request-resource-field" # We don't add non-HTTP annotations -- https://linter.aip.dev/133/request-resource-field
29
+ - "core::0133::request-unknown-fields" # Same rationale as `core::0131::request-unknown-fields`, but for Create RPCs -- https://linter.aip.dev/133/request-unknown-fields
30
+ - "core::0134::request-mask-required" # We don't support an update mask in any of our APIs -- https://linter.aip.dev/134/request-mask-required
31
+ - "core::0134::request-resource-required" # We don't add non-HTTP annotations -- https://linter.aip.dev/134/request-resource-required
32
+ - "core::0134::request-unknown-fields" # Same rationale as `core::0131::request-unknown-fields`, but for Update RPCs -- https://linter.aip.dev/134/request-unknown-fields
33
+ - "core::0135::request-name-behavior" # We don't add non-HTTP annotations -- https://linter.aip.dev/135/request-name-behavior
34
+ - "core::0135::request-name-reference" # We don't add non-HTTP annotations -- https://linter.aip.dev/135/request-name-reference
35
+ - "core::0135::request-name-required" # Allow objects to be identified with something other than `name` -- https://linter.aip.dev/135/request-name-required
36
+ - "core::0135::request-unknown-fields" # Same rationale as `core::0131::request-unknown-fields`, but for Delete RPCs -- https://linter.aip.dev/135/request-unknown-fields
37
+ - "core::0158::request-page-size-field" # Allow "maximum_page_size" instead of "page_size" in requests, and allow non-paginated List RPCs -- https://linter.aip.dev/158/response-next-page-token-field
38
+ - "core::0158::request-page-token-field" # Allow "next_page_token" instead of "page_token" in requests, and allow non-paginated List RPCs -- https://linter.aip.dev/158/response-next-page-token-field
39
+ - "core::0158::response-next-page-token-field" # Allow for page tokens to be byte arrays instead of strings, and allow non-paginated List RPCs -- https://linter.aip.dev/158/response-next-page-token-field
40
+ - "core::0158::response-plural-first-field" # We have many APIs where we use "next_page_token" instead of "page_token" in the request. For some reason, that causes AIP to enforce some response-specific linter rules like this one. -- https://linter.aip.dev/158/response-plural-first-field
41
+ - "core::0158::response-repeated-first-field" # Same rationale as `core::0158::response-plural-first-field` -- https://linter.aip.dev/158/response-repeated-first-field
28
42
 
29
43
  - included_paths:
30
44
  - "**/workflowservice/v1/service.proto"
31
45
  - "**/operatorservice/v1/service.proto"
32
46
  disabled_rules:
33
- # We extract specific fields in URL since the gRPC API predates the HTTP API
34
- - "core::0127::resource-name-extraction"
47
+ - "core::0127::resource-name-extraction" # We extract specific fields in URL since the gRPC API predates the HTTP API -- https://linter.aip.dev/127/resource-name-extraction
35
48
 
36
49
  # We do not require specific "Get", "Create", "Update", or "Delete" RPC
37
50
  # rules just because we happen to use a known RPC name prefix
38
- - "core::0131"
39
- - "core::0133"
40
- - "core::0134"
41
- - "core::0135"
51
+ - "core::0131" # https://linter.aip.dev/0131
52
+ - "core::0133" # https://linter.aip.dev/0133
53
+ - "core::0134" # https://linter.aip.dev/0134
54
+ - "core::0135" # https://linter.aip.dev/0135
42
55
 
43
- # We don't require HTTP calls to be suffixed with the same name as the gRPC
44
- # name
45
- - "core::0136::http-uri-suffix"
56
+ - "core::0136::http-uri-suffix" # We don't require HTTP calls to be suffixed with the same name as the gRPC name -- https://linter.aip.dev/136/http-uri-suffix
46
57
 
47
58
  - included_paths:
48
59
  - "**/operatorservice/v1/service.proto"
49
60
  disabled_rules:
50
- # Do not require HTTP annotations on OperatorService calls at this time
51
- - "core::0127::http-annotation"
61
+ - "core::0127::http-annotation" # Do not require HTTP annotations on OperatorService calls at this time -- https://linter.aip.dev/127/http-annotation
52
62
 
53
63
  - included_paths:
54
64
  - "google/**/*.proto"
@@ -5,7 +5,9 @@ deps:
5
5
  owner: googleapis
6
6
  repository: googleapis
7
7
  commit: 28151c0d0a1641bf938a7672c500e01d
8
+ digest: shake256:49215edf8ef57f7863004539deff8834cfb2195113f0b890dd1f67815d9353e28e668019165b9d872395871eeafcbab3ccfdb2b5f11734d3cca95be9e8d139de
8
9
  - remote: buf.build
9
10
  owner: grpc-ecosystem
10
11
  repository: grpc-gateway
11
12
  commit: 048ae6ff94ca4476b3225904b1078fad
13
+ digest: shake256:e5250bf2d999516c02206d757502b902e406f35c099d0e869dc3e4f923f6870fe0805a9974c27df0695462937eae90cd4d9db90bb9a03489412560baa74a87b6
@@ -0,0 +1,95 @@
1
+ // Protocol Buffers - Google's data interchange format
2
+ // Copyright 2008 Google Inc. All rights reserved.
3
+ // https://developers.google.com/protocol-buffers/
4
+ //
5
+ // Redistribution and use in source and binary forms, with or without
6
+ // modification, are permitted provided that the following conditions are
7
+ // met:
8
+ //
9
+ // * Redistributions of source code must retain the above copyright
10
+ // notice, this list of conditions and the following disclaimer.
11
+ // * Redistributions in binary form must reproduce the above
12
+ // copyright notice, this list of conditions and the following disclaimer
13
+ // in the documentation and/or other materials provided with the
14
+ // distribution.
15
+ // * Neither the name of Google Inc. nor the names of its
16
+ // contributors may be used to endorse or promote products derived from
17
+ // this software without specific prior written permission.
18
+ //
19
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ syntax = "proto3";
32
+
33
+ package google.protobuf;
34
+
35
+ option cc_enable_arenas = true;
36
+ option go_package = "google.golang.org/protobuf/types/known/structpb";
37
+ option java_package = "com.google.protobuf";
38
+ option java_outer_classname = "StructProto";
39
+ option java_multiple_files = true;
40
+ option objc_class_prefix = "GPB";
41
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
42
+
43
+ // `Struct` represents a structured data value, consisting of fields
44
+ // which map to dynamically typed values. In some languages, `Struct`
45
+ // might be supported by a native representation. For example, in
46
+ // scripting languages like JS a struct is represented as an
47
+ // object. The details of that representation are described together
48
+ // with the proto support for the language.
49
+ //
50
+ // The JSON representation for `Struct` is JSON object.
51
+ message Struct {
52
+ // Unordered map of dynamically typed values.
53
+ map<string, Value> fields = 1;
54
+ }
55
+
56
+ // `Value` represents a dynamically typed value which can be either
57
+ // null, a number, a string, a boolean, a recursive struct value, or a
58
+ // list of values. A producer of value is expected to set one of these
59
+ // variants. Absence of any variant indicates an error.
60
+ //
61
+ // The JSON representation for `Value` is JSON value.
62
+ message Value {
63
+ // The kind of value.
64
+ oneof kind {
65
+ // Represents a null value.
66
+ NullValue null_value = 1;
67
+ // Represents a double value.
68
+ double number_value = 2;
69
+ // Represents a string value.
70
+ string string_value = 3;
71
+ // Represents a boolean value.
72
+ bool bool_value = 4;
73
+ // Represents a structured value.
74
+ Struct struct_value = 5;
75
+ // Represents a repeated `Value`.
76
+ ListValue list_value = 6;
77
+ }
78
+ }
79
+
80
+ // `NullValue` is a singleton enumeration to represent the null value for the
81
+ // `Value` type union.
82
+ //
83
+ // The JSON representation for `NullValue` is JSON `null`.
84
+ enum NullValue {
85
+ // Null value.
86
+ NULL_VALUE = 0;
87
+ }
88
+
89
+ // `ListValue` is a wrapper around a repeated field of values.
90
+ //
91
+ // The JSON representation for `ListValue` is JSON array.
92
+ message ListValue {
93
+ // Repeated field of dynamically typed values.
94
+ repeated Value values = 1;
95
+ }