open-consul/agent/structs
Matt Keeler f3c80c4eef
Protobuf Refactoring for Multi-Module Cleanliness (#16302)
Protobuf Refactoring for Multi-Module Cleanliness

This commit includes the following:

Moves all packages that were within proto/ to proto/private
Rewrites imports to account for the packages being moved
Adds in buf.work.yaml to enable buf workspaces
Names the proto-public buf module so that we can override the Go package imports within proto/buf.yaml
Bumps the buf version dependency to 1.14.0 (I was trying out the version to see if it would get around an issue - it didn't but it also doesn't break things and it seemed best to keep up with the toolchain changes)

Why:

In the future we will need to consume other protobuf dependencies such as the Google HTTP annotations for openapi generation or grpc-gateway usage.
There were some recent changes to have our own ratelimiting annotations.
The two combined were not working when I was trying to use them together (attempting to rebase another branch)
Buf workspaces should be the solution to the problem
Buf workspaces means that each module will have generated Go code that embeds proto file names relative to the proto dir and not the top level repo root.
This resulted in proto file name conflicts in the Go global protobuf type registry.
The solution to that was to add in a private/ directory into the path within the proto/ directory.
That then required rewriting all the imports.

Is this safe?

AFAICT yes
The gRPC wire protocol doesn't seem to care about the proto file names (although the Go grpc code does tack on the proto file name as Metadata in the ServiceDesc)
Other than imports, there were no changes to any generated code as a result of this.
2023-02-17 16:14:46 -05:00
..
aclfilter Remove legacy acl policies (#15922) 2023-02-06 15:35:52 +00:00
acl.go Update token language to distinguish Accessor and Secret ID usage (#16044) 2023-02-07 12:26:30 -06:00
acl_cache.go acl: gRPC login and logout endpoints (#12935) 2022-05-04 17:38:45 +01:00
acl_cache_test.go acl: gRPC login and logout endpoints (#12935) 2022-05-04 17:38:45 +01:00
acl_oss.go Manual Structs fixup 2022-04-05 14:51:10 -07:00
acl_test.go Remove legacy acl policies (#15922) 2023-02-06 15:35:52 +00:00
auto_encrypt.go
autopilot.go
autopilot_oss.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
catalog.go Manual Structs fixup 2022-04-05 14:51:10 -07:00
catalog_oss.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
check_definition.go feat: windows service health checks 2022-06-07 18:27:14 +01:00
check_definition_test.go feat: windows service health checks 2022-06-07 18:27:14 +01:00
check_type.go feat: windows service health checks 2022-06-07 18:27:14 +01:00
config_entry.go [OSS] Add Peer field to service-defaults upstream overrides (#15956) 2023-02-03 10:51:53 -05:00
config_entry_discoverychain.go Add support for configuring Envoys route idle_timeout (#14340) 2022-11-29 17:43:15 -05:00
config_entry_discoverychain_oss.go Add `Targets` field to service resolver failovers. (#14162) 2022-08-15 09:20:25 -04:00
config_entry_discoverychain_oss_test.go Update the structs and discovery chain for service resolver redirects to cluster peers. (#14366) 2022-08-29 09:51:32 -04:00
config_entry_discoverychain_test.go Remove legacy acl policies (#15922) 2023-02-06 15:35:52 +00:00
config_entry_export_oss_test.go Rename `PeerName` to `Peer` on prepared queries and exported services (#14854) 2022-10-04 14:46:15 -04:00
config_entry_exports.go Rename `PeerName` to `Peer` on prepared queries and exported services (#14854) 2022-10-04 14:46:15 -04:00
config_entry_exports_test.go Rename `PeerName` to `Peer` on prepared queries and exported services (#14854) 2022-10-04 14:46:15 -04:00
config_entry_gateways.go Add stricter validation and some normalization code for API Gateway ConfigEntries (#16304) 2023-02-17 19:22:01 +00:00
config_entry_gateways_test.go Add additional controller implementations (#16188) 2023-02-08 14:50:17 -05:00
config_entry_inline_certificate.go Add stricter validation and some normalization code for API Gateway ConfigEntries (#16304) 2023-02-17 19:22:01 +00:00
config_entry_inline_certificate_test.go Add stricter validation and some normalization code for API Gateway ConfigEntries (#16304) 2023-02-17 19:22:01 +00:00
config_entry_intentions.go peering, state: account for peer intentions (#13443) 2022-06-16 10:27:31 -07:00
config_entry_intentions_oss.go Manual Structs fixup 2022-04-05 14:51:10 -07:00
config_entry_intentions_test.go peering, state: account for peer intentions (#13443) 2022-06-16 10:27:31 -07:00
config_entry_mesh.go Update xds generation for peering over mesh gws 2022-10-03 12:42:27 -06:00
config_entry_mesh_oss.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
config_entry_mesh_test.go Update xds generation for peering over mesh gws 2022-10-03 12:42:27 -06:00
config_entry_oss.go peering: initial sync (#12842) 2022-04-21 17:34:40 -05:00
config_entry_oss_test.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
config_entry_routes.go Add stricter validation and some normalization code for API Gateway ConfigEntries (#16304) 2023-02-17 19:22:01 +00:00
config_entry_routes_test.go Add stricter validation and some normalization code for API Gateway ConfigEntries (#16304) 2023-02-17 19:22:01 +00:00
config_entry_status.go Inline API Gateway TLS cert code (#16295) 2023-02-17 12:46:03 -05:00
config_entry_test.go Remove legacy acl policies (#15922) 2023-02-06 15:35:52 +00:00
connect.go Manual Structs fixup 2022-04-05 14:51:10 -07:00
connect_ca.go Update intermediate pki mount/role when reconfiguring Vault provider 2022-09-13 15:42:26 -07:00
connect_ca_test.go
connect_oss.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
connect_proxy_config.go [OSS] feat: access logs for listeners and listener filters (#15864) 2022-12-22 15:18:15 -05:00
connect_proxy_config_oss.go [OSS] Add Peer field to service-defaults upstream overrides (#15956) 2023-02-03 10:51:53 -05:00
connect_proxy_config_test.go [OSS] feat: access logs for listeners and listener filters (#15864) 2022-12-22 15:18:15 -05:00
deep-copy.sh Implement APIGateway proxycfg snapshot (#16194) 2023-02-08 15:52:12 -06:00
discovery_chain.go extensions: refactor serverless plugin to use extensions from config entry fields (#15817) 2022-12-19 12:19:37 -08:00
discovery_chain_oss.go Manual Structs fixup 2022-04-05 14:51:10 -07:00
envoy_extension.go Add extension validation on config save and refactor extensions. (#16110) 2023-01-30 15:35:26 -06:00
errors.go
federation_state.go
identity.go Manual Structs fixup 2022-04-05 14:51:10 -07:00
intention.go Add SourcePeer fields to relevant Intentions types (#13390) 2022-06-08 13:24:10 -04:00
intention_oss.go Manual Structs fixup 2022-04-05 14:51:10 -07:00
intention_test.go Remove legacy acl policies (#15922) 2023-02-06 15:35:52 +00:00
operator.go
peering.go Bring back parameter ServerExternalAddresses in GenerateToken endpoint (#15267) 2022-11-08 14:55:18 -06:00
prepared_query.go Rename `PeerName` to `Peer` on prepared queries and exported services (#14854) 2022-10-04 14:46:15 -04:00
prepared_query_test.go
protobuf_compat.go Regenerate files according to 1.19.2 formatter 2022-10-24 16:12:08 -04:00
service_definition.go peering: Make Upstream peer-aware (#12900) 2022-04-29 18:12:51 -04:00
service_definition_test.go bulk rewrite using this script 2022-01-20 10:46:23 -06:00
snapshot.go
structs.deepcopy.go API Gateway to Ingress Gateway Snapshot Translation and Routes to Virtual Routers and Splitters (#16127) 2023-02-09 17:58:55 +00:00
structs.go Add basic smoke test to make sure an APIGateway runs (#16217) 2023-02-09 11:32:10 -05:00
structs_ext_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
structs_filtering_test.go [OSS] feat: access logs for listeners and listener filters (#15864) 2022-12-22 15:18:15 -05:00
structs_oss.go Add the `operator usage instances` command and api endpoint (#16205) 2023-02-08 12:07:21 -08:00
structs_oss_test.go add new entmeta stuff. 2022-04-05 14:49:31 -07:00
structs_test.go Fixup authz for data imported from peers (#15347) 2022-11-14 11:36:27 -07:00
system_metadata.go Add virtual IP generation for term gateway backed services 2022-01-12 12:08:49 -08:00
testing.go Vendor in rpc mono repo for net/rpc fork, go-msgpack, msgpackrpc. (#12311) 2022-02-14 09:45:45 -08:00
testing_catalog.go Fix mesh gateways incorrectly matching peer locality. (#16257) 2023-02-16 09:22:41 -06:00
testing_connect_proxy_config.go Add additional parameters to envoy passive health check config (#14238) 2022-09-01 09:59:11 -07:00
testing_intention.go
testing_service_definition.go
txn.go