Skip to content

Conversation

@xfz11
Copy link
Contributor

@xfz11 xfz11 commented Jun 5, 2025


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.

Fix Azure/azure-cli#31591

Copilot AI review requested due to automatic review settings June 5, 2025 05:00
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jun 5, 2025

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

@yonzhan
Copy link
Collaborator

yonzhan commented Jun 5, 2025

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

@github-actions
Copy link

github-actions bot commented Jun 5, 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>

Copy link
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 extension to version 3.3.4, introduces a helper to detect installed packages, and adjusts imports and release notes accordingly.

  • Bump extension version from 3.3.3 to 3.3.4 in setup and config
  • Add is_packaged_installed utility and consume it in credential-free flow
  • Update HISTORY.rst with a new release entry

Reviewed Changes

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

Show a summary per file
File Description
setup.py Version bumped to 3.3.4
config.py Version bumped to 3.3.4
_utils.py Added is_packaged_installed helper
_credential_free.py Imported new helper from _utils.py
HISTORY.rst Added 3.3.4 release notes entry
Comments suppressed due to low confidence (3)

src/serviceconnector-passwordless/azext_serviceconnector_passwordless/_utils.py:143

  • [nitpick] Function name 'is_packaged_installed' is unclear; consider renaming to 'is_package_installed' for grammatical correctness and clarity.
def is_packaged_installed(package_name):

src/serviceconnector-passwordless/azext_serviceconnector_passwordless/_utils.py:143

  • Add unit tests for 'is_packaged_installed' to cover both installed and not-installed scenarios and validate error logging paths.
def is_packaged_installed(package_name):

src/serviceconnector-passwordless/HISTORY.rst:7

  • [nitpick] The changelog entry for version 3.3.4 is too vague; consider detailing specific improvements and fixes to help users understand what changed.
* Some improvements and issue fixes.

Comment on lines +146 to +149
__import__(package_name)
return True
except ImportError:
return False
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

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

Instead of using 'import' to check package installation, consider using 'importlib.util.find_spec' to avoid executing package code for a simple presence check.

Suggested change
__import__(package_name)
return True
except ImportError:
return False
from importlib.util import find_spec
return find_spec(package_name) is not None

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Jun 5, 2025

@necusjz
Copy link
Member

necusjz commented Jun 5, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@necusjz necusjz merged commit f8acf70 into Azure:main Jun 5, 2025
32 checks passed
@azclibot
Copy link
Collaborator

azclibot commented Jun 5, 2025

[Release] Update index.json for extension [ serviceconnector-passwordless-3.3.4 ] : https://dev.azure.com/msazure/One/_build/results?buildId=126332741&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UserWarning: pkg_resources is deprecated as an API

4 participants