You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flapi pack bundles a config without validating it, so a bad config only fails at startup #162
flapi pack --in DIR --out BIN (src/main.cpp, the pack subcommand) returns before a ConfigManager ever loads the main config. It refuses secret files (*.env, *.pem, ...) but never checks that flapi.yaml is a configuration flAPI would accept. So it reports Packed ... for a bundle whose config cannot start:
The resulting single binary is then copied to a host and fails at startup — which is exactly the workflow packing exists to make safe (scp flapi-prod host).
Found by a Codex review of #161. It is not specific to server:: every config error behaves this way.
Suggested fix
Have pack load the input directory's main config through ConfigManager (the same path as --validate-config) before writing the bundle, and refuse — with that error — if it fails. Add a test that an invalid config produces no output file.
Note on a related limitation
The same review noted yaml-cpp does not expand YAML merge keys (<<: *defaults), so a key supplied through a merge is invisible to every lookup, http-port and server alike. Worth deciding whether main configs support merge keys or reject them explicitly; that belongs with #160 (unrecognised top-level keys).
Activity
fix: report the server: block first, and don't overclaim what it can …
Merge pull request #168 from DataZooDE/fix/gh-156-validate-config-pro…