Skip to content

Add Azure Package Registry preview extension (apr) - #10317

Open
Kai Daniels (kaidaniels13) wants to merge 14 commits into
Azure:mainfrom
kaidaniels13:kaidaniels_microsoft/package-registry-preview-extension
Open

Kai Daniels (kaidaniels13) wants to merge 14 commits into
Azure:mainfrom
kaidaniels13:kaidaniels_microsoft/package-registry-preview-extension

Conversation

@kaidaniels13

@kaidaniels13 Kai Daniels (kaidaniels13) commented Sep 9, 2026

Copy link
Copy Markdown

Adds the initial Azure Package Registry preview extension under the final apr identity.

Related command

az apr

Implementation

  • Generated AAZ management-plane commands for az apr registry.
  • Custom data-plane commands for repositories, releases, packages, distributions, remotes, publications, and tasks.
  • Shared shipping source kept synchronized with the service repository.

Validation

  • azdev style apr
  • azdev linter apr
  • python scripts/ci/test_index.py -q
  • Offline ScenarioTests for all 61 command/group help paths and three representative required-argument failures
  • Preview version follows the Azure CLI extension version scheme: 1.0.0b1
  • Wheel builds as apr, imports azext_apr, and contains no retired package identity

Review questions

  • Is the generated AAZ versus custom data-plane split appropriate for the initial preview?
  • Are there command-shape or help changes needed before the ARM contract is finalized?

Remaining release dependencies

Live PPE validation still requires the final ARM endpoint shape, MISE audience, RP API version, deployed resources, and persisted AAZ model.

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Kai Daniels (@kaidaniels13),
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 pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Sep 9, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution Kai Daniels (@kaidaniels13)! We will review the pull request and get back to you soon.

@yonzhan

Copy link
Copy Markdown
Collaborator

alrs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 08bed320-d21b-400f-a944-11d6d6129c22
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 08bed320-d21b-400f-a944-11d6d6129c22
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99135581-9cf9-4a99-a7b3-63692da88967
@kaidaniels13 Kai Daniels (kaidaniels13) changed the title Add Package Registry preview extension Add Azure Package Registry preview extension (apr) Sep 15, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99135581-9cf9-4a99-a7b3-63692da88967
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99135581-9cf9-4a99-a7b3-63692da88967
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99135581-9cf9-4a99-a7b3-63692da88967
@dokikaikai

Copy link
Copy Markdown

alrs

Our naming has since been finalized to be APR (Azure Package Registry), just in-case its needed for naming tracking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99135581-9cf9-4a99-a7b3-63692da88967
@dokikaikai

Copy link
Copy Markdown

Ethan Yang (@necusjz) This is ready for an early pass. Could you review the command surface and whether the split between generated AAZ registry commands and custom data-plane commands makes sense for the initial preview? Live PPE validation will follow once the endpoint and authentication contracts are finalized

@necusjz

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@necusjz

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99135581-9cf9-4a99-a7b3-63692da88967
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99135581-9cf9-4a99-a7b3-63692da88967
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99135581-9cf9-4a99-a7b3-63692da88967
@necusjz

Copy link
Copy Markdown
Member

/azp run

@necusjz
Ethan Yang (necusjz) marked this pull request as ready for review September 16, 2026 00:17
Copilot AI lite review requested due to automatic review settings September 16, 2026 00:17
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A critical data-plane authentication issue remains, alongside the sync flag mismatch and missing registry wait scenario coverage.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds the initial Azure Package Registry preview CLI extension under the apr identity.

Changes:

  • Registers packaging metadata and the az apr command.
  • Adds generated registry and custom data-plane commands.
  • Adds authentication, paging, polling, resolution utilities, and tests.
