Repository navigation
fix(features)!: map and refuse legacy Feature ids as the reference does - #66
Merged
Merged
Conversation
Legacy and shorthand Feature ids now follow the reference CLI's getBackwardCompatibleFeatureId, getFeatureIdType and updateDeprecatedFeaturesIntoOptions in up, build, read-configuration, upgrade, features resolve-dependencies, features info and outdated: - Only exact legacy names (node, golang, …) map to ghcr.io/devcontainers/features/<name>:1, and log TS's "(!) WARNING: Using the deprecated '<id>' Feature" line. - A legacy name with a tag (node:18, node:1) and any other id without a '/' fail with "Legacy feature '<id>' not supported". - gradle, maven and jupyterlab move into the java/python Feature they are now an option of, before any Feature is resolved. - owner/repo/feat is an OCI reference whose registry is "owner", no longer ghcr.io/owner/repo/feat. - --skip-feature-auto-mapping is accepted and ignored, as in TS. - outdated reports what getRef parses as written: legacy ids are left out, and a Feature without published versions is reported empty. - The lockfile's integrity is looked up by the mapped id, so an entry under a legacy id doesn't pin it, as in TS. A ts-oracle golden pins the three TS functions, and five parity cases compare the user-visible results with the reference. BREAKING CHANGE: node:18-style ids, other names without a '/', and owner/repo/feat ids that relied on an implicit ghcr.io now fail or resolve as in the official CLI; docs/migration.md says how to write them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Aligns legacy and shorthand Feature ids with the official CLI (TS
getBackwardCompatibleFeatureId,getFeatureIdType,updateDeprecatedFeaturesIntoOptions). This was drift, not a deliberate fix. Breaking: seedocs/migration.md.node,golang, … (exact legacy names)ghcr.io/devcontainers/features/<new>:1+(!) WARNING: Using the deprecated '<id>' Feature. See …node:18,node:1…/node:18Legacy feature '<id>' not supported, exit 1my-custom-featureoutdated/resolve-dependencies (ghcr lookup)gradle,maven,jupyterlabjava/pythonFeature's options before resolution, with TS's warningowner/repo/featghcr.io/owner/repo/featowner--skip-feature-auto-mappingnodeto map)outdated, legacy idsgetRefon the id as written)outdated, Feature with no versions{}/-)The lockfile integrity is now looked up by the mapped id, as in TS.
Tests
internal/features/testdata/ts-oracle/legacy.json(generated from the reference) pins the three TS functions (TestTSOracleLegacyFeatureIDs).read-configuration.legacy-feature-id-with-tag-error,read-configuration.deprecated-feature-into-options-error,outdated.legacy-ids-success. 2 need the network:read-configuration.feature-shorthand-registry-error,read-configuration.skip-feature-auto-mapping-success. All 5 fail with the pre-change binary.outdated; the old-mapping assertions are updated.Not changed (known): no GitHub Releases fallback (already documented, so the last error line differs from TS while the exit code matches), and Features are still resolved in id order rather than configuration order.
Validation (local)
task lint: 0 issues.task spec:compliance: pass.task test:racewithTMPDIRoutside/tmp: pass (two Docker-backed interop tests flaked under load and pass on a rerun).task parity:contract: only the 2 known/tmp/.gitcases fail locally.outdated/upgradecases pass.🤖 Generated with Claude Code