Skip to content

[JetBains] Fix to continuously observe ports while Gitpod Port Forwarding Service is active #14628

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
Nov 11, 2022

Conversation

felladrin
Copy link
Contributor

@felladrin felladrin commented Nov 11, 2022

Description

In #14408 I forgot to add the loop which restarts the observation on Ports from the Supervisor in case of an exception in the Supervisor (e.g. momentaneous connection loss). This PR fixes it. Besides that, it now uses a coroutine instead of a thread for it.

Related Issue(s)

How to test

I'm unsure about how it can be tested. It would need to have an error or disconnection from Supervisor's side.
But you can verify that ports are being forwarded automatically and are being displayed in the Ports View. It shows the service continues working as expected.

image

Release Notes

NONE

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com

This comment was marked as resolved.

@felladrin felladrin changed the title Fix to observe ports while the service is active [JetBains] Fix to continuously observe ports while Gitpod Port Forwarding Service is active Nov 11, 2022
@felladrin felladrin marked this pull request as ready for review November 11, 2022 17:41
@felladrin felladrin requested a review from a team November 11, 2022 17:41
@felladrin felladrin self-assigned this Nov 11, 2022
@andreafalzetti
Copy link
Contributor

andreafalzetti commented Nov 11, 2022

Reviewing this now 👀 🤩

Copy link
Contributor

@andreafalzetti andreafalzetti left a comment

Choose a reason for hiding this comment

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

good catch 💯

I think it's not worth trying to break supervisor for testing as the code change looks good and it works as expected.

@roboquat roboquat merged commit 1fb74d9 into main Nov 11, 2022
@roboquat roboquat deleted the felladrin/observe-ports-while-service-is-active branch November 11, 2022 18:10
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production editor: jetbrains release-note-none size/M team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants