Skip to content

[confcom] Fix default working_dir for Windows#9816

Merged
necusjz merged 2 commits intoAzure:mainfrom
MahatiC:fix-working-dir
Apr 23, 2026
Merged

[confcom] Fix default working_dir for Windows#9816
necusjz merged 2 commits intoAzure:mainfrom
MahatiC:fix-working-dir

Conversation

@MahatiC
Copy link
Copy Markdown
Contributor

@MahatiC MahatiC commented Apr 22, 2026


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

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.json automatically.
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.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 22, 2026

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

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @MahatiC,
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
Copy Markdown
Collaborator

yonzhan commented Apr 22, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

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>

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

@MahatiC MahatiC marked this pull request as ready for review April 22, 2026 09:13
Copilot AI review requested due to automatic review settings April 22, 2026 09:13
Copy link
Copy Markdown
Contributor

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 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 confcom extension version from 2.0.0b1 to 2.0.0b2.
  • Default missing/empty WorkingDir to C:\\ when generating policies for windows/* platforms (otherwise use config.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.

Comment thread src/confcom/setup.py
Comment on lines +500 to +504
if not workingDir:
workingDir = (
"C:\\" if self._platform and self._platform.startswith("windows")
else config.DEFAULT_WORKING_DIR
)
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

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:\".

Copilot uses AI. Check for mistakes.
Comment thread src/confcom/azext_confcom/security_policy.py
@yonzhan yonzhan requested a review from necusjz April 22, 2026 12:32
@necusjz necusjz merged commit 49c12ab into Azure:main Apr 23, 2026
24 checks passed
@azclibot
Copy link
Copy Markdown
Collaborator

[Release] Update index.json for extension [ confcom ] : https://dev.azure.com/msazure/One/_build/results?buildId=161469761&view=results

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.

5 participants