Open
Conversation
Member
Author
|
This PR does not meet the test coverage target (>= 70%). |
Contributor
There was a problem hiding this comment.
Pull request overview
Implements a gRPC-based client for the Container Provisioner and adds configuration switches to select between the existing HTTP client and the new gRPC client at runtime.
Changes:
- Add
internal/stackgRPC client implementation and generated protobuf stubs underinternal/gen/stack/v1. - Extend stack configuration/env to support
STACKS_PROVISIONER_USE_GRPCandSTACKS_PROVISIONER_GRPC_ADDR, and wire selection logic in the server entrypoint. - Add Buf/BSR generation tooling (Makefile +
buf.gen.yaml) and update examples/docs.
Reviewed changes
Copilot reviewed 11 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents new env vars and Buf/BSR workflow (currently has a formatting issue inside the env code block). |
| Makefile | Adds targets for buf install/lint/generate plus basic Go fmt/vet/test/build. |
| internal/stack/grpc_client.go | New gRPC client implementation for StackService (timeout and transport security need follow-ups). |
| internal/http/integration/testenv_test.go | Minor formatting alignment in test config literals. |
| internal/http/integration/admin_test.go | Minor formatting alignment in test config literals. |
| internal/http/handlers/testenv_test.go | Minor formatting alignment in test config literals. |
| internal/gen/stack/v1/stack.pb.go | Generated protobuf messages/enums for StackService API. |
| internal/gen/stack/v1/stack_grpc.pb.go | Generated gRPC client/server interfaces and handlers for StackService. |
| internal/config/config.go | Adds stack gRPC address/enable flags; validates base URL vs gRPC addr based on mode; includes in log formatting. |
| go.mod | Adds grpc/protobuf dependencies and updates indirect deps accordingly. |
| go.sum | Updates dependency checksums due to grpc/protobuf/buf-related dependency graph changes. |
| codecov.yaml | Excludes new gRPC client file from coverage (consistent with existing HTTP client exclusion). |
| cmd/server/main.go | Selects HTTP vs gRPC provisioner client based on config and initializes the chosen implementation. |
| buf.lock | Adds Buf lockfile metadata. |
| buf.gen.yaml | Configures Buf code generation plugins/paths for Go and Go gRPC. |
| .env.example | Adds the new stack gRPC toggle/address environment variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For details about the Container Provisioner gRPC server, refer to the PR below:
In this PR, a client has been implemented based on the gRPC proto, and environment variables have been added to allow toggling between HTTP and gRPC communication. The added environment variables are as follows:
The Proto IDL is also managed using Buf Schema Registry (BSR).