Skip to content

Module versioning compatibility #7640

Closed

Description

@jedevc

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.6 labelled, and the engine is running v0.11.8 which has a MinimumModuleVersion of v0.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:

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:

Previous discussions:

cc @gerhard @vito @sipsma @helderco @shykes

Activity

  1. added this to the v0.12.0 milestone on Jun 12, 2024
  2. netikras commented on Jun 13, 2024

    @netikras

    (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?

  3. changed the title [-]Module versioning compatability[/-] [+]Module versioning compatibility[/+] on Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions