Skip to content

feat(extensions): publish PR bundles - #9553

Open
JeffreyCA wants to merge 2 commits into
mainfrom
issue-9409-pr-extension-bundles
Open

feat(extensions): publish PR bundles#9553
JeffreyCA wants to merge 2 commits into
mainfrom
issue-9409-pr-extension-bundles

Conversation

@JeffreyCA

@JeffreyCA JeffreyCA commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #9409

Summary

This PR publishes an unsigned, self-contained bundle for each first-party extension PR pipeline and posts a direct install command on the pull request. It provides a safe way to share unmerged extension builds without manually transferring ZIP files or running a release pipeline that can create tags, GitHub releases, durable release artifacts, and registry updates.

PR publishing is separate from signing and official release publishing. Installing a bundle also leaves no temporary PR registry source on the tester's machine.

Publishing and storage

The flow adapts the existing core CLI PR publishing pattern: prepare a pipeline artifact, upload it through a non-production 1ES deployment, then post tagged install instructions. Extensions add a packaging job because their six platform binaries must first be combined into one bundle.

  • PR versions use <version>-pr.<pr-number>.<build-id>, or <version>.pr.<pr-number>.<build-id> when the base is already a prerelease.
  • The pipeline packages the existing Linux, macOS, and Windows AMD64 and ARM64 artifacts with azd x pack --bundle.
  • A non-production 1ES deployment uses the existing Azure SDK Artifacts service connection and azcopy authentication.
  • Bundles are public block blobs in the azuresdkartifacts static website $web container at azd/extensions/pr/<pr-number>/<sanitized-extension-id>.zip.
  • Each pipeline uploads one uniquely named bundle, allowing concurrent extension pipelines to share the PR folder without collisions.
  • Upload uses azcopy copy --overwrite=true, replacing only that extension's previous bundle without deleting sibling blobs.
  • Each tagged PR comment contains the unsigned-build warning, azd ext install command, version, and merge commit.
  • The comment helper posts the replacement before deleting older tagged comments and fails closed on GitHub API errors.

Storage retention is managed outside this repository. The common $web/azd/extensions/pr/ prefix allows EngSys to apply a lifecycle rule per blob, such as deletion after a configured number of days since its last modification. No PR-close cleanup job or lifecycle policy is added here.

This is the supported replacement needed before restricting off-main extension release publishing in #9408.

Testing

  • Ran 45 Pester tests covering stable, prerelease, override, error, and nightly versioning cases.
  • Ran the generated internal extension pipeline scaffold test.
  • Parsed the affected pipeline and workflow YAML and verified path filters across all 17 first-party extension pipelines.
  • Exercised tagged-comment discovery and posting failure paths.
  • Verified the generated comment Markdown and flattened bundle URL.
  • Confirmed the internal Azure Pipelines run published bundles and posted extension-specific comments.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 17 pipeline(s).
4 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot added area/extensions Extensions (general) ext-x microsoft.azd.extensions developer extension (azd x) labels Aug 13, 2026
@JeffreyCA
JeffreyCA requested a balanced review from Copilot August 13, 2026 00:09

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.

Pull request overview

Adds automated, unsigned PR bundles for first-party extensions, published to temporary storage with installation instructions posted on the PR.

Changes:

  • Generates unique PR-specific extension versions with Pester coverage.
  • Packs, uploads, and comments multi-platform extension bundles.
  • Enables the workflow across existing and newly scaffolded extension pipelines.
Show a summary per file
File Description
eng/scripts/Set-ExtensionVersionVariable.Tests.ps1 Tests PR and nightly version generation.
eng/scripts/Set-ExtensionVersionVariable.ps1 Adds PR-specific version suffixes and overrides.
eng/pipelines/templates/steps/update-prcomment.yml Posts replacement comments before deleting previous ones.
eng/pipelines/templates/stages/release-azd-extension.yml Adds the internal PR publishing stage.
eng/pipelines/templates/stages/publish-extension-pr.yml Builds, uploads, and announces PR bundles.
eng/pipelines/release-ext-microsoft-azd-extensions.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-microsoft-azd-demo.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-microsoft-azd-concurx.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-microsoft-azd-ai-builder.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-coding-agent.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-appservice.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-training.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-toolboxes.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-skills.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-routines.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-rle.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-projects.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-models.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-inspector.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-finetune.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-connections.yml Enables shared PR bundle triggers.
eng/pipelines/release-ext-azure-ai-agents.yml Enables shared PR bundle triggers.
cli/azd/extensions/microsoft.azd.extensions/internal/resources/internal/go/pipelines/release-ext.yml.tmpl Updates generated internal pipelines.
cli/azd/extensions/microsoft.azd.extensions/internal/cmd/init_test.go Verifies generated pipeline references.
cli/azd/docs/extensions/extension-resolution-and-versioning.md Documents PR bundle URLs and versioning.
.github/workflows/cli-ci.yml Runs the new Pester test suite.

