<https://prefect-community.slack.com/archives/C04D...
# ask-community
m
https://prefect-community.slack.com/archives/C04DZJC94DC/p1703315549728159 anyone have a similar thing they've done before? Want to "dry run" a prefect deploy (eg, verify the deploy doesn't throw errors with the yaml) as part of a pre-commit githook to main.
might fuck around and dig through the prefect source to see if it's possible to explicitly call parser methods as part of a custom script, if there's no command magic for this
https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/deploy.py#L636 looks like somewhere around there, could check for a "dry run" flag passed via
options
and break prior to actual creations occurring/lock creations code behind an equivalent conditional
b
I'd also be interested in this @Miranda Byrd. Currently we just deploy to staging and see if it blows up, but a precommit hook would be way better. Keep us posted.
n
took a stab at this here, could definitely be formalized if that's on the right track