Make extension registry updates resilient to coordinated multi-extension version bumps#8927
Draft
JeffreyCA wants to merge 7 commits into
Draft
Make extension registry updates resilient to coordinated multi-extension version bumps#8927JeffreyCA wants to merge 7 commits into
JeffreyCA wants to merge 7 commits into
Conversation
Add a --no-dependencies flag to `azd extension install` and cross-dependency registry validation so parallel per-extension release pipelines no longer fail at the "Refresh Fig/Usage snapshots" step when interdependent extensions are bumped together. The snapshot step installs every extension from registry.json through the full dependency-resolving path, but each pipeline rewrites only its own entry against main, so the registry is transiently inconsistent during a coordinated bump. --no-dependencies installs only the named extension, without resolving or installing declared dependencies and without enforcing installed-dependency constraints, on both the fresh-install and reinstall/upgrade paths. The snapshot helper uses it; a normal install is unchanged. Nothing is dropped from the snapshot because every binaried dependency is also a top-level registry entry. Registry validation now checks every declared dependency against published versions using the installer's constraint matcher: an unsatisfiable constraint is an error, an absent dependency id is a warning. A new TestRegistryFileIsValid gate catches inconsistency at PR time instead of inside a snapshot test.
Contributor
Author
bfe3d50 to
351477d
Compare
351477d to
9d8fb90
Compare
9d8fb90 to
edf5fc4
Compare
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.


Fixes #8924
This PR makes extension registry updates resilient when several interdependent extensions are released at the same time.
The problem
When we recently bumped all the
azure.ai.*extension versions together (#8896) and kicked off the per-extension release pipelines in parallel, every pipeline failed at the "Refresh Fig/Usage snapshots" step.The root cause is that this step installs every extension from the in-repo
registry.jsonthrough the full, dependency-resolving install path, and fails on the first error. But each pipeline rewrites only its own registry entry against the current tip ofmain, so the registry under test was transiently inconsistent. That produced failures such as:dependency azure.ai.inspector required by azure.ai.agents was not foundinstalled dependency azure.ai.connections version 1.0.0-beta.1 does not satisfy constraint "~0.1.0-preview"We ended up reconciling the registry by hand. This PR closes the two gaps behind that outcome.
Change 1: decouple snapshot generation from dependency resolution
What this means: the ADO extension release pipeline should no longer fail on "Update_Registry - Refresh Fig/Usage snapshots", when the registry is momentarily inconsistent during multi-extension version bumps.
Command snapshots only need each extension's own binary so its commands register. They do not need the registry's dependency graph to be internally consistent.
--no-dependenciesflag toazd extension installthat installs only the named extension, without resolving or installing its declared dependencies and without enforcing the installed-dependency version constraints.azd extension install <id>still installs the full dependency graph exactly as before.microsoft.foundrymeta-package contributes no commands.Change 2: cross-dependency registry validation
What this means: a genuinely broken registry (a dependency pinned to a version that was never published) is blocked at PR time (not during release pipeline) with a clear, actionable message, instead of slipping through and breaking installs for users. Warnings and mid-rollout publishing are not blocked, so routine releases are unaffected.
Registry validation previously checked per-extension fields but never verified that a declared dependency could actually be resolved, so an inconsistent registry only surfaced as a cryptic install failure inside a snapshot test.
TestRegistryFileIsValidtest runs in theext-registry-ciworkflow, which triggers on any pull request that changesregistry.json, so the automated per-extension registry-update PRs are gated on it.Updating microsoft.foundry before all dependencies are updated:
Passing registry consistency but failing snapshot tests:
Successful run:
Behavior at a glance
--no-dependencies; the step no longer depends on registry-wide consistencyazd extension install <id>(no flag), end userazd extension install <id> --no-dependenciesregistry.json, naming the extension, constraint, and available versionsazd x publishwhile a single extension is mid-rolloutTesting
gofmt, andgolangci-lintall pass.