You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: e46ff0ec-d9de-499d-8fd8-4072e0ed5cb4
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
🔍 Trigger review
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The repo tracks generated Go protobuf stubs, but the PR updates the .proto without regenerating/committing the corresponding generated files, which will cause API drift and likely break consumers.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR extends the keystore management protobuf API to support asynchronous keystore creation flows (to avoid timeouts during delayed hyperscaler account activation) by adding creation status metadata and introducing new RPCs to poll status and finalize setup.
Changes:
Adds async lifecycle fields (status, hyperscaler_account_id, error_message) to CreateKeystoreResponse.
Adds two new RPCs: GetKeystoreStatus (read-only) and FinalizeKeystoreSetup (state-modifying).
Updates .gitignore to ignore PROTO_CHANGES_BACKWARDS_COMPATIBLE.md.
For consistency with CreateKeystoreResponse (and to allow presence checks in proto3), consider making this status field optional as well; otherwise clients can’t distinguish “unset” from “set to empty”.
// Current status: "PENDING_ACTIVATION", "ACTIVE", or "FAILED"
string status = 1;
Same proto3 presence concern here: if callers need to distinguish missing vs empty, this should be optional (or an enum). Keeping the wire semantics consistent across the three status responses will reduce client-side edge cases.
// Status: should always be "ACTIVE" on success, "FAILED" on error
string status = 4;
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The proto documentation for new fields has a couple of concrete inaccuracies/misleading statements that should be corrected to avoid confusing API consumers.
Proto3 non-optional string fields don’t have presence; “not set” isn’t distinguishable from an empty string, so the comment should describe empty-string semantics rather than implying a separate unset state.
// Status of keystore creation
// Values: "ACTIVE" (default, immediately ready), "PENDING_ACTIVATION" (account created, waiting for activation), "FAILED" (creation failed)
// If not set or empty, defaults to "ACTIVE" for backwards compatibility
string status = 5;
These comments imply common_name/cmk_region were provided during CreateKeystore, but CreateKeystoreRequest only has a provider-defined google.protobuf.Struct values. That makes the documentation misleading for API consumers.
// Common name for the keystore (same as was intended during CreateKeystore)
string common_name = 2;
// CMK region (same as was intended during CreateKeystore)
string cmk_region = 3;
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The new status API uses stringly-typed states with inconsistent “absent/default” semantics across responses, which is likely to confuse clients and should be made more explicit/consistent before release.
Get a fresh assessment by requesting another Copilot review.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The new status contract relies on optional string fields/presence semantics in a way that is ambiguous and error-prone for API consumers and should be revised before merging.
The new status field is a free-form string even though the API contract defines a closed set of values, and it also relies on field presence for backwards-compat semantics ("absent" => treat as ACTIVE). This is easy to misuse (typos/new values) and is difficult for clients to implement consistently across languages (e.g., generated getters typically return the empty string rather than an "ACTIVE" default). Consider introducing a KeystoreStatus enum (e.g., STATUS_UNSPECIFIED=0, ACTIVE=1, PENDING_ACTIVATION=2, FAILED=3) and using it for all status fields; document that STATUS_UNSPECIFIED should be treated as ACTIVE for legacy responses.
// Status of keystore creation
// Values: "ACTIVE" (immediately ready), "PENDING_ACTIVATION" (account created, waiting for activation), "FAILED" (creation failed)
// Optional field - when not set (absent), clients should treat the keystore as "ACTIVE" for backwards compatibility with old plugins
// New plugins should explicitly set this field to indicate the actual status
optional string status = 5;
Using optional string status to represent an unknown state by omission makes the wire contract harder for clients to reason about and encourages retry loops when presence handling differs across languages/JSON bindings. Prefer returning an explicit status value (e.g., an enum with STATUS_UNSPECIFIED) rather than encoding "unknown" as "field not set".
// Current status: "PENDING_ACTIVATION", "ACTIVE", or "FAILED"
// Optional field - when not set (absent), status is unknown and client should retry the request
optional string status = 1;
The response contract here is ambiguous: it says that if status is absent clients should consult error_message, but error_message is also optional, so success vs failure can be unclear. Consider making status always populated (or using an enum with a clear default like STATUS_UNSPECIFIED) and specifying that failures must set status=FAILED and populate error_message.
// Status: "ACTIVE" on success, "FAILED" on error
// Optional field - when not set (absent), clients should check error_message to determine success/failure
optional string status = 4;
Regenerate protobuf Go files to include new RPCs and messages:
- GetKeystoreStatus RPC (read-only status check)
- FinalizeKeystoreSetup RPC (complete setup after activation)
- Updated CreateKeystoreResponse with status, hyperscaler_account_id, and error_message fields
- New request/response messages for status and finalization
Files updated:
- management.pb.go: Added new message types and fields
- management_grpc.pb.go: Added new RPC method signatures
This addresses Copilot's feedback about missing generated files.
Signed-off-by: davidbolet <[email protected]>
Address Copilot feedback: In proto3, non-optional string fields cannot
distinguish between 'unset' and empty string, making presence-based
backwards compatibility impossible.
Changes:
- Make 'status' field optional in CreateKeystoreResponse (field 5)
- Make 'hyperscaler_account_id' optional in CreateKeystoreResponse (field 6)
- Make 'error_message' optional in CreateKeystoreResponse (field 7)
- Make 'status' optional in GetKeystoreStatusResponse (field 1)
- Make 'error_message' optional in GetKeystoreStatusResponse (field 2)
- Make 'status' optional in FinalizeKeystoreSetupResponse (field 4)
- Make 'error_message' optional in FinalizeKeystoreSetupResponse (field 5)
Updated documentation to clarify:
- Old plugins: fields absent → clients treat as ACTIVE
- New plugins: explicitly set status field
- Error messages: only present when status is FAILED
This enables proper presence detection in clients using HasField() checks.
Regenerated Go files to reflect optional field semantics with pointer types.
Signed-off-by: davidbolet <[email protected]>
Address Copilot feedback: FinalizeKeystoreSetupRequest was requiring
common_name and cmk_region even though these are already passed in
CreateKeystoreRequest. This creates two sources of truth and makes
the async flow harder to use correctly.
Changes:
- Remove 'common_name' field (was field 2) from FinalizeKeystoreSetupRequest
- Remove 'cmk_region' field (was field 3) from FinalizeKeystoreSetupRequest
- Updated documentation to clarify plugin responsibility
Design rationale:
- Plugin receives all parameters in CreateKeystoreRequest (opaque Struct)
- Plugin stores mapping: hyperscaler_account_id -> original request parameters
- FinalizeKeystoreSetup only needs hyperscaler_account_id to lookup context
- Single source of truth: CreateKeystoreRequest is authoritative
- Simpler client code: no need to track and re-send parameters
Plugin implementation pattern:
1. CreateKeystore: store (account_id -> request params) mapping
2. FinalizeKeystoreSetup: lookup params by account_id, complete setup
3. No risk of parameter mismatch between create and finalize
Regenerated Go files to reflect simplified request message.
Signed-off-by: davidbolet <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
The new status enum/fields have ambiguous documented semantics around “unset” vs UNSPECIFIED, and the API surface/PR description scope needs to be made consistent before approval.
Get a fresh assessment by requesting another Copilot review.
- Rename hyperscaler_account_id to account_id in all messages
- Add values field to FinalizeKeystoreSetupRequest for stateless plugin
- Regenerate all proto files
Signed-off-by: davidbolet <[email protected]>
This comment says the plugin maintains the mapping between account_id and the original CreateKeystore parameters, but later FinalizeKeystoreSetupRequest states CMK stores/passes those parameters back so the plugin can remain stateless. These statements conflict; align the CreateKeystoreResponse comment with the stateless approach (CMK maintains the mapping).
This issue also appears on line 140 of the same file.
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The new async-status API has documentation/contract ambiguities (presence vs UNSPECIFIED semantics and optional status in new responses) plus a mismatch with the PR description that should be resolved before approval.
The GetKeystoreStatusResponse docs talk about the status field being absent, but many consumers (and generated getters) will primarily see KEYSTORE_CREATION_STATUS_UNSPECIFIED when the field is unset. It’s clearer to define retry/unknown semantics in terms of the UNSPECIFIED enum value rather than presence.
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
davidbolet
changed the title
Feature/async keystore creation
feat: Async keystore creation
Oct 8, 2026
davidbolet
changed the title
feat: Async keystore creation
feat: async keystore creation
Oct 8, 2026
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The new enum-backed status fields are documented with string values in the proto comments, which is misleading for generated clients and JSON enum encoding and should be corrected before approval.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The new async-status API semantics and documentation around UNSPECIFIED/absence and finalize success criteria are currently ambiguous, and the PR description doesn’t match the added creation_time API surface.
The reason will be displayed to describe this comment to others. Learn more.
As stated before, disable your copilot! This makes reviewing any PR a nightmare as there are super verbosy messages in the middle of the changes and we already have our own AI reviewing tools. For future reference I won't be reviewing any other PR where this is enabled
Also, use some code quality skils as this PR is 90% comments where almost all of them dont add any value. Try ponytail, pstack, etc.
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
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.
Add support for asynchronous keystore creation to handle cases where
AWS account activation can take >24 hours and cause timeouts.
Changes:
Add optional fields to CreateKeystoreResponse:
Add GetKeystoreStatus RPC (read-only):
Add FinalizeKeystoreSetup RPC (state-modifying):