Skip to content

[Role] Remove Preview labels from role assignment condition and description parameters #34500

Todo

Description

The following parameters on az role assignment create are still marked as Preview in CLI help and the command reference:

  • --condition
  • --condition-version
  • --description

Their corresponding REST properties—condition, conditionVersion, and description—are supported in the stable Authorization API version 2022-04-01.

Supporting documentation

  • The REST API guide explicitly identifies 2022-04-01 as the first stable version and demonstrates all three properties.
  • The REST API reference lists all three properties in the request body.
  • The ABAC feature-status table states that adding conditions through Azure CLI, PowerShell, and REST API has been GA since October 2022.

Requested change

Remove is_preview=True from the three argument registrations in role/_params.py, after confirming there are no remaining CLI-specific blockers.

The registrations are shared under role assignment, so check all affected command help, not just create.

Acceptance criteria

  • The three parameters no longer display Preview labels in CLI help or the generated command reference.
  • Parameter names, accepted values, defaults, and runtime behavior remain unchanged.
  • Include a release-note entry identifying the parameters as GA.

Target: Next release, subject to normal review and release cutoffs.

Activity

  1. added
    Auto-Assign
    RBAC
    Azure CLI Team
    question
    on Nov 27, 2026
  2. removed
    question
    on Nov 27, 2026
  3. added
    Request X Engineering Agent
    on Nov 27, 2026
  4. x-engineering-agent commented on Nov 27, 2026

    @x-engineering-agent
    Contributor

    X Engineering Agent Bug analysis: Root cause · high confidence

    Confidence: high Repro: provided Code: handwritten

    The CLI still marks --condition, --condition-version and --description on role assignments as Preview, despite the reported stable Authorization API and maintainer confirmation to remove the labels. The issue is metadata-only: removing these markers should change CLI help and the generated command reference without changing accepted values or service requests.

    Important

    Likely root cause (86% confidence): The shared role assignment argument context explicitly sets is_preview=True on all three registrations; CLI help reads these flags and continues to report Preview independently of REST API maturity.

    Affected code

    File Symbol Line
    _params.py src/azure-cli/azure/cli/command_modules/role load_arguments 343
    Proposed change

    Remove is_preview=True only from description, condition and condition_version in the role assignment context of role/_params.py. Add a release-note entry identifying all three as GA; preserve names, help descriptions, validators, defaults and behavior.

    Ruled out
    • Configuration: Preview is hard-coded in the CLI argument registration, so user configuration cannot remove the help badge.
    • Environment: The flags are declared in module source and do not depend on operating system, Azure account or tenant.
    • Intended behavior: The original preview annotation represented an earlier feature maturity; the reported stable API and maintainer direction support updating only CLI maturity metadata.
    Origin
    • Introduced by: The current three lines trace to commit 1565a55 (2025-07-30), {Role} az role: Bump azure-mgmt-authorization to single-API SDK #31859, the role module single-API authorization SDK migration.
    • Original intent: That migration retained role assignment options while switching the role management SDK; the Preview metadata remained on their registrations.
    • Does the fix keep that intent: Yes. Only the help maturity flag changes; the migration, REST integration, argument behavior and defaults remain intact.
    Why this surfaced now

    No recent change to these registrations explains the report; their Preview metadata was retained in the 2025 SDK migration despite the earlier GA status cited in this issue.

    • trace_origin maps all three current registrations to {Role} az role: Bump azure-mgmt-authorization to single-API SDK #31859 (2025-07-30), with no later changes to those lines.
    • The issue cites the stable 2022-04-01 Authorization API and GA since October 2022; the maintainer explicitly requested removal.
    • Recent dependency history inspected through November 2026 did not identify a new role SDK change causing this help annotation.
    Blast radius
    • Other callers: role/commands.py registers role assignment create, list, delete, update and list-changelogs; the argument context is shared, though each command can expose a different subset of options.
    • Visible change for them: Only help and generated reference maturity annotations for applicable role assignment commands change; actual option availability and service behavior must stay unchanged.
    • Why not a narrower fix: Changing only create help would leave the shared registration and any other affected command help marked Preview, contrary to the requested GA status.
    Technical details

    Evidence

    • role/_params.py lines 331-345 define the role assignment context and mark description, condition and condition_version as preview.
    • role/commands.py lines 80-85 register create, list, delete, update and list-changelogs under role assignment; inspect effective help for each applicable command.
    • The issue cites stable Authorization API 2022-04-01 and GA feature status; a maintainer replied "Remove Preview labels".

    Reproduction

    This is a help-metadata GA request rather than a runtime command failure; source registration confirms the labels, and no Azure-side reproduction is needed.

    Test plan

    Add focused help/argument-registration coverage asserting the three options do not carry Preview badges on az role assignment create and any other commands exposing them; compare names, defaults and values. No Azure resource or live service scenario is needed for this metadata-only change; check generated command reference and release note.

    Generated code: Handwritten code. role/_params.py manually registers role assignment arguments via self.argument_context, outside aaz or generated output.


    Ask the Agent

    Tick a box to queue an action. Requires write access to this repository.

    • Ask the X Engineering Agent to fix this issue

    X Engineering Agent · Fixer · React with +1 or -1 to train the agent

  5. x-engineering-agent commented on Nov 27, 2026

    @x-engineering-agent
    Contributor

    Implementation Result

    No pull request was opened because the fix needs a design decision from a maintainer.

    Reason (from the job report): src/azure-cli/azure/cli/command_modules/role/_params.py: load_arguments registered description, condition and condition_version with stale is_preview=True metadata. The restored candidate correctly removes those flags. The remaining review blockers are publication deliverables, not role command implementation: no generated-reference output is supplied, and the configured trusted PR title does not identify the three parameters as GA. The installed publisher generates History Notes only from that trusted title, and the report interface discards unrecognized history_notes, release_notes and title fields. Completing the requested GA release …

    Options considered:

    • Editing src/azure-cli/HISTORY.rst was rejected: this is a dev-branch non-hotfix task and repository release notes must be generated from approved PR title/History Notes inputs.
    • Adding a release_notes or history_notes field to the report was rejected as a solution: installed report.validate_report explicitly drops unknown fields, so it would not provide …
    • Changing the installed publisher or shared PR template was rejected as outside the issue's role metadata/coverage/release-note scope and outside writable tooling ownership.

    Reproduced: yes · Confidence: 0.98

    Next step: A maintainer should reply on this issue with the intended behavior; the Agent picks up that reply and implements it.

    X Engineering Agent · Fixer · React with +1 or -1 to train the agent

  6. yonzhan commented on Nov 27, 2026

    @yonzhan
    Collaborator

    Remove Preview labels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Auto-AssignAzure CLI TeamRBACRequest X Engineering Agentact-identity-squad

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions