You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Missing dagger input list style feature in Europa #1806
Here, the path to read and write, envs, are all inputs to the plan. How can I show their type and description? It would be great if dagger could provide an API to interact with.
In Europa there's no need to setup inputs before hand, you just declare them in your plan. The way inputs worked before was very different. We dropped that concept now.
What is your use case for needing the input list in Europa?
By the way, I feel the same way about #1351, but with outputs. There's a PR (#1486) but we need more discussion for it in Europa.
I think the best way to resolve your case is to create an output that you control yourself.
Let's say we go ahead with having outputs defined in actions:
#Spec: {
// Something that makes sense for you.// You can have a group for env vars, others for other types of inputs,// with specific messages on how to set them up (e.g., file with KEY=value).
[name=string]: {
description: stringtype: string|dagger.#Secret
}
}
dagger.#Plan& {
client: env: {
// generate from an instance of #Spec
}
actions: {
input_list: #InputList& {
// generate output from instance of #Spec
}
...
}
}
While we currently list actions by default when running dagger do, I think that we should also list client commands, filesystems and envs too. cc @aluzzardi
I think the ideal form would be to add the client resources required by each individual action, as part of the usage message of that action. This has the benefit of taking a first step towards a much-needed security model, similar to eg. iOS sandboxing. “this action interacts with the client system in the following ways:”. Later we could make an interactive prompt as well.
Activity
helderco commentedon Mar 15, 2022
In Europa there's no need to setup inputs before hand, you just declare them in your plan. The way inputs worked before was very different. We dropped that concept now.
What is your use case for needing the input list in Europa?
hongchaodeng commentedon Mar 15, 2022
We just want to print out what envs that user needs to input.
We will add another layer to translate key=value env to CUE like the following:
User input:
CUE:
But we want to let users know that
APP_NAMEandTOKENare inputs they can specify.TomChv commentedon Mar 15, 2022
Basically if you do not set those inputs, plan will fail to start
helderco commentedon Mar 15, 2022
These are just environment variables, do you need other types of inputs?
helderco commentedon Mar 15, 2022
By the way, I feel the same way about #1351, but with outputs. There's a PR (#1486) but we need more discussion for it in Europa.
I think the best way to resolve your case is to create an output that you control yourself.
Let's say we go ahead with having outputs defined in actions:
Then you call this action for the list:
dagger do input_list@shykes WDYT?
gerhard commentedon Mar 15, 2022
While we currently list actions by default when running
dagger do, I think that we should also list client commands, filesystems and envs too. cc @aluzzardishykes commentedon Mar 16, 2022
I think the ideal form would be to add the client resources required by each individual action, as part of the usage message of that action. This has the benefit of taking a first step towards a much-needed security model, similar to eg. iOS sandboxing. “this action interacts with the client system in the following ways:”. Later we could make an interactive prompt as well.
hongchaodeng commentedon Mar 16, 2022
Awesome! The interactive prompt sounds great idea as well :+1
shykes commentedon Mar 27, 2022
@jlongtine I'm adding this on your radar, since you're working on improvements to the CLI at the moment.
shykes commentedon Jun 17, 2022
I believe this is solved, you can pass inputs as command-line flags, and list available inputs with
dagger do --help.