open-consul/agent/consul/state
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
..
acl.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
acl_events.go convert indexSecret to the new index (#11007) 2021-09-10 09:10:11 -04:00
acl_events_test.go acl: global tokens created by auth methods now correctly replicate to secondary datacenters (#9351) 2020-12-09 15:22:29 -06:00
acl_oss.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
acl_oss_test.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
acl_schema.go Remove legacy acl tokens (#15947) 2023-01-27 09:17:07 -06:00
acl_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
autopilot.go state: use ReadTxn and WriteTxn interface 2021-03-29 18:52:16 -04:00
autopilot_test.go Switch to using the external autopilot module 2020-11-09 09:22:11 -05:00
catalog.go Regenerate files according to 1.19.2 formatter 2022-10-24 16:12:08 -04:00
catalog_events.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
catalog_events_oss.go peering: initial sync (#12842) 2022-04-21 17:34:40 -05:00
catalog_events_oss_test.go peering: initial sync (#12842) 2022-04-21 17:34:40 -05:00
catalog_events_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
catalog_oss.go Regenerate files according to 1.19.2 formatter 2022-10-24 16:12:08 -04:00
catalog_oss_test.go Update expected encoding in test 2022-10-20 14:32:42 -04:00
catalog_schema.go Regenerate files according to 1.19.2 formatter 2022-10-24 16:12:08 -04:00
catalog_test.go Merge branch 'main' into catalog-service-list-filter 2022-08-26 11:16:06 -04:00
config_entry.go Implement APIGateway proxycfg snapshot (#16194) 2023-02-08 15:52:12 -06:00
config_entry_events.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
config_entry_events_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
config_entry_intention.go peering, state: account for peer intentions (#13443) 2022-06-16 10:27:31 -07:00
config_entry_intention_oss.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
config_entry_oss.go Regenerate files according to 1.19.2 formatter 2022-10-24 16:12:08 -04:00
config_entry_oss_test.go Rename `PeerName` to `Peer` on prepared queries and exported services (#14854) 2022-10-04 14:46:15 -04:00
config_entry_schema.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
config_entry_test.go chore: update golangci-lint to v1.50.1 (#15022) 2022-10-24 11:48:02 -05:00
connect_ca.go streaming: emit events when Connect CA Roots change (#12590) 2022-03-22 19:13:59 +00:00
connect_ca_events.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
connect_ca_events_test.go Remove legacy acl policies (#15922) 2023-02-06 15:35:52 +00:00
connect_ca_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
coordinate.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
coordinate_oss.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
coordinate_oss_test.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
coordinate_test.go add general runstep test helper instead of copying it all over the place (#13013) 2022-05-10 15:25:51 -05:00
delay_oss.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
delay_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
events.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
events_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
federation_state.go state: use tableIndex constant 2021-03-29 18:52:20 -04:00
graveyard.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
graveyard_oss.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
graveyard_test.go KV state store refactoring and partitioning (#11510) 2021-11-08 09:35:56 -05:00
index_connect_test.go state: convert services table service and connect indexer 2021-03-29 15:42:24 -04:00
indexer.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
intention.go Add a server-only method for updating ConfigEntry Statuses (#16053) 2023-01-27 14:34:11 -05:00
intention_oss.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
intention_test.go peering, state: account for peer intentions (#13443) 2022-06-16 10:27:31 -07:00
kvs.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
kvs_oss.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
kvs_oss_test.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
kvs_test.go KV state store refactoring and partitioning (#11510) 2021-11-08 09:35:56 -05:00
memdb.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
operations_oss.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
peering.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
peering_oss.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
peering_oss_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
peering_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
prepared_query.go refactor session state store tables to use the new index pattern (#11525) 2021-11-08 16:20:50 -05:00
prepared_query_index.go
prepared_query_index_test.go
prepared_query_test.go [OSS] Remove remaining references to master (#11827) 2022-01-20 12:47:50 +00:00
query.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
query_oss.go Add internal endpoint to fetch peered upstream candidates from VirtualIP table (#13642) 2022-06-29 16:34:58 -04:00
schema.go Implement/Utilize secrets for Peering Replication Stream (#13977) 2022-08-01 10:33:18 -04:00
schema_oss.go peering: initial sync (#12842) 2022-04-21 17:34:40 -05:00
schema_oss_test.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
schema_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
session.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
session_oss.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
session_test.go peering: initial sync (#12842) 2022-04-21 17:34:40 -05:00
state_store.go Add per-node max indexes (#12399) 2022-06-23 11:13:25 -04:00
state_store_oss_test.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
state_store_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
store_integration_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
system_metadata.go use const instead of literals for `tableIndex` (#11039) 2021-09-15 10:24:04 -04:00
system_metadata_test.go server: create new memdb table for storing system metadata (#8703) 2020-10-06 10:08:37 -05:00
tombstone_gc.go Regenerate files according to 1.19.2 formatter 2022-10-24 16:12:08 -04:00
tombstone_gc_test.go
txn.go Add kv txn get-not-exists operation. 2022-09-06 10:28:59 -05:00
txn_test.go Add kv txn get-not-exists operation. 2022-09-06 10:28:59 -05:00
usage.go Add the `operator usage instances` command and api endpoint (#16205) 2023-02-08 12:07:21 -08:00
usage_oss.go Add the `operator usage instances` command and api endpoint (#16205) 2023-02-08 12:07:21 -08:00
usage_test.go Add the `operator usage instances` command and api endpoint (#16205) 2023-02-08 12:07:21 -08:00