Commit Graph

37 Commits

Author SHA1 Message Date
Matt Keeler e909289454
Various bits of cleanup detected when using Go Workspaces (#17462)
TLDR with many modules the versions included in each diverged quite a bit. Attempting to use Go Workspaces produces a bunch of errors.

This commit:

1. Fixes envoy-library-references.sh to work again
2. Ensures we are pulling in go-control-plane@v0.11.0 everywhere (previously it was at that version in some modules and others were much older)
3. Remove one usage of golang/protobuf that caused us to have a direct dependency on it.
4. Remove deprecated usage of the Endpoint field in the grpc resolver.Target struct. The current version of grpc (v1.55.0) has removed that field and recommended replacement with URL.Opaque and calls to the Endpoint() func when needing to consume the previous field.
4. `go work init <all the paths to go.mod files>` && `go work sync`. This syncrhonized versions of dependencies from the main workspace/root module to all submodules
5. Updated .gitignore to ignore the go.work and go.work.sum files. This seems to be standard practice at the moment.
6. Update doc comments in protoc-gen-consul-rate-limit to be go fmt compatible
7. Upgraded makefile infra to perform linting, testing and go mod tidy on all modules in a flexible manner.
8. Updated linter rules to prevent usage of golang/protobuf
9. Updated a leader peering test to account for an extra colon in a grpc error message.
2023-06-05 16:08:39 -04:00
Dan Upton 1d95609fb7
grpc: `protoc` plugin for generating gRPC rate limit specifications (#15564)
Adds automation for generating the map of `gRPC Method Name → Rate Limit Type`
used by the middleware introduced in #15550, and will ensure we don't forget
to add new endpoints.

Engineers must annotate their RPCs in the proto file like so:

```
rpc Foo(FooRequest) returns (FooResponse) {
  option (consul.internal.ratelimit.spec) = {
    operation_type: READ,
  };
}
```

When they run `make proto` a protoc plugin `protoc-gen-consul-rate-limit` will
be installed that writes rate-limit specs as a JSON array to a file called
`.ratelimit.tmp` (one per protobuf package/directory).

After running Buf, `make proto` will execute a post-process script that will
ingest all of the `.ratelimit.tmp` files and generate a Go file containing the
mappings in the `agent/grpc-middleware` package. In the enterprise repository,
it will write an additional file with the enterprise-only endpoints.

If an engineer forgets to add the annotation to a new RPC, the plugin will
return an error like so:

```
RPC Foo is missing rate-limit specification, fix it with:

	import "proto-public/annotations/ratelimit/ratelimit.proto";

	service Bar {
	  rpc Foo(...) returns (...) {
	    option (hashicorp.consul.internal.ratelimit.spec) = {
	      operation_type: OPERATION_READ | OPERATION_WRITE | OPERATION_EXEMPT,
	    };
	  }
	}
```

In the future, this annotation can be extended to support rate-limit
category (e.g. KV vs Catalog) and to determine the retry policy.
2023-01-04 16:07:02 +00:00
Dan Upton 006138beb4
Wire in rate limiter to handle internal and external gRPC calls (#15857) 2022-12-23 13:42:16 -06:00
Semir Patel 1f82e82e04
Pass remote addr of incoming HTTP requests through to RPC(..) calls (#15700) 2022-12-14 09:24:22 -06:00
DanStough adc810563f chore: ignore vscode files 2022-07-25 12:31:58 -04:00
DanStough f5b5d0ccf9 changelog: snapshot-agent acl token fix for CLI and ENV 2022-04-25 16:46:55 -04:00
R.B. Boyer 232da6e8f4
build: auto install correct version of protoc locally (#12651) 2022-03-30 10:08:17 -05:00
Kyle MacDonald ab029e8aca
website: remove netlify artifacts and port missing redirects over to new format (#9601)
* website: port existing new redirects old format

* website: remove netlify specific artifacts
2021-01-21 10:16:17 -05:00
Alvin Huang a260fc2c58 add terraform files to gitignore 2021-01-13 23:19:30 -05:00
Kit Patella 3de3259833
.gitignore: cut IDE-specific entries, cleanup (#7083)
* .gitignore: add vscode and MacOS-specific files. add a little org

* .gitignore: remove IDE-specific ignores, add docs
2020-01-17 11:06:33 -08:00
R.B. Boyer faf12277cc
build: prevent 'make tools' from editing go.mod and go.sum (#6738) 2019-11-05 09:25:46 -06:00
Todd Radel 1b14d6595e
connect: Support RSA keys in addition to ECDSA (#6055)
Support RSA keys in addition to ECDSA
2019-07-30 17:47:39 -04:00
Freddy 73f8286099
Remove old UI, option to use it, and its build processes 2019-04-12 09:02:27 -06:00
Paul Banks 0523efa2fe merge feedback: fix typos; actually use deliverLatest added previously but not plumbed in 2018-10-10 16:55:34 +01:00
Matt Keeler 971c38f537 Update .gitignore - ignore some macos fs event notification stuff 2018-05-24 10:34:23 -04:00
Frank Schroeder 23b057f46b build: add changelogfmt target to format [GH-xxxx] references to links 2017-10-04 21:14:16 +02:00
James Phillips ed0d1c0e79 Removes "consul" from .gitignore.
This was missing a lot of local changes during development (added files, etc.).
2017-07-31 14:58:35 -07:00
Frank Schroeder d5554d06fe
update .gitignore 2017-07-11 16:16:55 -07:00
Frank Schroeder 4ed443cfc4 build: build all packages together
Build all packages together with a global timeout. Locally,
the tests pass within 40 sec. On travis, we complete within
3-4 min.

travis truncates the logs after 4MB which we are hitting so
show the relevant information first and then whatever is left.
2017-07-07 09:22:34 +02:00
Frank Schroeder e371a5a9bf build: cleanup .gitignore 2017-04-27 10:34:30 -07:00
Frank Schroeder 7227ee21c3 build: Simplify make test and log output 2017-04-27 10:34:30 -07:00
Seth Vargo 7b2fc2f580 Use gox for building 2015-10-22 14:16:01 -04:00
Seth Vargo 13212f9609 Update middleman-hashicorp 2015-04-26 15:29:48 -04:00
Ryan Uber 5fe18b5093 Ignore vim swap files 2015-01-07 15:21:01 -08:00
Jack Pearkes 9f4cb04bf2 ui: ignore compiled js, dist 2014-05-01 11:22:30 -04:00
Jack Pearkes e564d9681f ui: use a /static directory 2014-04-30 23:43:55 -04:00
Jack Pearkes 7e890dc45b ui: initial commit 2014-04-30 23:43:55 -04:00
Mitchell Hashimoto 0820428a54 scripts: dist script 2014-04-16 16:53:26 -07:00
Mitchell Hashimoto 47ee388dd6 website: update gemfile lock and add version text 2014-04-14 15:17:33 -07:00
Mitchell Hashimoto edceec91e4 Ignore the website build dir 2014-04-14 15:12:23 -07:00
Mitchell Hashimoto 938d15e630 website: some vs copy changes 2014-04-14 11:58:55 -07:00
Armon Dadgar 002b9018a1 website: More info on TLS encryption 2014-04-07 15:07:21 -07:00
JT a6e681dbe6 homepage 2014-04-05 02:03:01 -07:00
Armon Dadgar 5fe8ae8d73 Updated gitignore 2014-03-20 13:10:27 -07:00
Armon Dadgar 5aa94a7989 Adding basic CLI infrastructure 2013-12-19 11:22:08 -08:00
Armon Dadgar 9dadd99bcf ignore test files 2013-12-09 12:10:37 -08:00
Armon Dadgar d39b1765c6 Initial commit 2013-11-04 14:15:27 -08:00