You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "gkoszyk (via GitHub)" <gi...@apache.org> on 2026/09/11 09:56:48 UTC

[I] Un-ignore: server refuses to boot on sibling IGGY_* variables (2 tests) [iggy]

gkoszyk opened a new issue, #4137:
URL: https://github.com/apache/iggy/issues/4137

   ### Tests to fix
   
   Both ignored in #4132:
   
   | Test | Location |
   |---|---|
   | `given_a_sibling_binarys_env_vars_when_rejecting_then_the_server_should_still_boot` | `core/configs/src/configs_impl/file_provider.rs:411` |
   | `given_a_dotenv_with_a_connectors_variable_when_loading_then_the_server_should_boot` | `core/configs/src/configs_impl/file_provider.rs:453` |
   
   ### Why they fail
   
   `unknown_env_names` (`core/configs/src/configs_impl/file_provider.rs:283-285`) is:
   
   ```rust
   names.filter(|name| name.starts_with(prefix) && !known.contains(&name.as_str()))
   ```
   
   A bare **prefix** match on the left, an **exact-name** allowlist on the right. The prefix is `"IGGY_"` (`core/configs/src/server_config/server.rs:140`, pinned by the crate's own `assert_eq!` at `:486`), which is a prefix of every sibling binary's namespace. The allowlist (`:52-64`) omits:
   
   `IGGY_CONNECTORS_CONFIG_PATH`, `IGGY_CONNECTORS_ENV_PATH`, `IGGY_CONNECTORS_STATE_PATH`, `IGGY_MCP_CONFIG_PATH`, `IGGY_MCP_TRANSPORT`, `IGGY_HOME`, `IGGY_USERNAME`, `IGGY_PASSWORD`
   
   There is no opt-out, no warn-only mode, no feature gate and no second prefix list. The path is unconditional: `main.rs:76` → `boot/mod.rs:140` → `server.rs:233` → `load_config` → `file_provider.rs:186`.
   
   **It does not need a shared container or a shared `env_file`.** `core/server/src/main.rs:51-55` runs `dotenvy::dotenv()` **before** `load_config()`, injecting a working-directory `.env` into the process environment that the check scans. One `.env` for the whole stack — the pattern the `dotenvy` fallback invites — refuses server boot.
   
   The existing test (`:406-414`) covers only the reverse direction: connectors tolerating a leftover server key.
   
   The refusal message also names no remedy (`:131`), unlike its neighbour `reject_relocated_keys` (`:155-158`, `:165-170`) which tells the operator *"Unset it to boot."*
   
   **Not a backwards-compatibility concern:** this affects anyone running `iggy-server` alongside `iggy-connectors` or the MCP server *today*, regardless of version history. The shipped Helm chart does not self-brick (its only non-`ServerConfig` `IGGY_` string is `PUBLIC_IGGY_API_URL`, on a different container), and indexed cluster vars are safe (the derive emits indices 0..256).
   
   ### Done when
   
   Sibling prefixes are allowlisted, the refusal names a remedy, both `#[ignore]`s removed and passing without `--ignored`.
   
   ⚠️ The `.env` test mutates the process environment and must not run in parallel with anything that reads it.
   
   Found by an adversarial review of #4092.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Un-ignore: server refuses to boot on sibling IGGY_* variables (2 tests) [iggy]

Posted by "gkoszyk (via GitHub)" <gi...@apache.org>.
gkoszyk closed issue #4137: Un-ignore: server refuses to boot on sibling IGGY_* variables (2 tests)
URL: https://github.com/apache/iggy/issues/4137


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org