coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
32.45k stars 1.7k forks source link

[Bug]: Unable to unlock after locking environment variable #2697

Open JohnGeek-dev opened 3 months ago

JohnGeek-dev commented 3 months ago

Description

In v4.0.0-beta.297 (and possibly most recent version since I couldn't find any bug report on this), once an environment variable is locked, it cannot be unlocked, preventing any updates or changes to that variable even in Developer view.

PS: I've forgotten to test this when I upgraded to v4.0.0-beta.306, I've downgraded the version due to some issues when trying to deploy Supabase.

Minimal Reproduction (if possible, example repository)

  1. Lock an environment variable.
  2. Attempt to unlock the environment variable to make changes.
  3. Notice that the variable remains locked and is not modifiable even in Developer view.

Exception or Error

No response

Version

v4.0.0-beta.297

LordSalmon commented 3 months ago

Same problem here but with directus. It is however not dependant on a service I assume, but rather on the environment handling.

Version: v4.0.0-beta.306

kldzj commented 2 months ago

If you just need to reveal the locked secret values, you can simply run the env command inside your container, using the Command tab.

LordSalmon commented 2 months ago

Nope I really want to change it. Imagine (not that it would have happened to me 🙃) you need to pass an FQDN into your service, you locked it and now the FQDN should change. I am not sure if it's expected behaviour to just delete the locked env record and create one with the same name. Or is it?

Maybe @andrasbacsai could give us an explanation what the philosophy of locked environment variables is since I didn't find anything in the docs.

andrasbacsai commented 2 months ago

Nope I really want to change it. Imagine (not that it would have happened to me 🙃) you need to pass an FQDN into your service, you locked it and now the FQDN should change. I am not sure if it's expected behaviour to just delete the locked env record and create one with the same name. Or is it?

Maybe @andrasbacsai could give us an explanation what the philosophy of locked environment variables is since I didn't find anything in the docs.

The locking mechanism should work like this. You lock, you could never unlock it. Only delete and create a new one.

The FQDN part (with SERVICE_FQDN and SERVICE_URL variables) will be fixed in the next version (I have made a bug 11 days ago that prevents to update these variables if you change the fqdn).