Description
What is the issue?
With v0.18.10 it was possible to pass the string values of an Enum type with the CLI. With v0.18.11 this appears to be broken. Furthermore, values shown in --help
text are inconsistent and unclear to users, making it difficult to determine which values to use. No breaking change that would explain this behavior is mentioned in the v0.18.11 release notes. I therefore expect this to be a bug rather than intended behavior. EDIT: A related change is mentioned in the SDK's release notes.
Dagger version
dagger v0.18.11 (docker-image://registry.dagger.io/engine:v0.18.11) darwin/arm64
Steps to reproduce
type Machine string
const (
MachineQemuarm64 Machine = "qemuarm64"
MachineQemux86_64 Machine = "qemux86_64"
)
func (b *MyModule) MyFunc(
ctx context.Context,
// +optional
// +default="qemuarm64"
machine Machine,
){...}
In v0.18.10, this produced the following --help
output:
USAGE
dagger call ... [arguments] <function>
ARGUMENTS
--machine qemuarm64,qemux86_64
5C52
(default qemuarm64)
Calling the CLI with dagger call build --machine=qemuarm64
was possible.
With v0.18.11, I now get:
USAGE
dagger call ... [arguments] <function>
ARGUMENTS
--machine QEMUARM_64,QEMUX_86_64 (default Qemuarm64)
When calling the function like above, I now get the following error:
! invalid argument "qemuarm64" for "--machine" flag: value should be one of QEMUARM_64,QEMUX_86_64
Calling the CLI without the --machine
flag still falls back to the default value (// +default="qemuarm64"
), where the string value is allowed.
Log output
No response