fix(configuration): numeric fields can be used with env variables#1919
fix(configuration): numeric fields can be used with env variables#1919sergiofilhowz wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
We should make this a rule in our editors to never use |
|
Will configuration for workers be stored locally to the worker or all stored at the iii engine itself? My belief is that it should be wherever the worker is so there's no drift and less coupling between a worker and a specific iii instance. |
Summary
Fixes configuration worker reliability around HTTP port changes, on-disk layout, file-based hot-reload, and env-var expansion in numeric fields.
${VARIABLES}in numeric fields — lone placeholders likeport: ${HTTP_PORT:3111}are env-expanded and YAML-coerced to the correct scalar type (int/bool/float), so schema validation passes instead of treating them as strings. Fixes Env-driven config for the new format is giving errors #1916../data/configuration→./iii-config. Existing entries are auto-migrated on first boot; explicitdirectory:overrides are untouched../iii-config/*.yamlare picked up via the fs adapter watcher (canonicalized watch path fixes macOS FSEvents on relative paths). External edits fan out the same rebind/apply path asconfiguration::set; internal writes are deduped to avoid reload loops.iii-httpnow gracefully shuts down the old listener on host/port rebind (closes idle keep-alive connections, not just the accept socket), with a hard-abort safety net so a stuck connection can’t pin the old port indefinitely.Test plan
cargo test -p iii http_configuration_e2e— port rebind viaconfiguration::setand via direct file edit./iii-config/iii-http.yamlport on disk; confirm new port serves and old port stops acceptingport: ${HTTP_PORT:3111}(or similar) in a persisted config entry; confirm it resolves to an integer./data/configuration/entries; confirm one-time migration to./iii-config/iiiboots, HTTP worker listens, config changes apply without restart