Open jsirex opened 5 years ago
health-api: Writing configuration
health-api: Writing service management scripts
health-api: Using run hook /src/health-api/habitat/hooks/run
health-api: Building package metadata
[ERROR] [rq] Encountered: expected an equals, found a period at line 19
[ERROR] [rq] (Re-run with --trace or RUST_BACKTRACE=1 for a backtrace)
health-api: ERROR: Bad pkg_export in pkg_exposes; Value of key "app.server.port" does not contain a valid TCP or UDP port number:
health-api: Build time: 1m6s
health-api: Exiting on error
@jsirex can you give some more detail on what's going on here? Are you running rq
in a hook and it's choking on TOML that Habitat is otherwise parsing just fine?
Create any package with default.toml:
web.http.port = 80
In plan.sh
try export and expose the port. rq
unable to parse such toml file: [ERROR] [rq] Encountered: expected an equals, found a period at line 19
Seems like rq
and tomlcheck
aren't adhering to the spec, then (which is odd, since rq
is implemented in Rust and uses the same libraries that Habitat does 🤔)
As such, I don't think there's anything that we can do about this, apart from noting this in our documentation.
@christophermaier, I checked rq
version 1.0.2
and it seems to work.
UPD: still issues with rq: https://github.com/dflemstr/rq/issues/206
Closing here since the root cause appears to be elsewhere.
It odd for me you're closing issue while habitat itself still does not work as expected.. Anyway this issue requires an action from habitat dev team...
my apologies. You are correct. I missed a detail here. Reopening.
Linking rq issue: https://github.com/dflemstr/rq/issues/208
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.
Sometimes using nested keys via dots is useful:
According to this: https://github.com/toml-lang/toml#keys it can be written as:
However validation is failed (by
rq
and also bytomlcheck
). I believe they use same library.Here is the test:
If you have lots of nested keys dealing with sections may be nightmare:
This is either bug or we need to point to correct TOML syntax reference in documentation. Note, that habitat parses dotted configs correctly.