Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for feature order definition in devcontainer definitions #226

Open
kujenga opened this issue Jun 7, 2024 · 0 comments
Open

Comments

@kujenga
Copy link

kujenga commented Jun 7, 2024

Currently, the order that features are executed as part of the container build is alphabetically sorted in the following code, where there is a TODO to implement support for the "installation order" that is part of the devcontainer spec: https://containers.dev/implementors/features/#installation-order

// TODO: Respect the installation order outlined by the spec:
// https://containers.dev/implementors/features/#installation-order
featureOrder := []string{}
for featureRef := range s.Features {
featureOrder = append(featureOrder, featureRef)
}
// It's critical we sort features prior to compilation so the Dockerfile
// is deterministic which allows for caching.
sort.Strings(featureOrder)

The ask in this issue is to implement support for:

  • The dependsOn property defined as a part of a Feature’s devcontainer-feature.json.
  • The installsAfter property defined as part of a Feature’s devcontainer-feature.json.
  • The overrideFeatureInstallOrder property in user’s devcontainer.json. Allows users to control the order of execution of their Features.

I wasn't able to find an existing issue tracking this, but let me know if there is! Happy to also provide more context on why this is a useful feature if that helps in prioritizing this. Features with any sort of dependencies are unusable in most cases unless the alphabetical ordering happens to line up.


In the meantime, it would be helpful to have this documented in the way that this PR did for other unsupported features: #219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants