feat(cli): RR commit.#3309
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 introduces functionality to migrate registered resources within the CLI. It enhances the migration execution logic to support creating these resources and their values, while also providing a mechanism to reconcile existing resources to prevent unnecessary duplication during partial migrations. Highlights
🧠 New Feature in Public Preview: You can now enable Memory 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 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 counter productive. 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 resources registered in the flow, To new namespaces they must go. With status checked and collisions cleared, The migration path is now revered. 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 implements the execution logic for migrating registered resources, including updates to the ExecutorHandler interface and migration plan structures. The changes introduce the executeRegisteredResources method and its helpers to handle the creation of resources and values while tracking execution status. Feedback identifies a missing implementation of cachedActionTargetID that will lead to compilation errors, a need to support both IDs and FQNs for action identifiers, and a recommendation to reconcile action bindings when reusing existing resource values.
| if existingID := existingValues[registeredResourceValueKey(valuePlan.Source.GetValue())]; existingID != "" { | ||
| valuePlan.Execution = &ExecutionResult{ | ||
| RunID: e.runID, | ||
| Applied: true, | ||
| CreatedTargetID: existingID, | ||
| } | ||
| continue | ||
| } |
There was a problem hiding this comment.
When an existing value is found on the parent Registered Resource, the migration marks it as applied and skips creation. However, it does not verify if the ActionBindings (AAVs) on the existing value match the ones defined in the migration plan. If the goal is full reconciliation, you might want to at least log a warning if the bindings differ, although the current ExecutorHandler lacks an update method for RR values.
There was a problem hiding this comment.
Creating AAVs is tranasctional when creating RRVs. It is possible that if a RRV is manually updated to remove an AAV then there will be drift, but we are not handling after migration modifications. Meaning if a customer were to update a migrated RRV after a migration or added a RRV themselves we will not block on that.
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
|
Proposed Changes
1.) Add ability to commit
registered_resources2.) Call out that for partially migrated objects that cause collisions that we use a combination of
ExistingandStatusto determine if the parent has already been migrated but the values need updates.Checklist
Testing Instructions