Is there any way to achieve something like `prefec...
# prefect-community
Is there any way to achieve something like
prefect register --dry-run
? I would like to add a CI step that ensures that we wonโ€™t fail after a merge when we try to register flows in CD
๐Ÿ‘€ 2
could you explain the problem a bit more? in 2.0 you can achieve that using "build" CLI only to generate a YAML manifest without "apply" step
๐Ÿ‘ 1
๐Ÿ˜ฎ 1
might be a good reason to start considering migrating this project to 2.0 ๐Ÿ˜Ž
๐Ÿฆœ 1
I see! Ok, so no way to do with 1.x. We're considering moving to Prefect 2 - keeping an eye out as the ga continues! The problem we run into is that sometimes we merge code into
which kicks off flow registration via our CD, which then breaks. There is no simple way to fully confirm "this flow will successfully register" without actually registering it. Obviously unit tests etc... will catch some classes of errors, but not foolproof. Where as if there was something like
register --dry-run
we could run it in the same environment as part of CI so that when we run
as part of CD we are sure that it will work (from a code perspective at least). It does sounds like 2.x fixes it. Thank you for the response!!
๐Ÿ™Œ 1
if I understood the problem correctly, what might be a helpful approach would be having the same CI/CD workflow in dev branch pointing to Prefect 2.0 dev workspace and registering from there. If everything worked, it means the code works and is ready for prod. The PREFECT_API_URL in the main branch can point to the prod workspace. I definitely understand the problem here and I believe that with 2.0 you can solve it quite elegantly, especially with multiple Git branches and workspaces
๐Ÿค” good point. we could just keep actually registering flows to a ~dummy workspace during CI runs