https://prefect.io logo
s

Sven Teresniak

02/17/2021, 9:40 AM
hmmm. when you are creating a project and the project already exists, prefect cli will just print a message and return without error. so no need for
--skip-if-exists
because this is the default behaviour. but when you're creating a tenant a 2nd time (same name and slug) you will get an exception and return value 1 from the prefect cli. it seems
create-tenant
needs a
--skip-if-exists
and
create project
not
a

Amanda Wee

02/17/2021, 10:03 AM
The underlying function call returns without a Python error and hence without a CLI error, which was my intent when I requested and implemented the default skipping behaviour. However, I overlooked/ignored the error log, as you can see from the conversation in this pull request: https://github.com/PrefectHQ/prefect/pull/4061 So while functionally the
--skip-if-exists
option has no effect, it does express explicit intention and avoids logging a spurious error message. As for tenant creation: I agree, it would be consistent to do the same thing as for project creation.
s

Sven Teresniak

02/17/2021, 5:27 PM
great. thanks for the explanation
2 Views