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
parser: warn user on multiple global gateway (LP: #1901836) (FR-728) #217
Conversation
Note that #216 and this PR are in slight conflict, as merging one of them will lead to the tests failing on the other. To solve this is only a matter of changing the keywords from gateway4/6 to gateway in the tests introduced in this PR. |
Please mention LP: #1901836 in the PR description and title. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for another great PR! Contrary to the PR description, we do actually support multiple routing tables (table:
setting) – maybe you could update that accordingly.
This patch introduces a consistency check at the end of the parsing stage, and only emits a
warning in order not to break current configurations.
Yes that's good. We do not want to break existing configurations in the field. Although, arguably configuration defining multiple gateways are already broken (in a different way).
So I like your changes: Clean functions and straight forward testing.
I just want to ask for two small changes see inline comments):
- Logical order of execution of the
validate_gateway_consistency()
function - Verbosity of the error message, please feel free to extend/modify the example I gave below
It doesn't make sense for the user to have multiple global gateways. This patch introduces a consistency check at the end of the parsing stage, and only emits a warning in order not to break current configurations.
5c50e22
to
08c8b9e
Compare
Codecov Report
@@ Coverage Diff @@
## master #217 +/- ##
=======================================
Coverage 99.00% 99.01%
=======================================
Files 55 55
Lines 9178 9200 +22
=======================================
+ Hits 9087 9109 +22
Misses 91 91
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Simon, LGTM! 👀
I've cleaned up some whitespace in the warning message log and I think it's ready for merging, independently of #216
Description
It doesn't make sense for the user to have multiple global gateways. This patch introduces a consistency check at the end of the parsing stage, and only emits a warning in order not to break current configurations.
Addresses LP #1901836
Checklist
make check
successfully.make check-coverage
).