fix(cli): deprecate flaghelper for new flags#3583
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 (8)
📝 WalkthroughWalkthroughThis PR modernizes the CLI flag parsing infrastructure by promoting the internal ChangesCLI Flag Helper Type Modernization
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 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)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a 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 performs a refactor of the CLI flag handling mechanism within the project. By renaming the internal helper struct and removing redundant wrappers, the codebase achieves a cleaner and more consistent interface for accessing command-line flags. 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 flags were hidden in a helper's name, / But now the structure plays a cleaner game. / With 'flags' in place and wrappers cast aside, / The code is neat, with nowhere left to hide. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the CLI flag helper by renaming flagHelper to flags and removing the deprecated FlagHelper wrapper field from the Cli struct, updating all references across the codebase. Feedback on these changes highlights a potential nil pointer dereference in GetRequiredString if a requested flag is not registered, and suggests exporting the flags struct as Flags to avoid the Go anti-pattern of exporting a field of an unexported type.
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:
|
Signed-off-by: jakedoublev <jake.vanvorhis@virtru.com>
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
|
🤖 I have created a release *beep* *boop* --- ## [0.33.0](otdfctl/v0.32.0...otdfctl/v0.33.0) (2026-06-09) ### Features * **cli:** improve auth ([#3466](#3466)) ([b244910](b244910)) * **core:** add hybrid NIST EC + ML-KEM key wrapping support ([#3276](#3276)) ([1209acc](1209acc)) ### Bug Fixes * **ci:** Prefer go.work for toolchain info ([#3285](#3285)) ([3c05b22](3c05b22)) * **cli:** deprecate flaghelper for new flags ([#3583](#3583)) ([8f3c429](8f3c429)) * **deps:** bump github.com/opentdf/platform/lib/ocrypto from 0.10.0 to 0.11.0 in /otdfctl ([#3530](#3530)) ([745a205](745a205)) * **deps:** bump github.com/opentdf/platform/lib/ocrypto from 0.11.0 to 0.12.0 in /otdfctl ([#3536](#3536)) ([8d1c018](8d1c018)) * **deps:** bump github.com/opentdf/platform/protocol/go from 0.30.0 to 0.31.0 in /otdfctl ([#3499](#3499)) ([fa91478](fa91478)) * **deps:** bump github.com/opentdf/platform/protocol/go from 0.31.0 to 0.32.0 in /otdfctl ([#3531](#3531)) ([23946e4](23946e4)) * **deps:** bump github.com/opentdf/platform/sdk from 0.17.0 to 0.21.0 in /otdfctl ([#3549](#3549)) ([1cb751e](1cb751e)) * **deps:** bump the external group across 1 directory with 4 updates ([#3494](#3494)) ([5b87b2b](5b87b2b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
Proposed Changes
Checklist
Testing Instructions
Summary by CodeRabbit