Conversation
Write the package identity into the built Azure CLI metadata so older metadata parsers can identify ML wheels built with modern setuptools. Keep source metadata, runtime dependencies, and minimum CLI unchanged. Add regression coverage for wheel identity, legacy readers, CLI JSON output, and incremental builds, with a Python 3.12 CI gate. Authored-by: GitHub Copilot SDK (version not exposed) Model: GPT-6 Astra (gpt-6-astra) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: da39d407-596a-4078-a372-19ac7fb8699e
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested review from
ZelinWang (wangzelin007) and
Yong Zhang (yonzhan)
September 30, 2026 09:50
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The legacy-reader test’s mock target is incompatible with the Azure CLI dev version installed in CI.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds build-time ML extension identity metadata for compatibility with older Azure CLI metadata readers.
Changes:
- Generates name/version metadata during wheel builds.
- Adds five packaging regression cases and Python 3.12 CI coverage.
- Documents compatibility behavior and release notes.
| File | Description |
|---|---|
src/machinelearningservices/setup.py |
Adds the metadata build hook. |
tests/e2e/packaging/test_packaging_lifecycle.py |
Adds compatibility tests. |
tests/e2e/packaging/fixtures/manifest.json |
Registers the ML fixture. |
azure-pipelines.yml |
Runs ML packaging tests on Python 3.12. |
src/machinelearningservices/README.rst |
Documents packaging compatibility. |
src/machinelearningservices/HISTORY.rst |
Adds release history. |
src/machinelearningservices/CHANGELOG.rst |
Adds changelog entry. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| installed_dir, _ = ml_metadata_install | ||
| # pkginfo 1.8.2 leaves name/version unset for Metadata-Version: 2.4. | ||
| unreadable_metadata = SimpleNamespace(name=None, version=None) | ||
| with patch("azure.cli.core.extension.pkginfo.Wheel", return_value=unreadable_metadata): |
Collaborator
|
Please fix CI issues |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Background and defect
Modern setuptools emits wheel Metadata-Version 2.4. Older Azure CLI installations, including the pkginfo 1.8.2 reader shipped with CLI 2.75.0, cannot parse that format and report an installed ML extension version as null. This also removes the installed-version information used by dynamic installation to avoid reinstalling the same extension after a command-resolution failure.
Change and compatibility
This change does not alter Azure CLI's retry/prompt implementation or promise complete SDK runtime compatibility with every older CLI bundle. A separately observed SDK/Azure Core import conflict is outside this PR's scope. Publishing a corrected release still requires the normal extension release/versioning process; this PR does not overwrite a published wheel.
Dependencies and merge order
None. This is an independent fix targeting main, based on 4e0b4f3. It does not require the pending ML release-version PR.
Validation
Validation pending for repository CI.