Skip to content

[supervisor] avoid auto exposing the same port multiple times #2401

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
Dec 8, 2020

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Dec 3, 2020

What it does

It can happen that exposed ports update takes long and meantime other configured/served updates can happen. It creates the pressure and can lead to poor ports availability. This PR makes sure that the same port can be auto exposed by configured/served ports only once if global port did not change, i.e. if local port was not bound/unbound to/from localhost.

How to test

  • Tests should succeed.
  • Start a workspace with many ports, try to toggle their visibility, change configs, serve/unserve the same port on localhost or globally. See how to test in [supervisor] Add port management #1909 for instance.

@svenefftinge
Copy link
Contributor

Related? #2423

@akosyakov akosyakov force-pushed the ak/auto_expose_port branch from b3767d0 to 426c0a1 Compare December 7, 2020 11:42
Copy link
Contributor

@csweichel csweichel left a comment

Choose a reason for hiding this comment

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

Nice one. Changes LGTM

@akosyakov akosyakov merged commit 34a1cde into master Dec 8, 2020
@akosyakov akosyakov deleted the ak/auto_expose_port branch December 8, 2020 07:50
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