Skip to content

Conversation

DomAyre
Copy link
Contributor

@DomAyre DomAyre commented Oct 1, 2025

Why

Addresses:

When you use --infrastructure-svn this sets the minimum_svm field of the import statement for the default infrastructure fragment

Later in the code if --include-fragments is specified, we attempt to pull fragments but intend to skip the default fragment, however it compares the entire import statement and therefore fails to match on SVN, attempts to pull the feed and fails.

How

  • Only check the feed and issuer fields against default fragments
  • Add tests which use these flags together to prevent future breakage

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

@Copilot Copilot AI review requested due to automatic review settings October 1, 2025 13:07
Copy link

azure-client-tools-bot-prd bot commented Oct 1, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

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 Oct 1, 2025

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

Copy link

github-actions bot commented Oct 1, 2025

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>

@DomAyre DomAyre changed the title Fix --infrastructure-svn and --fragments-json combo [confcom] Fix --infrastructure-svn and --fragments-json combo Oct 1, 2025
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 fixes the --infrastructure-svn and --fragments-json command line option combination by modifying fragment comparison logic to prevent pulling the default infrastructure fragment when a minimum SVN is specified.

  • Update fragment comparison logic to check only feed and issuer fields instead of the entire import statement
  • Add test coverage to ensure the flag combination works correctly

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

File Description
src/confcom/azext_confcom/oras_proxy.py Modified fragment comparison to use only feed and issuer fields when determining default fragments
src/confcom/azext_confcom/tests/latest/test_confcom_acipolicygen_arm.py Added test case for infrastructure_svn flag and updated test skip logic
Multiple .rego files Added new policy files for testing the infrastructure SVN flag combination

@DomAyre DomAyre changed the title [confcom] Fix --infrastructure-svn and --fragments-json combo [confcom] Fix --infrastructure-svn and --include-fragments combo Oct 1, 2025
Copy link

github-actions bot commented Oct 1, 2025

Hi @DomAyre

Release Suggestions

Module: confcom

  • Please log updates into to src/confcom/HISTORY.rst
  • Update VERSION to 1.2.9 in src/confcom/setup.py

Notes

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