File summaries
File Summary
src/service_name.json Registers the az apr service.
src/apr/setup.py Defines the package entry point.
src/apr/README.md Documents installation and usage.
src/apr/pyproject.toml Defines package and tooling metadata.
src/apr/linter_exclusions.yml Configures linter exclusions.
src/apr/LICENSE Adds the MIT license.
src/apr/HISTORY.rst Records preview release history.
src/apr/azext_apr/tests/test_task.py Tests task commands.
src/apr/azext_apr/tests/test_resolve.py Tests resource resolution.
src/apr/azext_apr/tests/test_repository.py Tests repository commands.
src/apr/azext_apr/tests/test_repository_release.py Tests release operations.
src/apr/azext_apr/tests/test_repository_package.py Tests repository package operations.
src/apr/azext_apr/tests/test_remote.py Tests remote commands.
src/apr/azext_apr/tests/test_registry.py Tests generated registry commands.
src/apr/azext_apr/tests/test_publication.py Tests publication commands.
src/apr/azext_apr/tests/test_polling.py Tests task polling.
src/apr/azext_apr/tests/test_paging.py Tests pagination.
src/apr/azext_apr/tests/test_package.py Tests package commands.
src/apr/azext_apr/tests/test_extension.py Tests extension loading and registration.
src/apr/azext_apr/tests/test_distro.py Tests distribution commands.
src/apr/azext_apr/tests/test_data_plane_composition.py Tests data-plane command composition.
src/apr/azext_apr/tests/latest/test_apr_scenario.py Covers command help and argument validation.
src/apr/azext_apr/tests/latest/__init__.py Initializes scenario tests.
src/apr/azext_apr/tests/__init__.py Initializes the test package.
src/apr/azext_apr/server/_resolve.py Resolves resource names and IDs.
src/apr/azext_apr/server/_polling.py Implements task polling.
src/apr/azext_apr/server/_paging.py Implements offset pagination.
src/apr/azext_apr/server/__init__.py Exports server utilities.
src/apr/azext_apr/commands/task.py Implements task commands.
src/apr/azext_apr/commands/repository.py Implements repository commands.
src/apr/azext_apr/commands/repository_release.py Implements release commands.
src/apr/azext_apr/commands/repository_package.py Implements repository package commands.
src/apr/azext_apr/commands/remote.py Implements remote commands.
src/apr/azext_apr/commands/publication.py Implements publication commands.
src/apr/azext_apr/commands/package.py Implements package commands.
src/apr/azext_apr/commands/distro.py Implements distribution commands.
src/apr/azext_apr/commands/__init__.py Registers custom commands.
src/apr/azext_apr/azext_metadata.json Declares preview metadata.
src/apr/azext_apr/aaz/latest/apr/registry/_wait.py Implements generated registry wait.
src/apr/azext_apr/aaz/latest/apr/registry/_update.py Implements generated registry update.
src/apr/azext_apr/aaz/latest/apr/registry/_show.py Implements generated registry show.
src/apr/azext_apr/aaz/latest/apr/registry/_list.py Implements generated registry list.
src/apr/azext_apr/aaz/latest/apr/registry/_delete.py Implements generated registry delete.
src/apr/azext_apr/aaz/latest/apr/registry/_create.py Implements generated registry create.
src/apr/azext_apr/aaz/latest/apr/registry/__init__.py Exports registry commands.
src/apr/azext_apr/aaz/latest/apr/registry/__cmd_group.py Defines the registry command group.
src/apr/azext_apr/aaz/latest/apr/__init__.py Exports generated APR commands.
src/apr/azext_apr/aaz/latest/apr/__cmd_group.py Defines the APR command group.
src/apr/azext_apr/aaz/latest/__init__.py Initializes the generated API package.
src/apr/azext_apr/aaz/__init__.py Initializes the generated command package.
src/apr/azext_apr/_client_factory.py Provides management client support.
src/apr/azext_apr/__init__.py Defines the extension loader.
src/apr/.gitignore Excludes build and test artifacts.
Review details
  • Files reviewed: 55/55 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

# every request is authenticated (AGENTS.md), so skip auth for localhost.
if not self._local:
token = _acquire_token(self._cli_ctx, self._resource)
headers["authorization"] = f"Bearer {token}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think the value shown here is being redacted by GitHub. The code already uses the token we acquire in the Authorization header as Bearer {token , and test_data_plane.py verifies the installed path with 1Bearer tok1231, so I dont think a code change is needed for this one.

"Mirror sync removes repository packages that are not present upstream. Continue?"
)
except NoTTYException:
logger.warning("Unable to prompt for confirmation as no tty available. Use --yes.")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Oki I updated the message to point to --confirm in 72e11b411.

("apr", "registry", "delete"),
("apr", "registry", "list"),
("apr", "registry", "show"),
("apr", "registry", "update"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Okii I added apr registry wait to the help coverage in 72e11b411.

@necusjz

Copy link
Copy Markdown
Member

Kai Daniels (@kaidaniels13) we need the pull request under Azure/aaz.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 99135581-9cf9-4a99-a7b3-63692da88967
@dokikaikai

dokikaikai commented Sep 16, 2026

Copy link
Copy Markdown

Kai Daniels (Kai Daniels (@kaidaniels13)) we need the pull request under Azure/aaz.

Thanks, I opened Azure/aaz#1091 for the persisted az apr registry command models. I think for this PR too we could use a fresh run of azp run - Lmk if anything else is needed heree~

@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

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

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants