Settings can't be provided via environment variables
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
Research direction
Start by reading the Rust proxy's configuration loading and environment-variable handling, then compare the documented settings with the Python proxy behavior referenced in the issue. Reproduce the startup failure with the provided Docker command and check that env vars work both without a config file and when they conflict with config.json; done means env vars take precedence in both cases.
Written by the indexing model from the issue text.
Description
Current behaviour
The Rust proxy only reads settings from config.json. Environment variables such as ENVIRONMENT_KEY_PAIRS or API_POLL_FREQUENCY_SECONDS are ignored:
- With no config file, the container exits on startup with
Failed to read config file. - With a config file present, conflicting env vars are silently ignored and the file values are used.
The Python proxy reads both, with env vars taking precedence over the file, and the docs document env var configuration. Deployments configured via env vars can't switch to the Rust image as-is.
Reproduction
docker run --rm \
-e ENVIRONMENT_KEY_PAIRS='[{"server_side_key":"ser.abc","client_side_key":"abc"}]' \
flagsmith/edge-proxy-rs:0.2.0
# Error: configuration error: Failed to read config file: No such file or directory (os error 2)
docker run --rm \
-e ENVIRONMENT_KEY_PAIRS='[{"server_side_key":"ser.abc","client_side_key":"abc"}]' \
flagsmith/edge-proxy:2.23.0
# starts and polls using client key "abc"
Expected
Same as the Python proxy: settings can be provided via environment variables, taking precedence over config.json.
- Dominant language
- Rust
- Stars
- 3
- Forks
- 1
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 4
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Flagsmith/edge-proxy-rs
-
Fix big numbersOpen
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Flagsmith/edge-proxy-rs#34 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Flagsmith/edge-proxy-rs#16 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Flagsmith/edge-proxy-rs#14 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Flagsmith/edge-proxy-rs#13 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
All issues in Flagsmith/edge-proxy-rs
Similar issues
-
My Caps shows "Shared" on private Caps that were never sharedPossibly taken @AksharP5 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CapSoftware/Cap#4569 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Document Web UIOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
parquet: reject truncated BYTE_STREAM_SPLIT numeric pages instead of silently fabricating valuesOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day