net-utils: clean up deprecated methods and update unit tests#7508
net-utils: clean up deprecated methods and update unit tests#7508fkouteib wants to merge 2 commits into
Conversation
| .is_err()); | ||
| } | ||
|
|
||
| #[test] |
There was a problem hiding this comment.
This test is no longer valid. We don't have direct/explicit control over setting/clearing re-use port flag. So multi-bind_*() always enables the re-use port and we can't test the combo desired in this test (multi-bind+re-use disabled).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7508 +/- ##
=========================================
- Coverage 83.4% 83.4% -0.1%
=========================================
Files 814 814
Lines 366068 365777 -291
=========================================
- Hits 305416 305144 -272
+ Misses 60652 60633 -19 🚀 New features to boost your workflow:
|
|
Unfortunately the deprecation backport got stuck in review limbo so we can not actually axe these functions now #6705 . Since 3.0 is about to get cut it is probably worth changing these to deprecated in 3.0 and also kill that backport PR. |
Thank you for the context, Alex. Understood. I will hold off on getting review sign-off on this PR until after v3.0 branch is cut. I have put up #7531 for deprecation version update. |
Yes sounds good! |
d112fd4 to
864f6b4
Compare
| } | ||
| } | ||
|
|
||
| #[test] |
There was a problem hiding this comment.
Test is no longer valid. Bind to any port is no longer supported.
| } | ||
|
|
||
| #[test] | ||
| fn test_bind_with_any_port() { |
There was a problem hiding this comment.
Test is no longer valid. Bind to any port is no longer supported.
fkouteib
left a comment
There was a problem hiding this comment.
Rebased to the latest master after version bump to 3.1 and v3.0 branch cut, and removed additional functions and tests that have changed since the last iteration on these changes.
gregcusack
left a comment
There was a problem hiding this comment.
looks good just the one question/comment on test location
| crate::sockets::{ | ||
| bind_common_in_range_with_config, bind_more_with_config, bind_to, bind_to_with_config, | ||
| bind_two_in_range_with_offset_and_config, multi_bind_in_range_with_config, | ||
| unique_port_range_for_tests, SocketConfiguration as SocketConfig, | ||
| }, |
There was a problem hiding this comment.
for the tests using these, should we just move those tests into sockets.rs instead of leaving them here?
There was a problem hiding this comment.
Good catch. Some of these were actually duplicate tests with identical name and purpose [test_bind(), test_bind_in_range_nil(), test_bind_common_in_range(), test_bind_two_in_range_with_offset()]. So I removed them. The others like test_get_public_ip_addr_reachable() are testing higher level functionality relevant to libary methods in the file. So I think they should stay here and they call socket methods as part of their config setup.
gregcusack
left a comment
There was a problem hiding this comment.
lgtm! but should probably let @alexpyattaev review before merging
alexpyattaev
left a comment
There was a problem hiding this comment.
LGTM but I am not 100% we can make this change on a minor release. Merge at your own peril.
Thank you for the review and the feedback. Would you mind elaborating on the concern? This will not be backported to v3 branch. It's going to master and released in the next quarterly cut release. |
Master is at 3.1 now, which is a minor release. Removing deprecated items is a major API break. But I guess in agave we do not follow strict interpretation of semver. |
Ah yes. I agree but my sense is in Agave that we treat the quarterly releases as "major" when the release branch is first cut, and any BP changes into a release branch as "minor" releases. @steviez what is the official agave policy on what's considered a "major release"? Apologies if it's already documented and published somewhere and I missed it. Thank you. |
Historically, we haven't been great about observing semver in Agave. However, that isn't necessarily a good thing and we're trying to do better. Some discussion here including a note I just added: #3724 If we want to do the "right thing", we should probably defer this until v4.0. @jacobcreech might be able to comment about any ecosystem repercussions of us breaking stuff. With that all said, I'm guessing nobody would actually miss what this PR is ripping out. |
|
Thanks Steve. Deferring this to v4.0 release. |
Problem
Several methods in net-utils have been deprecated and replaced by methods in net-utils::sockets. However, the unit tests all still called the deprecated methods.
Summary of Changes