Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Env vars interpolation is broken #2316

Open
Kocal opened this issue May 30, 2024 · 3 comments
Open

[Bug]: Env vars interpolation is broken #2316

Kocal opened this issue May 30, 2024 · 3 comments
Labels
🐛 Bug Reported issues that need to be reproduced by the team.

Comments

@Kocal
Copy link

Kocal commented May 30, 2024

Description

Hi :)

Today I've upgraded from v4.0.0-beta.264 to v4.0.0-beta.290, and my apps could not be deployed due to env vars not being interpolated anymore.

Given the following env vars:

DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@database:5432/$POSTGRES_DB?sslmode=disable&charset=utf8&serverVersion=16.2
POSTGRES_USER=user
POSTGRES_PASSWORD=password
POSTGRES_DB=db

If I run printenv in the PHP container for v4.0.0-beta.264, I see DATABASE_URL being correctly interpolated:

DATABASE_URL=postgres://user:password@database:5432/db?sslmode=disable&charset=utf8&serverVersion=16.2

But if I do the same for v4.0.0-beta.290, I see DATABASE_URL being wrongly interpolated:

DATABASE_URL=postgres://:@database:5432/?sslmode=disable&charset=utf8&serverVersion=16.2

Minimal Reproduction (if possible, example repository)

  • Create a new project and environment
  • Create an env var
  • Create an env var that use the other
  • Deploy
  • printenv in the container, and see the 2nd env var is not correctly interpolated

Exception or Error

No response

Version

v4.0.0-beta.290

@Achder
Copy link

Achder commented Jun 13, 2024

I have a similar issue.
I use this in my code:
image

But it's not interpolating, it's just printing $SOURCE_COMMIT

@lorenzomigliorero
Copy link
Contributor

Same issue; the env variables seem to be handled as a Literal in all cases.

@madebylydia
Copy link

madebylydia commented Jul 24, 2024

This is also reproducible with a Docker Compose file.
Reproduction can be done using the following file: https://github.com/madebylydia/docker-files/blob/1d979fccbee5b4a9f237bf085ce681dde8e531b6/Netdata/compose.yml

@peaklabs-dev peaklabs-dev added the 🐛 Bug Reported issues that need to be reproduced by the team. label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team.
Projects
None yet
Development

No branches or pull requests

5 participants