Repository navigation
Fallback for version resolution over unauthenticated git for feature installation. - #1744
Open
Kaniska (v-Kaniska244) wants to merge 8 commits into
Open
Kaniska (v-Kaniska244) wants to merge 8 commits into
Kaniska (v-Kaniska244) wants to merge 8 commits into
Conversation
Kaniska (v-Kaniska244)
marked this pull request as ready for review
September 22, 2026 07:33
…fallback # Conflicts: # src/go/devcontainer-feature.json # src/go/install.sh
Abdurrahmaan Iqbal (abdurriq)
approved these changes
Nov 4, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The resolver incorrectly treats Go minor-version requests such as 1.24 as exact versions, producing invalid download URLs and breaking the previous-minor retry.
5 open issues
What changed in this PR
This PR addresses #1726 by adding shared version resolution across 14 Dev Container Features, reducing installation failures when unauthenticated Git tag lookups are unavailable.
Changes:
- Adds exact-version bypass, alternate discovery sources, installer-owned fallback versions, and diagnostic messages.
- Integrates the resolver into affected installers and bumps Feature metadata versions.
- Adds resolver synchronization, a deterministic test matrix, and focused CI checks.
| File | Description |
|---|---|
test/_global/version-resolution/test.sh |
Tests resolution paths and installer wiring. |
test/_global/version-resolution/cases.sh |
Defines per-tool resolution cases. |
src/terraform/scripts/version-resolution.sh |
Packages the shared resolver. |
src/terraform/install.sh |
Adds fallbacks for Terraform and supporting tools. |
src/terraform/devcontainer-feature.json |
Bumps the patch version. |
src/rust/scripts/version-resolution.sh |
Packages the shared resolver. |
src/rust/install.sh |
Adds Rust version fallback. |
src/rust/devcontainer-feature.json |
Bumps the patch version. |
src/python/scripts/version-resolution.sh |
Packages the shared resolver. |
src/python/install.sh |
Adds Python, OpenSSL, and Cosign fallbacks. |
src/python/devcontainer-feature.json |
Bumps the patch version. |
src/powershell/scripts/version-resolution.sh |
Packages the shared resolver. |
src/powershell/install.sh |
Adds stable and preview fallbacks. |
src/powershell/devcontainer-feature.json |
Bumps the patch version. |
src/php/scripts/version-resolution.sh |
Packages the shared resolver. |
src/php/install.sh |
Adds PHP and Xdebug fallbacks. |
src/php/devcontainer-feature.json |
Bumps the patch version. |
src/node/scripts/version-resolution.sh |
Packages the shared resolver. |
src/node/install.sh |
Adds NVM version fallback. |
src/nix/scripts/version-resolution.sh |
Packages the shared resolver. |
src/nix/install.sh |
Adds Nix version fallback. |
src/nix/devcontainer-feature.json |
Bumps the patch version. |
src/kubectl-helm-minikube/scripts/version-resolution.sh |
Packages the shared resolver. |
src/kubectl-helm-minikube/install.sh |
Adds fallbacks to tool resolution calls. |
src/kubectl-helm-minikube/devcontainer-feature.json |
Bumps the patch version. |
src/go/scripts/version-resolution.sh |
Packages the shared resolver. |
src/go/install.sh |
Adds release-index discovery and a fallback pin. |
src/github-cli/scripts/version-resolution.sh |
Packages the shared resolver. |
src/github-cli/install.sh |
Adds GitHub CLI version fallback. |
src/git-lfs/scripts/version-resolution.sh |
Packages the shared resolver. |
src/git-lfs/install.sh |
Adds Git LFS version fallback. |
src/git-lfs/devcontainer-feature.json |
Bumps the patch version. |
src/docker-outside-of-docker/scripts/version-resolution.sh |
Packages the shared resolver. |
src/docker-outside-of-docker/install.sh |
Adds Compose and compose-switch fallbacks. |
src/docker-outside-of-docker/devcontainer-feature.json |
Bumps the patch version. |
src/docker-in-docker/scripts/version-resolution.sh |
Packages the shared resolver. |
src/docker-in-docker/install.sh |
Adds Compose, compose-switch, and buildx fallbacks. |
src/copilot-cli/scripts/version-resolution.sh |
Packages the shared resolver. |
src/copilot-cli/install.sh |
Integrates prerelease resolution and preserves auto-update intent. |
src/copilot-cli/devcontainer-feature.json |
Bumps the patch version. |
scripts/version-resolution.sh |
Defines canonical resolution and fallback behavior. |
scripts/sync-version-resolution.sh |
Distributes the resolver and checks for drift. |
.github/workflows/version-resolution.yaml |
Runs synchronization, fallback tests, and ShellCheck. |
Review effort: Balanced
|
|
||
| # Fully qualified versions are user assertions. Do not require the network | ||
| # to prove that a requested release exists. | ||
| if echo "${normalized_request}" | grep -Eq "^${version_regex}$"; then |
| tag_prefix=${tag_prefix#tags/} | ||
| local normalized_request=${requested_version#"${tag_prefix}"} | ||
|
|
||
| local escaped_separator=${separator//./\.} |
|
|
||
| prerelease_version="$(resolve_prerelease_version "$(git ls-remote --tags https://github.com/github/copilot-cli)")" | ||
| download_from_github "https://github.com/github/copilot-cli/releases/download/${prerelease_version}/${cli_filename}" | ||
| find_version_from_git_tags CLI_VERSION "https://github.com/github/copilot-cli" "tags/v" "." "false" "(-[0-9]+)" "${COPILOT_CLI_LAST_KNOWN_VERSION}" |
|
|
||
| prerelease_version="$(resolve_prerelease_version "$(git ls-remote --tags https://github.com/github/copilot-cli)")" | ||
| download_from_github "https://github.com/github/copilot-cli/releases/download/${prerelease_version}/${cli_filename}" | ||
| find_version_from_git_tags CLI_VERSION "https://github.com/github/copilot-cli" "tags/v" "." "false" "(-[0-9]+)" "${COPILOT_CLI_LAST_KNOWN_VERSION}" |
| PYTHON_INSTALL_PATH="${INSTALLPATH:-"/usr/local/python"}" | ||
| OVERRIDE_DEFAULT_VERSION="${OVERRIDEDEFAULTVERSION:-"true"}" | ||
| PYTHON_LAST_KNOWN_VERSION="3.14.7" | ||
| OPENSSL3_LAST_KNOWN_VERSION="4.0.2" |
This branch has not been deployed
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.


Description
Closes #1726.
Several Features resolve partial or symbolic versions using unauthenticated
git ls-remoterequests. When those requests fail because of network issues,rate limiting, or GitHub availability, Feature installation currently fails
without another resolution path.
This PR introduces shared, resilient version-resolution behavior across 14
Features.
Changes
Adds a shared version resolver supporting this resolution order:
release index.
resolution remains unavailable.
Normalizes tag prefixes and supports:
latest,current,stable, andltspreviewandprereleaseKeeps fully qualified user versions independent of remote availability.
Emits warnings identifying failed and fallback resolution sources.
Defines each known-good version as a visible top-level
*_LAST_KNOWN_VERSIONvariable in its owning installer. The shared resolvercontains no repository-to-version catalog.
Adds a synchronization script for distributing the canonical resolver into
each Feature package and checking for drift.
Affected Features
Each affected Feature receives a patch version bump.
Tests
Adds a deterministic, network-independent test matrix covering every affected
Feature and tool.
The suite verifies:
*_LAST_KNOWN_VERSIONThe test matrix derives known-good values directly from each installer rather
than duplicating version pins in test data.
A focused GitHub Actions workflow runs synchronization checks, fallback tests,
and ShellCheck whenever relevant files change.
Validation
bash -ngit diff --checkpassesv1.33.0v3.17.3v1.31.1Compatibility
No Feature options or existing exact-version behavior are removed. The new
fallback paths apply only when dynamic version discovery is required and the
preferred source is unavailable.