-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[confcom] adding new function to replace config_str and str input format functions #8835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
There was a problem hiding this 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 refactors the policy generation functions and updates container image references while addressing a bug with the scenario field. Key changes include:
- Consolidation of input functions (replacing load_policy_from_str with load_policy_from_json_file/load_policy_from_json) and parameter type updates.
- Updates of container image references to new azurelinux versions and associated adjustments in tests and examples.
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/confcom/setup.py | Updated version from 1.2.4 to 1.2.5 |
| src/confcom/samples/* | Updated fragment JSON and image references |
| src/confcom/azext_confcom/tests/* | Replaced load_policy_from_str with load_policy_from_json and updated image names and minimum_svn types |
| src/confcom/custom.py | Changed input function call from load_policy_from_file to load_policy_from_json_file |
| src/confcom/azext_confcom/oras_proxy.py | Updated parameter type for minimum_svn |
| src/confcom/azext_confcom/cose_proxy.py | Updated generate_import_from_path’s minimum_svn parameter type |
| src/confcom/azext_confcom/README.md and HISTORY.rst | Updated examples and version details |
Comments suppressed due to low confidence (3)
src/confcom/custom.py:117
- Replacing load_policy_from_file with load_policy_from_json_file improves consistency with other modules; please ensure all related documentation and downstream calls are updated accordingly.
container_group_policies = security_policy.load_policy_from_json_file(input_path, debug_mode=debug_mode, infrastructure_svn=infrastructure_svn, ...)
src/confcom/azext_confcom/oras_proxy.py:178
- The parameter type for 'minimum_svn' has been updated from int to str across the codebase; please verify that downstream functions and integrations expect a string, and update documentation to reflect this change.
def generate_imports_from_image_name(image_name: str, minimum_svn: str) -> List[dict]:
src/confcom/azext_confcom/cose_proxy.py:146
- Updating the 'minimum_svn' parameter type from int to str in this function is a significant design change; please verify that all consumers of this API are adjusted to handle the new type.
def generate_import_from_path(self, fragment_path: str, minimum_svn: str) -> str:
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
|
[Release] Update index.json for extension [ confcom ] : https://dev.azure.com/msazure/One/_build/results?buildId=126641555&view=results |
refactoring policy generation code via
-iPreviously the
--inputflags foracifragmentgenandacipolicygenused two different functions. This consolidates those and fixes a bug that excluded the option forscenarioto be used for `acipolicygen.This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az confcom
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.