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

[supervisor] backoff port auto expose on deadline exceeded #3120

Merged
merged 1 commit into from
Feb 8, 2021

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Feb 5, 2021

What it does

Right now we are trying to auto expose ports each 5s from the supervisor. This PR implements the backoff with 1.5 factor up to half a minute delay.

How to test

  • start a workspace and listen to its logs
  • run in the terminal:
$ curl lama.sh | LAMA_PORT=9090 sh
Ctrl+C
$ curl lama.sh | LAMA_PORT=9091 sh

In logs, you should see that first port gets exposed immediately. For the second port you should see many retries with 1.5 factor and after 1m it gets exposed too.

@akosyakov akosyakov force-pushed the ak/auto_expose_with_backoff branch from 63e3780 to b982a27 Compare February 5, 2021 13:53
components/supervisor/pkg/ports/ports.go Outdated Show resolved Hide resolved
components/supervisor/pkg/ports/ports.go Outdated Show resolved Hide resolved
@akosyakov akosyakov force-pushed the ak/auto_expose_with_backoff branch 2 times, most recently from 270577a to 7929a2e Compare February 5, 2021 15:26
@akosyakov
Copy link
Member Author

It should be good for review now. I will drop test commits and squash before merging after the review.

@akosyakov akosyakov force-pushed the ak/auto_expose_with_backoff branch 4 times, most recently from d5cd263 to fc1f98e Compare February 8, 2021 10:23
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.

LGTM

@akosyakov akosyakov force-pushed the ak/auto_expose_with_backoff branch from fc1f98e to 4128b45 Compare February 8, 2021 13:42
@akosyakov akosyakov merged commit 2cab99e into master Feb 8, 2021
@akosyakov akosyakov deleted the ak/auto_expose_with_backoff branch February 8, 2021 13:46
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.

2 participants