Skip to content

[Bug]: passing DSN via env(file) doesn't work #73

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

Open
1 task done
dkarlovi opened this issue Jun 4, 2024 · 0 comments
Open
1 task done

[Bug]: passing DSN via env(file) doesn't work #73

dkarlovi opened this issue Jun 4, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dkarlovi
Copy link

dkarlovi commented Jun 4, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

In #68, support for late binding of DSN (via env var) was added.

This works in scenarios like so

# UNLEASH_DSN=<DSN>
unleash_client:
    dsn: '%env(UNLEASH_DSN)%'

It doesn't work for scenarios where env vars use Symfony's env var processors:

# UNLEASH_DSN_FILE=/run/secrets/unleash_dsn
# file /run/secrets/unleash_dsn contains DSN
unleash_client:
    dsn: '%env(trim:file:UNLEASH_DSN_FILE)%'

The latter is a pretty common workflow when running apps with Kubernetes Secrets.

To reproduce

See example before.

Sample code (optional)

No response

Version

0.11.382

Expected behavior

Env var used for DSN is correctly processed with (built in or custom) processors, which Symfony does by default.

Logs (optional)

No response

Additional context (optional)

Version number is not an error, it seems the repo creates a new tag on each action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants