#What's the current recommended way to

1 messages · Page 1 of 1 (latest)

formal burrow
#

Looking into this.

hazy obsidian
formal burrow
#

@strange bobcat Started a thread here.

#
daggerverse ➤ ls -1 | xargs -I {} bash -c "pushd {} && dagger publish && popd"
#

that works, for example.

#

but this doesn't with dagger v0.13.5 or v0.12 or v0.11 or v0.10

~~daggerverse ➤ ls -1 | xargs -I {} bash -c "DAGGER_MODULE={} && dagger publish"~~

whoops, shouldn't have the && in there

Error: failed to get configured module: no dagger.json found in directory . or any parents up to git root
strange bobcat
#

ok, checking this now 🙌

#

k, as Jeremy is correctly highlighting above, seems like DAGGER_MODULE doesn't play very well with Dagger Publish. I'll send a PR to fix it. In the meantime @brisk patio , any chance you can change your step to use the working-directory option instead of using the DAGGER_MODULE var?

strange bobcat
#

I accidentally copy/pasted Jeremy's snippet but it has a small error

#

DAGGER_MODULE is not correctly defined

formal burrow
#
ls -1 | grep -v LICENSE | xargs -I {} bash -c "DAGGER_MODULE={} dagger publish"
strange bobcat
#

@brisk patio it seems to me that it's working correctly?

i.e: this is the last GHA job I see for your repo: https://github.com/sagikazarmark/daggerverse/actions/runs/11300127431 which is for commit: 14ff058bbf8e1ced23cfeca1a68b1635e0e414bb

if I look for your modules in Daggerverse, I see that version exist for all of them:
i.e:
https://daggerverse.dev/mod/github.com/sagikazarmark/daggerverse/trivy@14ff058bbf8e1ced23cfeca1a68b1635e0e414bb

GitHub

My Dagger modules. Contribute to sagikazarmark/daggerverse development by creating an account on GitHub.

#

cc @formal burrow we should change the UI to display the "tagged" and "not tagged" version of the module

brisk patio
#

Check my quarto module, that one is way behind of the latest tag

brisk patio
#

Chances are actions logs are lost at this point :/

#

I believe I even tried running dagger publish locally, but if the exact tag isn’t checked out, dagger publish doesn’t work

#

But I have to verify that

strange bobcat
brisk patio
#

Yep

#

I don't know if it matters, but there is a chance that multiple publish request may be triggered by CI at the same time. If there is some sort of locking that prevents crawling the same module in parallel, that could be a reason why it sometimes works, sometimes doesn't.

strange bobcat
brisk patio
strange bobcat
#

and the tag appears now

#

so the module seems to be crawled before the tag exists in the repo somehow

#

@formal burrow shall we add --recrawl to dagger publish?

brisk patio
#

Well, I usually work through PRs, so the tagged commit may certainly be published when it hits main. I usually tag after merging which triggers another job, another publish.

#

I could just disable publishing on main

strange bobcat
brisk patio
#

But dagger call would still "publish" it

strange bobcat
brisk patio
#

So i don't think that would help

formal burrow
strange bobcat
# formal burrow Feels more like we could do this automatically if we checked for tags when a pub...

this is tricky.. we intentionally made the recrawl endpoint private since crawling is not a cheap operation. That pretty much requires cloning the repository and then running a bunch of introspection queries. We can't also check for tags in a lightweight way since we're relying in the git protocol for that as it's not realistic to implement tag checking against each VCS hosting provider... Thinking about options here 🤔

formal burrow
strange bobcat
brisk patio
#

@strange bobcat @formal burrow do you have any updates on this? Thanks!

strange bobcat
strange bobcat
#

@brisk patio should be fixed now. Funny enough this should was supported in the past but it seems like we added a regression which prevented the tag to be assigned to the published module

brisk patio
strange bobcat