Review details

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

  • Files reviewed: 26/26 changed files
  • Comments generated: 0
  • Review effort level: Balanced

JeffreyCA and others added 2 commits August 13, 2026 17:52
Build and publish unsigned per-PR extension bundles at stable storage URLs, then post concise install instructions on each affected pull request.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Flatten PR bundle storage by extension filename and simplify the generated install comment based on the first successful pipeline run.

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

Copilot-Session: a605e7f0-007c-40e9-9e32-0fe36c10599b
@JeffreyCA
JeffreyCA force-pushed the issue-9409-pr-extension-bundles branch from 8d4c25a to 0d5ecc7 Compare August 13, 2026 18:05
@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.ai.models PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9553/azure-ai-models.zip"
  • Version: 0.0.7-preview.pr.9553.6699587
  • Merge commit: 9911725

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.

Review details

Suppressed comments (1)

eng/pipelines/templates/stages/publish-extension-pr.yml:23

  • azd-code-reviewer: Fork PRs also satisfy this condition, but the Publish_For_PR deployment requires the Azure SDK Artifacts service connection and the comment job requires a GitHub token; Azure Pipelines withholds these resources from fork builds by default. Those contributors will get a failed validation run instead of the normal build described in #9409. Exclude System.PullRequest.IsFork here (or explicitly skip only the credentialed jobs) so fork PRs remain buildable.
      and(
        succeeded(),
        ne(variables['Skip.Release'], 'true'),
  • Files reviewed: 25/25 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

SetExecutableBit: true
AZURE_DEV_CI_OS: mac-arm64

- ${{ if eq(variables['System.TeamProject'], 'internal') }}:

@JeffreyCA JeffreyCA Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Currently gated on internal, which means the following extensions won't have the publish integration as they run in azure-sdk/public:

  • azure.ai.agents
  • azure.ai.finetune
  • azure.coding-agents
  • microsoft.azd.ai.builder
  • microsoft.azd.concurx
  • microsoft.azd.demo
  • microsoft.azd.extensions

@github-actions

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Thank you for logging this issue; our team is reviewing it. If you need urgent prioritization, tag Rick Winter (@RickWinter) and Kristen Womack (@kristenwomack) to let us know.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 17 pipeline(s).
4 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.appservice PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9553/azure-appservice.zip"
  • Version: 0.1.1-pr.9553.6705362
  • Merge commit: 2d1d240

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.ai.inspector PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9553/azure-ai-inspector.zip"
  • Version: 1.0.0-beta.3.pr.9553.6705364
  • Merge commit: 2d1d240

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.ai.training PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9553/azure-ai-training.zip"
  • Version: 0.0.3-preview.pr.9553.6705370
  • Merge commit: 2d1d240

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.ai.routines PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9553/azure-ai-routines.zip"
  • Version: 1.0.0-beta.4.pr.9553.6705366
  • Merge commit: 2d1d240

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.ai.projects PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9553/azure-ai-projects.zip"
  • Version: 1.0.0-beta.6.pr.9553.6705365
  • Merge commit: 2d1d240

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.ai.skills PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9553/azure-ai-skills.zip"
  • Version: 1.0.0-beta.3.pr.9553.6705367
  • Merge commit: 2d1d240

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.ai.toolboxes PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9553/azure-ai-toolboxes.zip"
  • Version: 1.0.0-beta.5.pr.9553.6705368
  • Merge commit: 2d1d240

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.ai.connections PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9553/azure-ai-connections.zip"
  • Version: 1.0.0-beta.4.pr.9553.6705363
  • Merge commit: 2d1d240

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

azure.ai.rle PR build

Note

This is an unsigned development build. Install it only if you trust this PR.

Install the extension:

azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9553/azure-ai-rle.zip"
  • Version: 0.3.0-preview.pr.9553.6705373
  • Merge commit: 2d1d240

[string] $ExtensionDirectory,
# Defaults to the pipeline-provided values so the script is unit-testable.
[string] $BuildReason = $env:BUILD_REASON,
[string] $BuildReasonOverride = $env:BUILDREASONOVERRIDE,

@danieljurek Daniel Jurek (danieljurek) Aug 14, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I discovered (through Richard Park (@richardpark-msft)) that you can specify the reason when queueing the build with the API... which negates much of the BuildReasonOverride logic I wrote in the other parts of the azd engsys: https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/queue?view=azure-devops-rest-7.1#buildreason

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This all looks reasonable to me

@danieljurek

Copy link
Copy Markdown
Member

cc Chidozie Ononiwu (@chidozieononiwu) ... nothing here CFS-related

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

Labels

area/extensions Extensions (general) ext-x microsoft.azd.extensions developer extension (azd x)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Extensions] Publish per-PR extension bundles to storage and post install instructions on the PR

3 participants