fix(policy): GetPC does not respect manager field.#3752
Conversation
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughProvider configuration retrieval now accepts a manager filter for name-based lookups. The CLI, service and database layers, documentation, integration tests, and end-to-end tests were updated to support and validate this behavior. ChangesProvider configuration lookup
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CLI as otdfctl get command
participant Handler as Handler.GetProviderConfig
participant Service as keymanagement.GetProviderConfig
participant DB as PolicyDBClient.GetProviderConfig
CLI->>Handler: pass id, name, manager
Handler->>Service: send GetProviderConfigRequest
Service->>DB: pass full request
DB-->>Service: return matching provider config
Service-->>CLI: return provider configuration
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a bug where the Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. The manager field was lost in the fray, / But now it is found in the light of day. / With name and with manager, clearly defined, / The provider config is easy to find. Footnotes
|
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
There was a problem hiding this comment.
Code Review
This pull request updates the key provider configuration retrieval process to support and require a manager parameter when fetching by name. This change is implemented across the CLI commands, documentation, E2E tests, handlers, and database queries. The reviewer raised a valid concern that while the CLI enforces the manager parameter when retrieving by name, the API level does not validate this, which could lead to non-deterministic behavior if multiple configurations share the same name but have different managers.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
|
| string id = 2 [(buf.validate.field).string.uuid = true]; | ||
| // Provider config name. When using name, manager SHOULD also be set because | ||
| // provider config uniqueness is based on (name, manager). Omitting manager | ||
| // can match multiple provider configs and returns a non-deterministic result. |
There was a problem hiding this comment.
Should we send back a bad request error here if this is the case?
There was a problem hiding this comment.
Like don't try to optimistically get a provider config and return one of them, but instead require both parameters to successfully return any result, or otherwise make sure if one is found by name alone that it is globally unique?
1.) Bug fix where we didn't respect the user's
managerrequest value when searching bynameSummary by CodeRabbit
New Features
--manager(-m) option for retrieving key management provider configurations by name and manager implementation.Bug Fixes
Documentation