Replies: 1 comment 1 reply
-
Hi @takerfume - Dagster doesn't have an explicit concept of a "test mode", so yes we'd recommend using config, environment variables, or resources for this. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm seeking advice from the Dagster community. I want to differentiate processing within an asset function between test and non-test environments. Is there a way to recognize within the function whether it's in test mode? The straightforward approach seems to be creating a test flag in the config, but I'm wondering if there's a better way. Since I'm not using external resources, mocking them doesn't seem like the right solution. Creating a resource to fetch the test mode status from environment variables or similar seems feasible, but it doesn't feel much different from using a config.
I'm curious if there's a feature that allows understanding whether it's in test mode from the AssetExecutionContext or similar when executing a job with specific arguments.
Beta Was this translation helpful? Give feedback.
All reactions