Skip to content

fix(configs): check server env vars once and refuse boot only in debug - #4200

Open
hubcio wants to merge 2 commits into
masterfrom
fix/server-process-env-vars
Open

hubcio wants to merge 2 commits into
masterfrom
fix/server-process-env-vars

Conversation

@hubcio

@hubcio hubcio commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

A debug server panicked at startup when IGGY_ENV_PATH was set.
The boot check and the typed env provider kept separate lists
of accepted IGGY_ names, and names that only the boot check
accepted hit the provider's debug_assert. The boot check also
refused unknown names in release builds.

The boot check is now the server's only check. It refuses to
boot in debug builds, so CI catches stray names, and only warns
in release builds. IGGY_KAFKA_ moves from the provider's list
into the boot check's allowed prefixes.

A debug server panicked at startup when IGGY_ENV_PATH was set.
The boot check and the typed env provider kept separate lists
of accepted IGGY_ names, and names that only the boot check
accepted hit the provider's debug_assert. The boot check also
refused unknown names in release builds.

The boot check is now the server's only check. It refuses to
boot in debug builds, so CI catches stray names, and only warns
in release builds. IGGY_KAFKA_ moves from the provider's list
into the boot check's allowed prefixes.
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Sep 16, 2026
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.54930% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.81%. Comparing base (63362dc) to head (da51d40).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
core/configs/src/configs_impl/file_provider.rs 81.48% 4 Missing and 1 partial ⚠️
...ore/configs/src/configs_impl/typed_env_provider.rs 95.23% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #4200       +/-   ##
=============================================
- Coverage     87.48%   73.81%   -13.68%     
  Complexity     1575     1575               
=============================================
  Files          1280     1278        -2     
  Lines        223192   203555    -19637     
  Branches     186555   166919    -19636     
=============================================
- Hits         195267   150256    -45011     
- Misses        23229    48645    +25416     
+ Partials       4696     4654       -42     
Components Coverage Δ
Rust Core 71.76% <91.54%> (-16.80%) ⬇️
Java SDK 68.68% <ø> (ø)
C# SDK 77.41% <ø> (-0.08%) ⬇️
Python SDK 90.97% <ø> (ø)
PHP SDK 85.67% <ø> (ø)
Node SDK 96.43% <ø> (ø)
Go SDK 70.14% <ø> (+0.08%) ⬆️
Files with missing lines Coverage Δ
core/configs/src/server_config/server.rs 93.80% <100.00%> (+0.61%) ⬆️
...ore/configs/src/configs_impl/typed_env_provider.rs 90.69% <95.23%> (+0.24%) ⬆️
core/configs/src/configs_impl/file_provider.rs 87.74% <81.48%> (+0.77%) ⬆️

... and 299 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

A debug build refuses to boot on an IGGY_ name that no mapping claims.
One shared environment, or the one .env every binary loads, carries the
paths the other two binaries read before their own config load, so a
debug iggy-mcp or iggy-connectors refused to boot on its own
IGGY_MCP_ENV_PATH or IGGY_CONNECTORS_ENV_PATH. The config path pair was
already on the list. The env path pair joins it, under a test.

The same review found three smaller things: the runtime-prefix
deserialize ran the scan whatever without_unknown_env_var_check said, the
process env var test asserted on a Result that cannot be Err, and the
set_var safety notes named key uniqueness instead of the serial bound
that actually holds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant