Repository navigation
Description
Somewhat related to #6112 but a bit more general
Passing a large number of flags and args when using dagger call can become way too tedious to type out by hand. One example would be support for filtering dirs as mentioned here. But really any time a function accepts more than a few flags and/or the arguments to the flag end up being verbose are a problem.
This leaves users reaching for wrappers like shell scripts/makefiles/etc. While that's not the end of the world (i.e. we aren't going to actively try to prevent that from being possible), it's not great that users have to layer more abstractions on top of dagger to use it in relatively simple situations.
A few ideas have come up to potentially solve this:
defaultArgsspecified indagger.jsonas described here- Basically, module constructors can have default args encoded in
dagger.jsonand those args have the same features as the syntax indagger call(e.g. local files/dirs specified by path, etc.)
- Basically, module constructors can have default args encoded in
- Support for "recording+saving"
dagger callinvocations and then being able to run them by name. As a strawman for the sake of a concrete example:dagger call --save-as=my-build -m mydep build --dir '/some/path,**/*.go,!testdata' --some-arg false --token env:MY_TOKEN- After the above, you can now run
dagger call my-build
- Support for Dagger Scripts (Dagger Scripts: a more convenient way to call Dagger Functions from your project #5774), possibly with an addition to support running scripts written to a file rather than inline.
- EDIT: Re-reading this, it sounds suspiciously similar to Call Dagger Functions from an external client #5993, maybe it's just a slightly different formulation of the same idea?
These aren't mutually exclusive either. I think 2. might be my preferred starting place at the moment for the sake of being both general+relatively straightforward to implement, but all are pretty tempting and viable.
Activity
shykes commentedon Mar 25, 2024
@sipsma FYI I am reviving and refreshing #5774. It is my favorite candidate for solving this issue, I will flesh out my argument and try to build momentum. I think you're right that it's related to #5774, maybe we can kill 2 birds with one stone.
I think we should merge this issue and #6112. The conversation is getting pretty fragmented. WDYT? I'm also going to close #5728.
sipsma commentedon Mar 25, 2024
Yes that all SGTM. I'll also mention that my most recent ideas on how to approach #5993 (comment) would also end up being a solution to this problem. Basically, you could write code that executes directly on the host, is able to call out to module dependencies, but is also invokable without relying on toolchains being installed on the host (
go,python, etc.).nipuna-perera commentedon Apr 25, 2025
Bumping this. https://discord.com/channels/707636530424053791/1365319889279127645/1365397691835875359
shykes commentedon Apr 30, 2025
Also related: #9584
nipuna-perera commentedon Aug 5, 2025
This is the most recent/relevant discussion on this - #10401
shykes commentedon Oct 1, 2025
We're getting close to finally solving this: #11034