Skip to content

✨ Allow me to keep tags in dagger.json  #7898

Closed

Description

@levlaz

What are you trying to do?

Right now if I add a tag to dagger.json, it will install the correct version of my module, but it will overwrite the dagger.json to show the whole git sha. It would be nice to keep the tag visible because it's easier for me to look at a module with many installed modules and look at the human readable version to see what version I am on.

Why is this important to you?

Keeping the human readable version around is a smoother DX because it reduces cognitive load. Without it I need to go poke around in various places to see what version I am on.

How are you currently working around this?

No response

Activity

  1. jedevc commented on Jul 12, 2024

    @jedevc
    Contributor

    Agreed - what we should really have here is a way of attaching both a tag and a git sha in a module ref. When we resolve a module ref's tag, we should rewrite it to include both - that way, you get the pinning and the readability all in one.

    For example, you can do this with docker images: <image>:<tag>@sha256:<hash>. Not quite sure what that would look like, maybe github.com/dagger/dagger/dev@<tag>:<hash>?

    Alternatively, the dagger.json could have two fields, source, which has the name it was installed by, and resolved, which has the full hashed name it was resolved to.

    One cool thing about tracking the tag we used at the beginning, is that if a tag is updated (e.g. v1.2 updated from v1.2.1 to v1.2.2), then this could be updated to the latest version here - but don't know if this is something we're interesting in actually supporting as a common use case.

  2. jedevc commented on Jul 12, 2024

    @jedevc
    Contributor

    Since this is kind of related to module ref formats, cc @grouville who is owning lots of stuff around that 🎉

  3. nadirollo commented on Sep 11, 2024

    @nadirollo

    Our use case could benefit from something related to this.

    Context:
    Our team owns plenty of dagger modules provided to the rest of the engineering team at our company.

    Once an engineer writes its own dagger module/pipeline and installs one of our maintained modules as a dependency, we lose all ability to push updates and bugfixes to the dependency module (it requires action from the engineer to do dagger install again).

    We are coming from Jenkins world where we provide the same type of service through a shared library where we have "rolling" tags. Engineers will write their pipelines using the stable tag, and they will have fixes and features pushed to the library without having to take any action.

    I understand how pinning to a version that will be changing is not the current model, but there's a case for that (at least in our company).

    Is this something that could be considered? Or any ideas on how this could be implemented in the current model?

  4. shykes commented on Sep 12, 2024

    @shykes
    Contributor

    I also need this! #8271

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions