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

Warn the user when Zebra doesn't recognize the format of zebrad.toml #4689

Merged
merged 6 commits into from
Jun 28, 2022

Conversation

upbqdn
Copy link
Member

@upbqdn upbqdn commented Jun 26, 2022

Motivation

When the format of zebrad.toml changes, Zebra doesn't recognize it appropriately and returns an unclear error saying that it couldn't read some data. This becomes an issue when users install a new version of Zebra that uses a new format of zebrad.toml, but keep their old zebrad.toml file.

Solution

Zebra now provides a message saying that it could not parse the provided config file, and suggests that the user might be using a deprecated format of the file.

Close #4665

Reviewer Checklist

  • Tests for Expected Behaviour

@upbqdn upbqdn requested a review from a team as a code owner June 26, 2022 22:38
@upbqdn upbqdn requested review from teor2345 and removed request for a team June 26, 2022 22:38
@upbqdn upbqdn self-assigned this Jun 26, 2022
@upbqdn upbqdn force-pushed the zebrad-toml-user-warning branch from e96079a to 38adb6e Compare June 26, 2022 23:19
@upbqdn upbqdn force-pushed the zebrad-toml-user-warning branch from 38adb6e to c93bd89 Compare June 26, 2022 23:20
@codecov
Copy link

codecov bot commented Jun 27, 2022

Codecov Report

Merging #4689 (7465d78) into main (e709420) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #4689      +/-   ##
==========================================
+ Coverage   78.83%   78.92%   +0.08%     
==========================================
  Files         304      304              
  Lines       37506    37508       +2     
==========================================
+ Hits        29568    29602      +34     
+ Misses       7938     7906      -32     

@teor2345 teor2345 added I-usability Zebra is hard to understand or use A-diagnostics Area: Diagnosing issues or monitoring performance C-testing Category: These are tests and removed C-testing Category: These are tests labels Jun 27, 2022
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

I did a merge with PR #4676 and added some comments.

zebrad/src/application.rs Show resolved Hide resolved
@upbqdn upbqdn force-pushed the zebrad-toml-user-warning branch from ca9e034 to 854544b Compare June 27, 2022 16:45
@upbqdn upbqdn requested a review from a team as a code owner June 27, 2022 16:45
@upbqdn upbqdn force-pushed the zebrad-toml-user-warning branch from 854544b to 7465d78 Compare June 27, 2022 16:48
@dconnolly dconnolly requested a review from teor2345 June 27, 2022 21:50
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fixes!

mergify bot added a commit that referenced this pull request Jun 27, 2022
@mergify mergify bot merged commit 3b839b7 into main Jun 28, 2022
@mergify mergify bot deleted the zebrad-toml-user-warning branch June 28, 2022 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Diagnosing issues or monitoring performance I-usability Zebra is hard to understand or use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn the user when Zebra doesn't recognize the format of zebrad.toml
2 participants