spec icon indicating copy to clipboard operation
spec copied to clipboard

Versioning

Open bamurtaugh opened this issue 3 years ago • 5 comments

As the spec continues to grow and evolve, some changes may be breaking. We should consider how to handle versioning so that the spec can continue to evolve without breaking users in implementing tools without their knowledge.

As one example, we've discussed various potentially breaking changes to Features (example). If our official Features get a breaking change, we can bump their major version, but we'll also want to consider how users of an implementing tool that surfaces this list will surface the appropriate version of the Features.

We could consider a similar versioning model to the package.json engine in npm or VS Code.

bamurtaugh avatar Jun 05 '23 17:06 bamurtaugh

This would be useful for larger functional changes like https://github.com/devcontainers/spec/pull/234.

One could imagine a Feature author adding engine: x.x.x to a Feature's devcontainer-feature.json to indicate to tooling that it expects at least version x.x.x to behave properly.

joshspicer avatar Jun 06 '23 17:06 joshspicer

We would have to refer to the spec revision (instead of the CLI version) to avoid being implementation specific. E.g.: "specMinRevision": "x". We could then increment that number whenever we add functionality to the spec and have a changelog-like history for the spec.

chrmarti avatar Jun 08 '23 15:06 chrmarti

Agreed with @chrmarti. Feels much more like an "epoch" in Rust or an "api version" in Stripe. It's a schema version that implementing tools can interrogate to determine which parser to use and how to treat forward and backward compatibility.

I don't think there's any need for anything more granular than a single digit number, and that number is incremented as major changes are introduced. Call it schemaVersion and support it in devcontainer.json, devcontainer-feature.json, and recommend that it be included in all devcontainer.metadata image label entries.

There is a consideration on whether devcontainer.json and devcontainer-feature.json have distinct versioning, and also what exactly would require a version bump.

avidal avatar Jun 27 '23 19:06 avidal

versioning is a great feature when reproducible build is a requirement. A complementary feature would be an automatic dependencies management which can identify a new version is available, PR is submitted, Ci which validates the change is triggered. dependabot and renovate are two tools which can be used.

lmilbaum avatar Jul 28 '23 03:07 lmilbaum

As the spec continues to grow and evolve, some changes may be breaking. We should consider how to handle versioning so that the spec can continue to evolve without breaking users in implementing tools without their knowledge.

As one example, we've discussed various potentially breaking changes to Features (example). If our official Features get a breaking change, we can bump their major version, but we'll also want to consider how users of an implementing tool that surfaces this list will surface the appropriate version of the Features.

We could consider a similar versioning model to the package.json engine in npm or VS Code.

gang marav tari

Nishapar avatar Jul 28 '23 07:07 Nishapar