fix(generator): normalize gcloud synopsis aliases and defaults - #5161
Conversation
Preserve command coverage for #5146.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change updates gcloud synopsis parsing, adds regression tests, and adds 585.0.0 help fixtures for Cloud Build trigger, DNS, and Cloud SQL commands. ChangesGcloud option parsing
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The parser changes are covered by focused regression tests and no unresolved merge-blocking issue remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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. A rabbit parses flags in a neat little row Comment |
Code reviewReviewed the diff and the checked-out PR head ( Summary of the fix —
Both changes are scoped to the gcloud-specific override (not the shared Verification
Non-blocking observations (not requesting changes):
No correctness issues or CLAUDE.md violations found. |
|
Addressed both non-blocking observations in review comment 5691564841 with 66033be, confirmed in the remote PR head: short aliases now accept both space and equals separators, and the captured manual-trigger regression asserts the required trigger/config choice, nested build-config exclusivity, Dockerfile requirement, and absence of positional operands. All 430 related parser tests pass; scoped formatting passes. The CodeRabbit docstring-coverage warning counts named regression tests and private helpers; these follow existing repository conventions rather than adding repetitive XML comments to test methods. |
Code reviewReviewed the gcloud synopsis normalization fix in Summary of the fix
Verification
No correctness issues or design concerns found in the diff. This is a well-isolated generator fix with solid regression coverage. |
Problem and change
Gcloud SDK 585 generation on main failed in run 35047414356: 24 DNS/SQL commands were skipped because
--instance=INSTANCE, -i INSTANCEproduced a phantom operand, thenbuilds triggers create manualaborted generation because a displayed default was interpreted as nested argument syntax.Normalize comma-separated short aliases with their long option's documented value, and strip displayed default annotations from normalized synopsis options before parsing groups. Original help remains available for option metadata. Preserve real operands after aliases and quoted default text containing syntax characters.
Add 42 captured SDK 585 help fixtures covering every skipped command and all stable build-trigger create/update variants. No generated options are edited.
Validation
Related to #5146, #4863, #4869, and #4956. Keep #5146 open until fresh full generation and coverage pass.
Regenerate gcloud and AWS from latest main after the separate AWS enum defect in #5164 is fixed.