-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[dg] Collapse load errors when invoking dg list defs #29507
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
Conversation
dae0fe8 to
3c544e2
Compare
3c544e2 to
09d3bc6
Compare
gibsondan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one question inline for sean, otherwise looks good
| @click.option( | ||
| "--verbose", | ||
| "-v", | ||
| flag_value=True, | ||
| default=False, | ||
| help="Show verbose stack traces, including system frames in stack traces.", | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smackesey does the existance of this flag interact weirdly with any of the logging changes you are planning to make?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can also just drop this flag, it's never invoked right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the existance of this flag interact weirdly with any of the logging changes you are planning to make?
this is in dagster-components, so no (my logging changes are in dg-land)-- fine to leave it in
7ed1a57 to
f83097f
Compare
## Summary Collapse error messages when loading a repo for the purposes of `dg list defs`, in a similar vein to what we do for `dg dev` and `dg check defs`: ```sh $ dg list defs Using /Users/ben/repos/components_demo/missing-resource-demo/.venv/bin/dagster-components Loading location missing-resource-demo failed: dagster._core.errors.DagsterInvalidDefinitionError: resource with key 'my_resource' required by op 'my_asset' was not provided. Please provide a ResourceDefinition to key 'my_resource', or change the required key to one of the following keys which points to an ResourceDefinition: ['io_manager'] Stack Trace: [15 dagster system frames hidden, run dg check defs --verbose to see the full stack trace] An error occurred while executing a `dagster-components` command in the Python environment at /Users/ben/repos/components_demo/missing-resource-demo/.venv. `uv run dagster-components list definitions --location missing-resource-demo --module-name missing_resource_demo.definitions --output-file /var/folders/bc/4npnrqyd46l4vbbkdsdsw3_h0000gn/T/tmpspyxetpf` exited with code 1. Aborting. ``` Users are instructed to call `dg check defs --verbose` to get the full stacktrace. ## How I Tested These Changes New unit test, tested locally. ## Changelog > [dg] `dg list defs` now collapses long system stacktraces

Summary
Collapse error messages when loading a repo for the purposes of
dg list defs, in a similar vein to what we do fordg devanddg check defs:Users are instructed to call
dg check defs --verboseto get the full stacktrace.How I Tested These Changes
New unit test, tested locally.
Changelog