Repository navigation
Description
In the upcoming v0.12 release, we plan to make a few backwards incompatible changes to the API. This includes:
- Changing function signatures
- Removal of deprecated fields
- etc.
However, these changes will likely require updates to module code, across the ecosystem. We want to make this transition as easy as possible - when users upgrade their cli/engine versions, they shouldn't need to worry about manually ensuring compatibility with their engines.
There are a couple of approaches possible:
- API emulation - serve the correct API to each module depending on their declared
engineVersion.- pro: very smooth, very easy to upgrade
- con: miserable for our own code, we have to support every API we create indefinitely
- Explicit breakage - have the engine explicitly reject modules that haven't explicitly upgraded to a version with breaking changes. So if a module has
v0.11.6labelled, and the engine is runningv0.11.8which has aMinimumModuleVersionofv0.11.7(because we introduced a backwards incompat there), then we should break loading the module.- pro: means we don't need to keep bug-for-bug compatibility or anything like that - if it's broken, we remove it
- con: harder for users to upgrade potentially
I think the right approach is going to involve a feature case-by-case for each. We are going to need to break backwards compatibility sometimes to do general cleanups, etc. But also, for some things we need to minimize breakage.
I think we should do a couple things here:
- Build internal scaffolding (and tests!) for having a
MinimumModuleVersionfeat: add module versioning compat checks #7692 - Build internal scaffolding for serving different API versions (or performing different codegen) to different declared
engineVersions. Dynamically serve module schemas based on engineVersion #7759
Once we've done this, it's just a matter of looking through the v0.12 milestone and working out which one goes into which - which ones should explicitly break, and which ones are gonna have graceful fallbacks.
Prior art:
- Version compatibility between cli and engine: feat: check version compatibility #5315
Previous discussions:
Activity
netikras commentedon Jun 13, 2024
(2¢ from a users perspective)
As long as you're hosting all the versions (i.e. available for download at any time), I don't see a problem with "Explicit breakage". If a module only works with 0.9.6, ten there's no point in upgrading the engine in the pipeline -- let it run with 0.9.6. Whenever a module developer is ready for the new engine's features, it's time for a dagger SDK's version bump and a rewrite of previous integrations.
again, I'd vote for adding a flag to manually override the version check. It could be that dagger ships with critical changes in an SDK's part that's not being used by the module (e.g. you make changes to .WithSecretVariable() but the module does not use any secrets).
Also, if you are introducing version checks, we (users) would like to see in the daggerverse which dagger versions are compatible with which modules. And then there's a question of using multiple modules for my own CI module -- these dependency modules might require different versions of dagger; is there smth to alleviate this pain point?
[-]Module versioning compatability[/-][+]Module versioning compatibility[/+]