consul/agent/xds
Matt Keeler 085c0addc0
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
..
accesslogs [OSS] feat: access logs for listeners and listener filters (#15864) 2022-12-22 15:18:15 -05:00
extensionruntime refactor: remove troubleshoot module dependency on consul top level module (#16162) 2023-02-06 09:14:35 -08:00
testcommon Inline API Gateway TLS cert code (#16295) 2023-02-17 12:46:03 -05:00
testdata Inline API Gateway TLS cert code (#16295) 2023-02-17 12:46:03 -05:00
validateupstream-test troubleshoot: fixes and updated messages (#16294) 2023-02-17 07:43:05 -08:00
clusters.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
clusters_test.go refactor: remove troubleshoot module dependency on consul top level module (#16162) 2023-02-06 09:14:35 -08:00
config.go Protobuf Modernization (#15949) 2023-01-11 09:39:10 -05:00
config_test.go Add support for configuring Envoys route idle_timeout (#14340) 2022-11-29 17:43:15 -05:00
delta.go Inline API Gateway TLS cert code (#16295) 2023-02-17 12:46:03 -05:00
delta_envoy_extender_oss_test.go feat: envoy extension - http local rate limit (#16196) 2023-02-07 21:56:15 -05:00
delta_test.go refactor: remove troubleshoot module dependency on consul top level module (#16162) 2023-02-06 09:14:35 -08:00
endpoints.go Fix mesh gateways incorrectly matching peer locality. (#16257) 2023-02-16 09:22:41 -06:00
endpoints_test.go refactor: remove troubleshoot module dependency on consul top level module (#16162) 2023-02-06 09:14:35 -08:00
failover_math.go xds: default to speaking xDS v3, but allow for v2 to be spoken upon request (#9658) 2021-02-26 16:23:15 -06:00
failover_math_test.go Cluster peering failover disco chain changes (#14296) 2022-08-23 09:13:43 -04:00
golden_test.go refactor: move service to service validation to troubleshoot package (#16132) 2023-02-02 22:18:10 -08:00
listeners.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
listeners_ingress.go Inline API Gateway TLS cert code (#16295) 2023-02-17 12:46:03 -05:00
listeners_test.go Inline API Gateway TLS cert code (#16295) 2023-02-17 12:46:03 -05:00
naming.go
net_fallback.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
net_linux.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
protocol_trace.go Protobuf Modernization (#15949) 2023-01-11 09:39:10 -05:00
rbac.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
rbac_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
resources.go Inline API Gateway TLS cert code (#16295) 2023-02-17 12:46:03 -05:00
resources_oss_test.go xds: begin refactor to always pass test snapshots through all xDS types (#13461) 2022-06-15 14:58:28 -05:00
resources_test.go Inline API Gateway TLS cert code (#16295) 2023-02-17 12:46:03 -05:00
response.go Protobuf Modernization (#15949) 2023-01-11 09:39:10 -05:00
routes.go API Gateway to Ingress Gateway Snapshot Translation and Routes to Virtual Routers and Splitters (#16127) 2023-02-09 17:58:55 +00:00
routes_test.go refactor: remove troubleshoot module dependency on consul top level module (#16162) 2023-02-06 09:14:35 -08:00
secrets.go Inline API Gateway TLS cert code (#16295) 2023-02-17 12:46:03 -05:00
server.go Implement APIGateway proxycfg snapshot (#16194) 2023-02-08 15:52:12 -06:00
server_oss.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
testing.go Fix panicky xDS test flakes (#16305) 2023-02-17 14:07:49 -05:00
xds.go
xds_protocol_helpers_test.go Update token language to distinguish Accessor and Secret ID usage (#16044) 2023-02-07 12:26:30 -06:00
z_xds_packages.go Add connection limit setting to service defaults 2022-05-24 10:13:38 -07:00
z_xds_packages_test.go Protobuf Modernization (#15949) 2023-01-11 09:39:10 -05:00