Skip to content

[baseserver] Allow zero port to automatically assign port #9396

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

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Apr 19, 2022

Description

Fix from review in #9300, enabled specifying 0 as the port number for both http and grpc servers. In this scenario, net.Listen() automatically assigns an open port. This is great for tests as they can now run in parallel.

As a result, adjusted the behaviour of HTTPAddress() and GRPCAddress() to extract the dynamically assigned port.

Related Issue(s)

Follow-up from #9300

How to test

Unit tests

Release Notes

NONE

Documentation

NONE

@easyCZ easyCZ requested a review from a team April 19, 2022 09:59
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Apr 19, 2022
@easyCZ easyCZ force-pushed the mp/baseserver-zero-port branch from f7c07f7 to fed41d5 Compare April 19, 2022 10:00
@easyCZ easyCZ force-pushed the mp/baseserver-zero-port branch 3 times, most recently from 6c28151 to 353fa24 Compare April 19, 2022 14:02
andrew-farries
andrew-farries previously approved these changes Apr 19, 2022
andrew-farries
andrew-farries previously approved these changes Apr 19, 2022
andrew-farries
andrew-farries previously approved these changes Apr 19, 2022
@easyCZ
Copy link
Member Author

easyCZ commented Apr 19, 2022

Thanks for the review @andrew-farries, I've had to rebase and sadly it cleared out your review.

@roboquat roboquat merged commit 42f50fd into main Apr 19, 2022
@roboquat roboquat deleted the mp/baseserver-zero-port branch April 19, 2022 15:54
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants