https://prefect.io logo
Title
g

Giacomo Chiarella

05/08/2023, 11:09 AM
Hi everyone! Is it possible to prevent any delete through web ui and let it enabled from cli?
d

Deceivious

05/08/2023, 12:04 PM
cloud or self hosted?
g

Giacomo Chiarella

05/08/2023, 12:11 PM
self-hosted
d

Deceivious

05/08/2023, 12:11 PM
Maybe you could try create a new user with no delete permissions on the main tables and use that database user while connecting
For the API and UI , use user with no delete permission. For CLI use another user with all permission
g

Giacomo Chiarella

05/08/2023, 12:14 PM
mmm you suggest to set environments variables when executing cli commands
PREFECT_API_DATABASE_PASSWORD: ********
PREFECT_API_DATABASE_CONNECTION_URL
with different values used to spin up Orion
seems a bit of a workaround
d

Deceivious

05/08/2023, 12:14 PM
or create profiles
g

Giacomo Chiarella

05/08/2023, 12:14 PM
how do you create profiles?
d

Deceivious

05/08/2023, 12:15 PM
try `pefect --help``
prefect*
g

Giacomo Chiarella

05/08/2023, 12:17 PM
seems interesting feature, thanks!
d

Deceivious

05/08/2023, 12:18 PM
if its just local server, id just create a .sh file with 2 configs and use that sh file to spin up the server
g

Giacomo Chiarella

05/08/2023, 12:18 PM
you mean using env vars right?
d

Deceivious

05/08/2023, 12:18 PM
yes
g

Giacomo Chiarella

05/08/2023, 12:26 PM
if prefect profile command is used, this creates profiles in the database, right?
d

Deceivious

05/08/2023, 12:26 PM
no
g

Giacomo Chiarella

05/08/2023, 12:26 PM
config files? like yml?
d

Deceivious

05/08/2023, 12:26 PM
it creates the profiles in ~/.prefect
g

Giacomo Chiarella

05/08/2023, 12:26 PM
ok, good
d

Deceivious

05/08/2023, 12:27 PM
dont believe me blindly though. 😄
👍 1
g

Giacomo Chiarella

05/08/2023, 12:27 PM
one last question, do you know what are the priorities? env vars if a profile is not specified?
d

Deceivious

05/08/2023, 12:28 PM
unsure
g

Giacomo Chiarella

05/08/2023, 12:28 PM
ok ok, I will investigate, thanks!
by the way, you were right