#dagger call -m github.com/aweris/gale?subpath=daggerverse/gale
1 messages · Page 1 of 1 (latest)
Some examples I used
dagger call --mod "git://github.com/aweris/gale?subpath=daggerverse/gale?ref=main"
✘ build "dagger call" ERROR [0.00s]
├ [0.00s] loading module
• Engine: d86d308ec69e (version v0.9.0)
⧗ 0.94s ✔ 3 ✘ 1
Error: failed to load module: failed to load module: failed to get module config: failed to read local config file: open git:/github.com/aweris/gale?subpath=daggerverse/gale?ref=main/dagger.json: no such file or directory
dagger call --mod "https://github.com/aweris/gale?subpath=daggerverse/gale?ref=main"
✘ build "dagger call" ERROR [0.00s]
├ [0.00s] loading module
• Engine: d86d308ec69e (version v0.9.0)
⧗ 1.12s ✔ 3 ✘ 1
Error: failed to load module: failed to load module: failed to get module config: failed to read local config file: open https:/github.com/aweris/gale?subpath=daggerverse/gale?ref=main/dagger.json: no such file or directory
dagger call --mod "github.com/aweris/gale?subpath=daggerverse/gale"
✘ build "dagger call" ERROR [0.77s]
├ [0.77s] loading module
✘ stdout ERROR [0.23s]
✘ exec git ls-remote --symref https://github.com/aweris/gale?subpath=daggerverse HEAD ERROR [0.20s]
┃ fatal: https://github.com/aweris/gale?subpath=daggerverse/info/refs not valid: is this a git repository?
• Engine: d86d308ec69e (version v0.9.0)
⧗ 1.87s ✔ 11 ✘ 3
Error: failed to get module config: failed to parse module URL: determine default branch: input:1: container.from.withExec.stdout process "git ls-remote --symref https://github.com/aweris/gale?subpath=daggerverse HEAD" did not complete successfully: exit code: 128
Stdout:
Stderr:
fatal: https://github.com/aweris/gale?subpath=daggerverse/info/refs not valid: is this a git repository?
dagger call --mod "github.com/aweris/gale/daggerverse/gale"
✘ build "dagger call" ERROR [1.23s]
├ [1.23s] loading module
✘ asModule ERROR [0.00s]
• Engine: d86d308ec69e (version v0.9.0)
⧗ 2.32s ✔ 28 ∅ 2 ✘ 2
Error: failed to get loaded module ID: input:1: git.commit.tree.directory.asModule failed to create module from config `.::`: failed to get config file: lstat dagger.json: no such file or directory
@digital pulsar I can call this:
dagger call -m github.com/jpadams/daggerverse/daggerverse/helloSecret/ shout
I added an extra daggerverse directory under my main one
Ah right, you're using some advanced dagger.json things...
https://github.com/aweris/gale/blob/main/daggerverse/gale/dagger.json
Hmmm...your source module has this dagger.json:
{
"name": "source",
"sdk": "go",
"root": "../../.."
}
After some thrashing, I can make it break in a new way 😉
dagger call --progress=plain -m github.com/jpadams/gale/daggerverse/gale workflows list
either a repo or a source directory must be provided
Need to figure out how to pass an Opts object on the CLI
got better with
dagger call --progress=plain -m github.com/jpadams/gale/daggerverse/gale workflows list --help
now doing
git clone https://github.com/skills/hello-github-actions
cd hello-github-actions
dagger call --progress=plain -m github.com/jpadams/gale/daggerverse/gale workflows run --source . result
Went really far...
...
312: exec ghx
312: [0.86s] workflow not found
312: exec ghx ERROR: process "ghx" did not complete successfully: exit code: 1
...
hmmm...this was a terrible repo to use...
Ah, I get it.
I created a simple project
dagger call --progress=plain -m github.com/jpadams/gale/daggerverse/gale workflows list --source .
66: running "dagger call workflows list"
66: [1.21s] Workflow: hello-world-example (path: .github/workflows/hello.yml)
66: [1.21s] Jobs:
66: [1.21s] - say-hello
66: [1.21s]
66: [1.21s]
66: running "dagger call workflows list" DONE
.github
└── workflows
└── hello.yml
name: hello-world-example
on:
workflow_dispatch:
jobs:
say-hello:
runs-on: ubuntu-latest
steps:
-
name: Say Hello
run: echo "Hello world!"
my local project failed until I made it a proper git repo
because gale was running git config ...
so I did and it worked! https://github.com/jpadams/hellow-gh
dagger call --progress=plain -m github.com/jpadams/gale/daggerverse/gale workflows run --source . --workflow hello-world-example result
314: exec ghx DONE
314: [0.31s] Workflow: hello-world-example
314: [0.31s] ┏
314: [0.31s] ┃ Job: say-hello
314: [0.31s] ┃ ┏
314: [0.31s] ┃ ┃ Set up job
314: [0.31s] ┃ ┃ ┏
314: [0.31s] ┃ ┃ ┗
314: [0.31s] ┃ ┃ Say Hello
314: [0.31s] ┃ ┃ ┏
314: [0.35s] ┃ ┃ ┃ Hello world!
314: [0.35s] ┃ ┃ ┗
314: [0.35s] ┃ ┃ Complete job
314: [0.35s] ┃ ┃ ┏
314: [0.35s] ┃ ┃ ┃ Complete job="say-hello" conclusion=success
314: [0.35s] ┃ ┃ ┗
314: [0.35s] ┃ ┗
314: [0.35s] ┗
314: [0.35s] Complete workflow="hello-world-example" conclusion=success
314: exec ghx DONE
tried it with my remote git repo, but looks like some assumptions made and getting duplicates
https://github.com/https://github.com/jpadams/hellow-gh.git/
makes sense since it's github only
so called it like this
dagger call --progress=plain -m github.com/jpadams/gale/daggerverse/gale workflows run --repo jpadams/hellow-gh --branch main --workflow hello-world-example result
WORKS! 🎉 Nice @digital pulsar
Not sure if it helps you, but it works for me 😄
weird I definitely tried similar combination. Trying it again 🙏
note my changes
https://github.com/aweris/gale/compare/main...jpadams:gale:main
@quiet elk , it worked 🎉 thank you helping me finding correct combination. I confused because of the help text in call.
also this command was failing for me before, I think it is related with state of the engine as well
dagger call -m "github.com/jpadams/gale/daggerverse/gale" --help
✔ build "dagger call" [2.51s]
├ [1.88s] loading module
├ [0.63s] loading objects
┃ On a container, the stdout will be returned. On a directory, the list of entries, and on a file, its contents.
┃
┃ Usage:
┃ dagger call [flags] [command [flags]]...
┃ dagger call [command]
┃
┃ Available Commands:
┃ workflows
┃
┃ Flags:
┃ --focus Only show output for focused commands. (default true)
┃ -h, --help help for call
┃ -m, --mod string Path to dagger.json config file for the module or a directory containing that file. Either local path (e.g. "/path/to/some/dir") or a git repo (e.g. "git://github.com/dagger/dagger?ref=branch?subpath=path/to/som
┃ e/dir").
┃
┃ Global Flags:
┃ --cpuprofile string collect CPU profile to path, and trace at path.trace
┃ --debug Show more information for debugging
┃ --pprof string serve HTTP pprof at this address
┃ --progress string progress output format (auto, plain, tty) (default "auto")
┃ -s, --silent disable terminal UI and progress output
┃ --workdir string The host workdir loaded into dagger (default ".")
┃
┃ Use "dagger call [command] --help" for more information about a command.
• Engine: d86d308ec69e (version v0.9.0)
⧗ 3.60s ✔ 52 ∅ 13
ahh I see what you changed.
I need to use local paths to ensure i'm using same code base in modules
I don't understand fully, but glad you got yours to work 😄
Yes, I'm aware of this. I just removed github-cli to remove github token dependency and replace it pretty basic code. It only accepts owner/repo format at the moment
No, it's still not working. I didn't see you changed the repo.
ah, right
can you separate things into a couple of repos? not sure if that could help...
it will solve my current issue but maintenance and development costs would increase exponentially.
but I guess the issue is related to my path config and probably I'm doing something wrong.
I did see one path config for source that took it right out of the repo, but maybe you were assuming the root was somewhere else...
err root config
"root": "../../.."
Mine seems to work with
https://github.com/jpadams/gale/blob/14dce1332af8557ed833d2898675b5713159020b/daggerverse/gale/dagger.json#L4-L7 but you're still using git dependencies
hmm...I lied anyway, I think...things act differently when module called locally and when called via git refs
is there a problem with using the git deps like that?
at least it's all in one repo still 🙂
no, it's working as expected. I think problem starts if git module has local dependencies.
I got rid of root: again and I'm back to functional