build_hook_context does not support ctx.solid, ctx.solid_config and other properties.
See original GitHub issueUse Case
Currently, if a HookContext
is created using build_hook_context
, it will not have a bunch of properties and will instead raise a DagsterInvalidPropertyError
as implemented in https://github.com/dagster-io/dagster/blob/b0c430857c1d772be76216164858ddc7babe376d/python_modules/dagster/dagster/core/execution/context/hook.py#L182
Currently, there is no way to provide a Solid
instance or any of the other properties.
This makes it impossible to test hooks that need access to context.solid
and other properties.
Ideas of Implementation
One way would be to change build_hook_context
to support more kwargs so that the other properties may be specified.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
not quite completed yet. While
solid
is now supported, there are a few other top level args we should support, namelysolid_config
,pipeline_name
,run_id
, andsolid_exception
.I can get to that this week.
Hello @LouisAuneau ! There’s a PR up to resolve this now.