Skip to content

Conversation

DomAyre
Copy link
Contributor

@DomAyre DomAyre commented Sep 22, 2025

Why

Addresses

How

  • Add an --enable-stdio arg to compliment --disable-stdio and allow users to prepare for a default switch
  • In the entry point for acipolicygen and acifragmentgen warn the user if they don't include either flag explaining the risks of leaving stdio enabled, warning the default may change in the future and explaining how to avoid that issue.

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

There is no functional change (only an extra arg which currently doesn't change default behaviour) no version bump is necessary

@Copilot Copilot AI review requested due to automatic review settings September 22, 2025 14:28
Copy link

azure-client-tools-bot-prd bot commented Sep 22, 2025

⚠️Azure CLI Extensions Breaking Change Test
⚠️confcom
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd confcom acifragmentgen cmd confcom acifragmentgen added parameter enable_stdio
⚠️ 1006 - ParaAdd confcom acipolicygen cmd confcom acipolicygen added parameter enable_stdio

Copy link

Hi @DomAyre,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Sep 22, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an --enable-stdio flag to complement the existing --disable-stdio flag and introduces a warning system to prepare users for a potential future default change from stdio enabled to disabled.

  • Adds --enable-stdio argument option alongside existing --disable-stdio
  • Implements warning logic when neither flag is specified to alert users about security implications
  • Updates parameter handling to use a unified stdio_enabled variable instead of directly using disable_stdio

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/confcom/azext_confcom/custom.py Adds stdio flag logic, warning messages, and unified parameter handling for both acipolicygen_confcom and acifragmentgen_confcom functions
src/confcom/azext_confcom/_validators.py Adds mutual exclusion validation to prevent users from specifying both --enable-stdio and --disable-stdio flags
src/confcom/azext_confcom/_params.py Defines the new --enable-stdio argument and updates parameter configurations for both commands

@yonzhan yonzhan requested a review from kairu-ms September 22, 2025 14:32
Copy link

github-actions bot commented Sep 22, 2025

@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Sep 23, 2025
@github-actions github-actions bot removed the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants