-
Notifications
You must be signed in to change notification settings - Fork 34
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
Remove deprecated features planned for v2023.2 #1309
Conversation
910e9c5
to
106f016
Compare
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.
I applaud this initiative. I just have one suggestion.
foreach my $flag ( keys %flags ) { | ||
$self->dns->$flag( Zonemaster::Engine::Profile->effective->get( q{resolver.defaults.}.$flag ) ); | ||
# Except for any flag that is not configurable in the profile | ||
unless ( grep( /^$flag$/, ( 'dnssec', 'edns_size' ) ) ) { |
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.
I believe there is a different cleanup for this that is cleaner. I.e. replacing lines 466 and 467
$flags{q{dnssec}} = $href->{edns_details}{do} // $flags{q{dnssec}};
$flags{q{edns_size}} = $href->{edns_details}{size} // $flags{q{edns_size}};
with
$self->dns->dnssec( $href->{edns_details}{do} );
$self->dns->edns_size( $href->{edns_details}{size} );
That should have the same effect with less and simpler code.
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.
Unfortunately no that is not equivalent. Note that both options are still valid customizable flags, i.e. they can be changed in the Test Case implementations (with any call to Zonemaster::Engine::Nameserver::query()
) - it is only the possibility of having/customizing them in the profile that is removed here.
But honestly, I'm not even sure this part of the code ("Reset to defaults", lines 537 to 543) is needed at all, since every options are checked whenever a new query is done (lines 454 to 463).
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.
But honestly, I'm not even sure this part of the code ("Reset to defaults", lines 537 to 543) is needed at all, since every options are checked whenever a new query is done (lines 454 to 463).
I agree with you. I also don't think "restore" describes very well what actually happens. To me "restore" bringing back the state that was before you came. This code resets the state to whatever happens to be in the profile right now.
Should we just remove it? Maybe in the beginning of next release cycle so we have more time to find weird bugs?
Unfortunately no that is not equivalent.
Oh, you're right. I was clearly going too fast in my review. Or I was seeing what I wanted to see. I really dislike how %flags is used in _query().
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.
But honestly, I'm not even sure this part of the code ("Reset to defaults", lines 537 to 543) is needed at all, since every options are checked whenever a new query is done (lines 454 to 463).
I agree with you. I also don't think "restore" describes very well what actually happens. To me "restore" bringing back the state that was before you came. This code resets the state to whatever happens to be in the profile right now.
Should we just remove it? Maybe in the beginning of next release cycle so we have more time to find weird bugs?
That can come in another PR.
@mattias-p @matsduf I just fixed a conflict, please re-review. |
- Remove module Zonemaster::Engine::Net::IP - Remove profile options 'dnssec' and 'edns_size' - Update unitary tests
c155fe4
to
ebe0ee3
Compare
Release testing: Looks fine. |
Purpose
This PR removes deprecated features that were planned for v2023.2 See the Changes section below.
Context
Module
Zonemaster::Engine::Net::IP
was deprecated by #1202Profile options
dnssec
andedns_size
were deprecated by #1147Changes
Zonemaster::Engine::Net::IP
dnssec
andedns_size
How to test this PR
Tests are updated and should pass.
Manual testing:
Zonemaster::Engine::Net::IP
is not available anymorednssec
oredns_size
in a custom profile return an error