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

fix(commons): do not fail without Vars section #257

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

J-Loudet
Copy link
Contributor

If the Vars section was not present in a file that is parsed by the function try_parse_from_file then an error would be thrown.

This commit changes the behaviour of the function such that if it is missing, no error is returned and instead a log message is recorded.

  • Cargo.lock: added dependency tracing.

  • zenoh-flow-commons/Cargo.toml: added dependency tracing.

  • zenoh-flow-commons/src/utils.rs: instead of throwing an error if the Vars section is missing, log a debug message and continue the normal execution.

If the `Vars` section was not present in a file that is parsed by the
function `try_parse_from_file` then an error would be thrown.

This commit changes the behaviour of the function such that if it is
missing, no error is returned and instead a log message is recorded.

* Cargo.lock: added dependency `tracing`.
* zenoh-flow-commons/Cargo.toml: added dependency `tracing`.

* zenoh-flow-commons/src/utils.rs: instead of throwing an error if the
  `Vars` section is missing, log a debug message and continue the normal
  execution.

Signed-off-by: Julien Loudet <[email protected]>
@J-Loudet J-Loudet merged commit 04d0d35 into main Aug 16, 2024
9 checks passed
@J-Loudet J-Loudet deleted the fix/parse-file-no-vars branch August 16, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant