coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: cannot save environment variables in developer mode

Open Markus-Ende opened this issue 3 months ago • 8 comments

Description

After updating from beta.239 to beta.241, I get an error when trying to save environment variables in development mode, I get the error message below. An very similar error was thrown when loading a docker compose yaml.

Seems like a broken db migration?

Minimal Reproduction (if possible, example repository)

  1. Go to environment variables
  2. enter developer view
  3. try to add multiple variables

Exception or Error

Error: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "is_multiline" of relation "environment_variables" violates not-null constraint DETAIL: Failing row contains (196, POSTGRES_USER, ......, f, t, 7, 2024-03-22 13:11:41, 2024-03-22 13:11:41, null, null, null, null, null, null, f, null, 4.0.0-beta.239). (Connection: pgsql, SQL: insert into "environment_variables" ("key", "value", "is_build_time", "is_multiline", "application_id", "is_preview", "updated_at", "created_at") values (POSTGRES_USER, ..., 0, ?, 7, 1, 2024-03-22 13:11:41, 2024-03-22 13:11:41) returning "id")

Version

v4.0.0-beta.241

Markus-Ende avatar Mar 22 '24 13:03 Markus-Ende

update: I get the same error, when trying to deploy

Markus-Ende avatar Mar 22 '24 13:03 Markus-Ende

This will be fixed in the upcoming version.

andrasbacsai avatar Mar 26 '24 12:03 andrasbacsai

@andrasbacsai i'm still getting this exact error on beta.255 when loading a docker-compose.yml with environment variables like VARIABLE=${VARIABLE}

extronics avatar Apr 11 '24 09:04 extronics

Same here. Setting all variables as multiline helps, though I had to do it several times, not all checkbox changes got saved I guess.

noximo avatar Apr 11 '24 19:04 noximo

I try to replicate the issue, but I cannot.

Can you make a small video of the whole process (from adding the app to the error)?

andrasbacsai avatar Apr 11 '24 19:04 andrasbacsai

I can reproduce now! Fixing in the next version (🤞)

andrasbacsai avatar Apr 12 '24 07:04 andrasbacsai

Please confirm that it works now!

andrasbacsai avatar Apr 13 '24 11:04 andrasbacsai

Loading a docker-compose.yml now works as in it creates the environment variables without complaining. They are, however, not exposed to the actual containers. When i run env in a running container, all the environment variables are blank. This might however be a different issue ..

extronics avatar Apr 17 '24 14:04 extronics