Skip to content

Deprecate explicit reuseport another way#6639

Merged
alexpyattaev merged 13 commits intoanza-xyz:masterfrom
alexpyattaev:deprecate_explicit_reuseport_another_way
Jun 23, 2025
Merged

Deprecate explicit reuseport another way#6639
alexpyattaev merged 13 commits intoanza-xyz:masterfrom
alexpyattaev:deprecate_explicit_reuseport_another_way

Conversation

@alexpyattaev
Copy link
Copy Markdown

Problem

Basically #5965 could not get any progress due to API break concerns, so this is another way to look at the same problem.

Summary of Changes

  • Add new functions side-by-side which replicate 99% of the behavior of the original ones
  • Depreacate original functions
  • Patch uses all over agave to point to the new functions

@alexpyattaev alexpyattaev force-pushed the deprecate_explicit_reuseport_another_way branch from 51e42cb to ed68e61 Compare June 18, 2025 17:59
@alexpyattaev alexpyattaev marked this pull request as ready for review June 18, 2025 18:56
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 86.24642% with 48 lines in your changes missing coverage. Please review.

Project coverage is 82.8%. Comparing base (3281f61) to head (801aa30).
Report is 28 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #6639     +/-   ##
=========================================
- Coverage    82.8%    82.8%   -0.1%     
=========================================
  Files         849      849             
  Lines      379373   379557    +184     
=========================================
+ Hits       314300   314436    +136     
- Misses      65073    65121     +48     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@bw-solana bw-solana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I much prefer this direction in the sense we won't be rugging anyone on the APIs.

@t-nelson - do you bless this direction?

As far as the implementation, the important stuff looks mostly correct to me.

I do see quite a few pub APIs that seem to have been removed completely from net-utils::lib (or maybe I'm just missing them). Would like to understand why they weren't deprecated instead.

Comment thread net-utils/src/lib.rs Outdated

#[deprecated(
since = "2.3.1",
note = "Please avoid this function, it is easy to misuse"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we direct people to the sockets.rs version?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thank you for catching this!

Comment thread net-utils/src/lib.rs
}

#[cfg(feature = "dev-context-only-utils")]
pub async fn bind_to_async(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deprecate instead of remove?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not removed, it is moved to sockets.rs and behind a feature flag where we commonly hide all sorts of unstable nonsense. Not sure if we have to follow the deprecation policy in this case.

@alexpyattaev
Copy link
Copy Markdown
Author

I much prefer this direction in the sense we won't be rugging anyone on the APIs.

Yeah it is probably a bit cleaner, but also more code churn (not just in the library but also at the callsites).

I do see quite a few pub APIs that seem to have been removed completely from net-utils::lib (or maybe I'm just missing them). Would like to understand why they weren't deprecated instead.

I've moved without proper deprecation only the functions that were behind DCOU feature, as they are our internal stuff only relevant to unittests (if someone is using those in production they deserve the trouble). If I have accidentally nuked actual pub stuff then it was not intended of course.

@alexpyattaev alexpyattaev requested a review from bw-solana June 22, 2025 18:50
Copy link
Copy Markdown

@bw-solana bw-solana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Should be fine to rug the dev-context-only-utils APIs

@alexpyattaev alexpyattaev merged commit 0cdebbc into anza-xyz:master Jun 23, 2025
28 checks passed
@mergify
Copy link
Copy Markdown

mergify Bot commented Jun 23, 2025

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

mergify Bot pushed a commit that referenced this pull request Jun 23, 2025
* deprecate reuseport flag

* fix tests and common usage of reuseport functions

* clean up external users of .reuseport()

(cherry picked from commit 0cdebbc)

# Conflicts:
#	net-utils/src/lib.rs
alexpyattaev added a commit that referenced this pull request Jun 25, 2025
* deprecate reuseport flag

* fix tests and common usage of reuseport functions

* clean up external users of .reuseport()

(cherry picked from commit 0cdebbc)

# Conflicts:
#	net-utils/src/lib.rs
alexpyattaev added a commit that referenced this pull request Aug 8, 2025
* deprecate reuseport flag

* fix tests and common usage of reuseport functions

* clean up external users of .reuseport()

(cherry picked from commit 0cdebbc)

# Conflicts:
#	net-utils/src/lib.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants