Remove deprecated features planned for v2023.2#1309
Remove deprecated features planned for v2023.2#1309tgreenx merged 1 commit intozonemaster:developfrom
Conversation
910e9c5 to
106f016
Compare
mattias-p
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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::IPwas deprecated by #1202Profile options
dnssecandedns_sizewere deprecated by #1147Changes
Zonemaster::Engine::Net::IPdnssecandedns_sizeHow to test this PR
Tests are updated and should pass.
Manual testing:
Zonemaster::Engine::Net::IPis not available anymorednssecoredns_sizein a custom profile return an error