`overrideFeatureInstallOrder` gets confused when higher-priority features have dependencies

Aperta
#1,200 1 commento 1 reazione 1 assegnatario Vedi su GitHub

@v-Kaniska244 ci sta già lavorando.

Dal 20/4/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

I wanted to install features in a specific order, and used overrideFeatureInstallOrder to do that. I was surprised when the feature I wanted to install last installed first!

I have a minimal reproduction at https://github.com/dgholz/devcontainer-install-override

In the devcontainer.json file, I have:

{
    "image": "mcr.microsoft.com/devcontainers/base:trixie",
    "features": {
        "./features/use-tr": {},
        "./features/remove-tr": {}
    },
    "overrideFeatureInstallOrder": [
      "./features/use-tr",
      "./features/remove-tr"
    ]
}

But use-tr has a dependency on the common feature, and remove-tr does not. So when computeDependsOnInstallationOrder runs, it gets tripped up by
https://github.com/devcontainers/cli/blob/997a2db1ec28eacfb718d07e7741dbd57af59564/src/spec-configuration/containerFeaturesOrder.ts#L625
use-tr gets excluded, and remove-tr has round priority 1 so gets installed before common (which has round priority 0)

The fix is to either set the round priority transitively (so common would get round priority 2 from use-tr); or to reverse the calculated priority ordering, so features with no dependencies would be installed first.

Lingua principale
TypeScript
Stelle
3k
Fork
461
Merge medio
13h 17m
PR unite (30g)
6

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di devcontainers/cli

Tutte le issue di devcontainers/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.