Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: test: use monotonical port numbers#13999

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
mtojek wants to merge4 commits intomainfrom13931-port-2
Closed

Conversation

mtojek
Copy link
Member

@mtojekmtojek commentedJul 24, 2024
edited
Loading

Related:#13931

This PR modifies the logic to assign a potentially empty part starting from the high boundary of the ephemeral range.

Note:

I don't guarantee it helps, but at least I couldn't reproduce it in CI.

@mtojekmtojek self-assigned thisJul 24, 2024
@mtojekmtojek marked this pull request as ready for reviewJuly 24, 2024 12:11
Copy link
Contributor

@dannykoppingdannykopping left a comment

Choose a reason for hiding this comment

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

I'm not sure this will fix the flake.

We're not "reserving" this port for use exclusively in this test.
There's no guarantee here that no other test is not already listening on this port.

To fix, we probably need to assign a "well-known" port to this test, and ensure that no other test can acquire it. We can assign a port outside of the ephemeral port range for this.

@mtojek
Copy link
MemberAuthor

To fix, we probably need to assign a "well-known" port to this test

I assume that this should go together with skippingt.Parallel in casecount > 1?

and ensure that no other test can acquire it

Is there any specific method you have in mind?

@dannykopping
Copy link
Contributor

I assume that this should go together with skippingt.Parallel in casecount > 1?

Yeah we can skipt.Parallel.

Is there any specific method you have in mind?

You could just pick one like30000, which would at least be outside the MacOS & Linux ephemeral port ranges:

# on my Mac$ sysctl net.inet.ip.portrange.{first,last}net.inet.ip.portrange.first: 49152net.inet.ip.portrange.last: 65535# on a linux host$ ssh coder@greenhill.jnb.cdr.dev'sysctl net.ipv4.ip_local_port_range'net.ipv4.ip_local_port_range = 3276860999

Provided no other test explicitly uses port 30000, you should be ok.
If someone picks that port in the future, there will be a collision, which is what we want.

mtojek reacted with thumbs up emoji

@mtojek
Copy link
MemberAuthor

Closing in favor of#14000

@mtojekmtojek closed thisJul 24, 2024
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 24, 2024
@github-actionsgithub-actionsbot deleted the 13931-port-2 branchJanuary 25, 2025 00:06
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@dannykoppingdannykoppingdannykopping left review comments

Assignees

@mtojekmtojek

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mtojek@dannykopping

[8]ページ先頭

©2009-2025 Movatter.jp