Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file syntax error reporting is broken. #68

Open
ximon18 opened this issue Nov 23, 2023 · 0 comments
Open

Config file syntax error reporting is broken. #68

ximon18 opened this issue Nov 23, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ximon18
Copy link
Member

ximon18 commented Nov 23, 2023

$ cargo run -- --config etc/rotonda.conf
/home/ximon/src/rotonda/etc/rotonda.conf: TOML parse error at line 13, column 1
   |
13 | [targets.mqtt]
   | ^^^^^^^^^^^^^^
invalid digit found in string

???

It is expected that the sample config file doesn't work as it contains placeholders that the operator should fill in or comment out the whole unit/target. In this case the relevant part is:

[targets.mqtt]
type = "mqtt-out"
sources = ["bmp-in", "bgp-in", "rib-in-pre", "rib-in-post"]
client_id = "rotonda"                          # Tip: edit me
topic_template = "{id}"                        # Tip: edit me
destination = "SOME_IP_ADDRESS:SOME_PORT"      # Tip: edit me, or comment this target out

The error is actual caused by the "SOME_IP_ADDRESS:SOME_PORT" value, if you replace that with "127.0.0.1:12345" then the error goes away.

But:

  1. That is not on line number 13 as reported.
  2. The issue is not with the line "[target.mqtt]" as reported.
  3. How is it ever invalid to have a digit in a string? That is a very confusing message.
@ximon18 ximon18 added the bug Something isn't working label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant