Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error messages when using modules #6718

Open
sipsma opened this issue Feb 22, 2024 · 6 comments
Open

Unhelpful error messages when using modules #6718

sipsma opened this issue Feb 22, 2024 · 6 comments

Comments

@sipsma
Copy link
Contributor

sipsma commented Feb 22, 2024

Collecting unhelpful error messages here, please comment when you hit one 🙂

@sipsma sipsma added this to the v0.10.x milestone Feb 23, 2024
@marcosnils
Copy link
Contributor

here' one reported by @felipecruz91 in our discord server here: https://discord.com/channels/707636530424053791/1223281904871014532/1223281904871014532

basically the fact that when running dagger call in a directory where dagger.json is not present, you generally get quite confusing error outputs.

@shykes
Copy link
Contributor

shykes commented Apr 3, 2024

@jedevc
Copy link
Member

jedevc commented Apr 23, 2024

@jedevc
Copy link
Member

jedevc commented May 10, 2024

Found another one when working on our own ci.

Non existent secret files don't error:

$ dagger call --host-docker-config=file:path/to/non-existent-file --source=. version string
dev-eca71ba71430c5ae94a3c642578b8391f721ffd7

Non existent directories error very strangely:

$ dagger call --host-docker-config=$HOME/.docker/config.json --source=path/to/non-existent/directory version string
✔ connect 0.8s
✔ initialize 0.8s
✔ ModuleSource.resolveFromCaller: ModuleSource! 0.1s
✘ ModuleSource.resolveDirectoryFromCaller(path: "path/to/non-existent/directory"): Directory! 0.0s
! failed to stat caller path: failed to receive file bytes message: rpc error: code = NotFound desc = rpc error: code = NotFound desc = stat path: lstat path/to/non-existent/directory: no such file or directory
✘ dagger: Dagger! 0.0s
! Query.dagger: missing required argument: "source"

Error: response from query: input: dagger resolve: Query.dagger: missing required argument: "source"

Possibly there's more issues with other flag types as well.

@Excoriate
Copy link
Contributor

Perhaps a tiny addition to this issue is what I've written just some moments ago here. For new module builders, isn't intuitive how the modules are propagated to the user. For example:

Stdout:
invoke: input: container.from.withEnvVariable.withMountedDirectory.withWorkdir.withMountedCache.withEnvVariable.withExec.withExec.withExec
.stdout resolve: process "xyz command" did not complete successfully: exit co
de: 125

It doesn't say much, and it's not human-readable. It'd be great to have a more clear error message such as: Invalid environment variables due to invalid arguments passed XYZ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants