Skip to content
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

Hotfix: Port numbers need a bigger integer #7054

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

saedx1
Copy link
Contributor

@saedx1 saedx1 commented Jan 3, 2025

Proposed changes

Very simple; an int16 cannot fit port numbers, only uint16 or int32/int64 can fit them.

The current version of NIC breaks on ports greater than 32767 when used with nginx.org/listen-ports or nginx.org/listen-ports-ssl annotations.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

saedx1 added 2 commits January 3, 2025 11:26
The ideal solution would be to use uint16, however, that will require a bigger amount of change to adjust all types. Int32 should so.

Signed-off-by: Saed SayedAhmed <[email protected]>
@saedx1 saedx1 requested a review from a team as a code owner January 3, 2025 16:34
@github-actions github-actions bot added the go Pull requests that update Go code label Jan 3, 2025
Signed-off-by: Saed SayedAhmed <[email protected]>
@jjngx
Copy link
Contributor

jjngx commented Jan 3, 2025

@saedx1 Excellent! Thanks for catching this issue!

Copy link
Contributor

@jjngx jjngx left a comment

Choose a reason for hiding this comment

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

🚀

@saedx1
Copy link
Contributor Author

saedx1 commented Jan 3, 2025

@jjngx No problem. Would we be able to get a patch release (like v4.0.1 or so)? This is somewhat blocking us.

@jjngx
Copy link
Contributor

jjngx commented Jan 3, 2025

@jjngx No problem. Would we be able to get a patch release? This is somewhat blocking us.

We will decide early next week. In the meantime, when this fix gets merged, you will be able to use the edge or build your own image.

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.76%. Comparing base (93eec0d) to head (48ea40b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7054      +/-   ##
==========================================
- Coverage   52.79%   52.76%   -0.03%     
==========================================
  Files          89       89              
  Lines       20827    20827              
==========================================
- Hits        10996    10990       -6     
- Misses       9376     9380       +4     
- Partials      455      457       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vepatel
Copy link
Contributor

vepatel commented Jan 6, 2025

Hi @saedx1, can you please create an issue for this based on our contributing guidelines? The upper limit i.e. port 32767 is basically the highest default allowed port for nodeport.
We'd like to know a bit more re the requirements if possible in the issue.

@saedx1
Copy link
Contributor Author

saedx1 commented Jan 6, 2025

Closes #7063

@saedx1
Copy link
Contributor Author

saedx1 commented Jan 6, 2025

Hi @saedx1, can you please create an issue for this based on our contributing guidelines? The upper limit i.e. port 32767 is basically the highest default allowed port for nodeport. We'd like to know a bit more re the requirements if possible in the issue.

Just for the record, I'll respond here to this as well. This should have nothing to do with NodePorts or the NodePort range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
Status: Todo ☑
Development

Successfully merging this pull request may close these issues.

3 participants