🐞 Dagger Publish Does Not Work with Tags
levlaz opened this issue · comments
What is the issue?
The dagger publish
command does not work as expected when you are working with git tags and puts the daggerverse into a strange state.
Here is what I expect.
Running dagger publish
or dagger publish $TAG
inside of a dagger module should publish the latest tag into the daggerverse.
Here is what happens.
-
If I run
dagger publish
it will publish the most recent commit and even find the correct git tag that shows up in the daggerverse UI. But trying to go tohttps://daggerverse.dev/mod/github.com/levlaz/daggerverse/module@$TAG
results in a 404. -
If I run
dagger publish $TAG
it will publish the most recent commit and even find the correct git tag that shows up in the daggerverse UI. But trying to go tohttps://daggerverse.dev/mod/github.com/levlaz/daggerverse/module@$TAG
results in a screen that says "uploading module" forever.
The only way to get my module to show up properly at https://daggerverse.dev/mod/github.com/levlaz/daggerverse/module@$TAG
is to go through the publish process manually via the daggerverse UI.
You can see this bug live here: https://www.youtube.com/live/1M0sNwMjFLE?si=M-BiNAVj2W-xT0e3&t=1560
Dagger version
0.11.1
Steps to reproduce
No response
Log output
No response
This was a result of a change that was made some time back to make Daggerverse URLs only really support full git shas -- with only two ways to get to a url with a full sha:
- Full sha:
https://daggerverse.dev/mod/github.com/levlaz/daggerverse/novu@56559412d83814e93eb6444608119f03e5c1dec7
- No sha:
https://daggerverse.dev/mod/github.com/levlaz/daggerverse/novu
->https://daggerverse.dev/mod/github.com/levlaz/daggerverse/novu@56559412d83814e93eb6444608119f03e5c1dec7
becuase that is the sha of the latest tag (or would go to the chronologically latest sha if no tags)
There is an internal issue expressing the sentiment that any reasonable ref should be supported in the URL/location bar of the browser, but we haven't decided to act on that yet. https://linear.app/dagger/issue/DEV-3494
It does seem that sometimes a ref like https://daggerverse.dev/mod/github.com/levlaz/daggerverse/novu@v0.1.3
will work and redirect to the sha version, but in some other cases it does not. Need to understand why and make the behavior consistent.
Here is a module I just published: https://daggerverse.dev/mod/github.com/sagikazarmark/daggerverse/kustomize@833905febeb1c77937712dd9f69a2c85898c74d9
I'm starting to think the issue is caused by modules that were published prior to having any tags.
In the above case I immediately tagged the module after creating it and it showed up as a tagged module.
I was looking the same thing and ➗ to what @sagikazarmark said. I added a CI/CD workflow to publish my modules, and when I use a tag trigger to publish, it is able to detect the tag.
Workflow: https://github.com/aweris/daggerverse/actions/runs/8867226311/workflow
Module: docker@v0.0.1