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
One workaround is to call sync, but that's confusing if I'm trying to get the object's ID to pass it to another function call. id is exactly what I'm looking for.
This has been discussed elsewhere, but for posterity here, one blocker on supporting dagger call deploy --build="$(dagger call build --src . id)" is that we'd need the CLI to know how to see that the value in that case is an ID as opposed to a path on the host and use that ID instead. I think this is possible in a mostly unambiguous way, but would be a separate issue from allowing id to be used from dagger call in the first place.
The reasons we started out with not allowing id to be accessed from dagger call were:
It may imply that IDs are safe to be re-used, but they aren't currently. Specifically any IDs that reference local dirs or secrets won't be guaranteed reproducible.
This would just result in an error in the worst case, so it's not like it would be unsafe, just a confusing footgun
It's also highly possible to introspect IDs and determine if they are reproducible, in which case we could have the CLI at minimum print a warning or something
We weren't sure if we really wanted to encourage this type of "stitching" from the CLI level relative to users just writing a function that does this.
None of those are complete blockers of course, more philosophical type concerns, so I'm personally not utterly opposed to allowing it to be called from the CLI if there's a use case where it's the only viable option and the footguns around reproducibility aren't a concern.
Activity
sipsma commentedon Mar 21, 2024
This has been discussed elsewhere, but for posterity here, one blocker on supporting
dagger call deploy --build="$(dagger call build --src . id)"is that we'd need the CLI to know how to see that the value in that case is an ID as opposed to a path on the host and use that ID instead. I think this is possible in a mostly unambiguous way, but would be a separate issue from allowing id to be used from dagger call in the first place.The reasons we started out with not allowing
idto be accessed fromdagger callwere:None of those are complete blockers of course, more philosophical type concerns, so I'm personally not utterly opposed to allowing it to be called from the CLI if there's a use case where it's the only viable option and the footguns around reproducibility aren't a concern.
shykes commentedon Dec 6, 2024
This is made irrelevant by the shell