Skip to content

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

@dkarlovi

Description

@dkarlovi

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?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions