chore(cli): Refactor file/function naming.#3490
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (30)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR renames the core namespaced policy migration APIs from Planner/Plan/Executor to MigrationPlanner/MigrationPlan/MigrationExecutor, removes the RunID field from ExecutionResult to simplify metadata (keeping only the migrated_from label), introduces a new PruneExecutor type, adds interactive backup confirmation, and updates all CLI commands, tests, and documentation accordingly. ChangesNamespaced Policy Migration API Refactoring
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 refactors the otdfctl namespaced policy migration and prune flows to improve code layout and API explicitness. By renaming key components, separating execution responsibilities, and removing unused metadata tracking, the codebase becomes more maintainable. Additionally, the changes expose previously hidden CLI commands and update end-to-end tests to align with the new structural improvements. 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 code was messy, names were vague, Refactoring made it quite the plague. But now it's clean, the flow is clear, Migration paths have lost their fear. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the migration and pruning logic by renaming core types—such as Plan to MigrationPlan and Executor to MigrationExecutor—and removing the runID tracking system. Additionally, it exposes migration commands by removing their hidden status and introduces a new backup_confirmation.go file for interactive user prompts. Feedback indicates that the direct use of fmt.Println in the backup confirmation logic should be integrated into the prompter abstraction to ensure consistent terminal output and avoid potential layout issues with the TUI.
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
|
Summary
This PR refactors the otdfctl namespaced policy migration/prune flow to make the code layout and public API more explicit, removes unused migration run tracking, and exposes the migrate command tree in the CLI.
Key Changes
Behavior Changes
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation
Chores