Fix fig spec: action flag values and environment option deduplication#7588
Conversation
…onment dedup - Fix --action flag description to say (all, readonly) instead of (readonly, any) in copilot consent list and revoke commands - Fix --model flag description in azure.ai.agents extension to remove contradictory 'mutually exclusive' wording - Skip global flags when generating per-command options in fig spec builder, eliminating duplicate --environment entries across ~20 subcommands Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates azd’s Fig completion spec and CLI help text to match valid --action flag values and removes duplicated --environment option entries by treating global flags as root-level persistent options.
Changes:
- Correct
--actionflag descriptions from(readonly, any)to(all, readonly)forcopilot consent list/revoke. - Deduplicate global flags (e.g.,
--environment) from per-command Fig options, relying on rootpersistentOptions. - Update snapshot and generated Fig spec testdata to reflect the new help text and deduplication.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cli/azd/internal/figspec/spec_builder.go | Skips global flags during per-command option generation to prevent duplicate Fig entries. |
| cli/azd/cmd/copilot.go | Updates --action flag help text to reflect valid values. |
| cli/azd/cmd/testdata/TestUsage-azd-copilot-consent-*.snap | Updates usage snapshots for corrected --action description. |
| cli/azd/cmd/testdata/TestFigSpec.ts | Updates generated Fig spec output, removing duplicated --environment options and correcting descriptions. |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
jongio
left a comment
There was a problem hiding this comment.
Both changes look correct. The action flag description fix is confirmed by ParseActionType() which accepts all/readonly as CLI input (not any - that's the internal wire value). The fig spec dedup properly uses the existing globalFlagNames map, consistent with how convertExtensionCommand already filters flags. Clean change.
Addresses review comments from microsoft/vscode#308613.
Changes
--actionflag description incopilot consent listandcopilot consent revoke: changed(readonly, any)to(all, readonly)to match actual valid values and fig spec suggestions--environmentoption in fig spec: skip persistent global flags when generating per-command options, since they're already defined at root level aspersistentOptions. Removes ~200 lines of duplicate entries from the generated spec