https://dagster.io/ logo
#ask-community
Title
# ask-community
p

Peter Law

02/15/2024, 5:13 PM
code-location self-check command? 🧵
Is there a dagster CLI command which can be used to load a code-location, run dagsters internal checks (e.g: that the graph is acyclic) and then issue an exit code which relates to the success of those checks?
I'm looking for something I can use in CI (though possibly elsewhere) which validates everything before publishing to production. This should assume that e.g: database & resource connections won't be available, though if I need to specify a "test" environment which has limited connections/resources that's maybe ok.
m

Matt Clarke

02/15/2024, 5:22 PM
It isn't explicitly intended for this, but we use
dagster asset list
for this purpose in our CI pipeline. If the command runs, then dagster has managed to load everything up successfully
The only consideration is to be careful if you rely on environment variables for the code location to be valid
p

Peter Law

02/15/2024, 5:23 PM
Aha, yeah, that sounds like it would suffice. Thanks!
m

Matt Clarke

02/15/2024, 5:25 PM
No worries 🙂
g

Giovanni Paolo

02/15/2024, 5:59 PM
nice trick!
5 Views