[confcom] Fix default working_dir for Windows#9816
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @MahatiC, |
|
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>
|
|
There was a problem hiding this comment.
Pull request overview
This PR updates the confcom extension to choose a Windows-appropriate default container working directory when an image does not specify WorkingDir, and bumps the extension version for release packaging.
Changes:
- Bump
confcomextension version from2.0.0b1to2.0.0b2. - Default missing/empty
WorkingDirtoC:\\when generating policies forwindows/*platforms (otherwise useconfig.DEFAULT_WORKING_DIR).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/confcom/setup.py |
Increments extension version to ship the fix. |
src/confcom/azext_confcom/security_policy.py |
Applies a Windows-specific fallback for WorkingDir during policy generation. |
| if not workingDir: | ||
| workingDir = ( | ||
| "C:\\" if self._platform and self._platform.startswith("windows") | ||
| else config.DEFAULT_WORKING_DIR | ||
| ) |
There was a problem hiding this comment.
The new Windows-specific default for WorkingDir isn’t covered by existing unit tests (no tests reference windows/amd64). Please add a test that exercises populate_policy_content_for_all_images for a windows/amd64 policy where the image config has an empty/absent WorkingDir, and assert that the resulting working dir is set to "C:\".
|
[Release] Update index.json for extension [ confcom ] : https://dev.azure.com/msazure/One/_build/results?buildId=161469761&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
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.