[Features] installsAfter is ignored, if a version is given
See original GitHub issueIf I define an installsAfter in a devcontainer-feature.json
like this:
"installsAfter": [
"ghcr.io/devcontainers/features/node"
]
It looks like this is honored, if I define the feature exactly like that
// Works
"ghcr.io/devcontainers/features/node": {}
but not if I define it with a version instead, e.g.
// Doesn't work
"ghcr.io/devcontainers/features/node:1": {},
To reproduce that, e.g. have a look at this scenario.json https://github.com/NicoVIII/devcontainer-features/blob/main/test/pnpm/scenarios.json The first two testcases work as expected, the last one, where I defined the version, didn’t. You can look at that in the output of the GitHub Actions job (which is a bit crowded with all the docker output, but after a while you can see, that the first two scenarios succeeded, while the last one didn’t): https://github.com/NicoVIII/devcontainer-features/actions/runs/3399930614/jobs/5654000995#step:4:2058
Is this intended? I would have guessed, that installsAfter works for all versions, if I don’t define one in there.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
If I am understanding it correctly, then looks like the issue occurs for the version-bug scenario (It is using a versioned Node Feature (ie
ghcr.io/devcontainers/features/node:1
) - which should be allowed I believe).The author expects the
pnpm
Feature to be installed afterghcr.io/devcontainers/features/node
Feature because of 👇 (which makes sense to me)I tried to repro with
devcontainer features test ...
command and the I can see that the Compute Order is incorrect in the logs.@joshspicer Could this be a bug in the
devcontainer features test
command ?I was able to successfully create a dev container as follows 👇 . The compute order was correct, so probably not a bug with
installsAfter
property? 🤔I still have this problem and I don’t have it only in the CLI tests but also when I try to use the feature in VScode directly.
devcontainer.json
Output: