-
Notifications
You must be signed in to change notification settings - Fork 36
Update Address01 implementation #1453
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
Conversation
0ae205d to
ec92cd4
Compare
ec92cd4 to
e6b12f1
Compare
matsduf
left a comment
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.
The PR is still in draft state.
97196c3 to
1df45d3
Compare
|
@tolvmannen @matsduf This PR is now ready for review. Note that unit tests are updated and should all pass, which is the case for specific test scenarios of Address01 located in |
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.
Have you considered using the format introduced by #1467 instead?
matsduf
left a comment
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.
This is fine, but all tests should pass before merge. Either if the problematic server comes up or if the failing tests are marked as TODO. In the latter case the tests could possibly replaced by scenario based tests. The scenarios for this test case pass.
matsduf
left a comment
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.
Two scenarios fail when testing with zonemaster-cli:
| Scenario name | Mandatory message tag | Forbidden message tags |
|:----------------------|:------------------------------------------------------------------------------|:-----------------------|
| GOOD-1 | A01_GLOBALLY_REACHABLE_ADDR | 2) |
* (2) All tags except for those specified as “Mandatory message tags”
```
$ zonemaster-cli --show-testcase --level INFO --test address01 --hints ../../COMMON/hintfile --raw good-1.address01.xa
0.00 INFO Unspecified GLOBAL_VERSION version=v8.0.0
0.03 CRITICAL Address01 A01_NO_NAME_SERVERS_FOUND
0.03 INFO Address01 A01_GLOBALLY_REACHABLE_ADDR
```
--> Not OK, *A01_NO_NAME_SERVERS_FOUND* unexpected.
and
| Scenario name | Mandatory message tag | Forbidden message tags |
|:----------------------|:------------------------------------------------------------------------------|:-----------------------|
| NO-NAME-SERVERS | A01_NO_NAME_SERVERS_FOUND | 2) |
* (2) All tags except for those specified as “Mandatory message tags”
```
$ zonemaster-cli --show-testcase --level INFO --test address01 --hints ../../COMMON/hintfile --raw no-name-servers.address01.xa
0.00 INFO Unspecified GLOBAL_VERSION version=v8.0.0
0.04 CRITICAL Address01 A01_NO_NAME_SERVERS_FOUND
0.04 INFO Address01 A01_GLOBALLY_REACHABLE_ADDR
```
--> Not OK, *A01_GLOBALLY_REACHABLE_ADDR* unexpected.
|
I have also a change request on the specification to make it easier to follow the behavior of the code, see my comments at zonemaster/zonemaster#1284. |
1df45d3 to
85d48a4
Compare
|
@matsduf @tolvmannen please re-review |
85d48a4 to
fa3866e
Compare
matsduf
left a comment
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.
Everything looks fine now. Only recreation of the data file is needed.
fa3866e to
1db7b4c
Compare
@matsduf @tolvmannen Done. Also updated message ids to "address(es)". Please re-review. |
1db7b4c to
d2d2bbf
Compare
|
I successfully tested this PR for the 2025.2 release. On my development setup, unit tests pass and Some basic testing with internal domains which have private IPv4 addresses cause messages such as “IP address(es) intended for local use on network or service provider level” to appear in the output. On the other hand, other zones give “Globally reachable IP address(es)”. |
Purpose
This PR proposes an update to the implementation of Address01 following a specification update.
Context
Based on:
Changes
lib/Zonemaster/Engine/Constants.pmlib/Zonemaster/Engine/Test/Address.pmshare/profile.{json, yaml}t/Test-address.t: updated and refactoredt/Test-address01.t: addedHow to test this PR
Unit tests are added/updated and should pass.