Skip to content

jetbrains: launch with interactive login shell in async manner #14916

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 28, 2022

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Nov 24, 2022

Description

This PR ensures:

  • JB GW can try to connect to JB backend as soon as workspace content and .dotflies are initialised, before we will wait for all preparation steps to run the backend before letting a user to attempt
  • JB backend is started with proper user envs, i.e. collected from the login user shell, before they were ignored

After this PR is merged we should try to revert work arounds for detecting JDK and retest. We should also see whether other products can detect properly other SDKs, i.e. golang for gitpod repo, rubymine ruby, pycharm python and so on. cc @felladrin @andreafalzetti

Related Issue(s)

fix #13815

How to test

  • Start a workspace with JB product
  • Export some env var in /etc/profile
  • Run kill <pid-of-status> to emulate graceful shutdown
  • When JB backend is restarted like that, investigate env vars of the backend /proc/<pid-of-backend>/environ. It should have env var from /etc/profile
  • Investigate logs of workplace you should see asked IDE to terminate meaning that JB backend was restarted gracefully via codeWithMe endpoint [1]

Release Notes

JetBrains: Start JB backend with the interactive login shell.

Documentation

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
Copy link

started the job as gitpod-build-akosyakov-jetbrains-server-starts-13815.1 because the annotations in the pull request description changed
(with .werft/ from main)

@akosyakov akosyakov force-pushed the akosyakov/jetbrains-server-starts-13815 branch from 2643a6c to 05fc8f5 Compare November 24, 2022 11:40
@akosyakov
Copy link
Member Author

akosyakov commented Nov 24, 2022

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-akosyakov-jetbrains-server-starts-13815.3
(with .werft/ from main)

@akosyakov akosyakov force-pushed the akosyakov/jetbrains-server-starts-13815 branch from 05fc8f5 to 3395416 Compare November 24, 2022 13:26
@akosyakov akosyakov force-pushed the akosyakov/jetbrains-server-starts-13815 branch from 3395416 to 8b1eff9 Compare November 24, 2022 15:32
@akosyakov akosyakov marked this pull request as ready for review November 24, 2022 15:43
@akosyakov akosyakov requested a review from a team November 24, 2022 15:43
@akosyakov akosyakov force-pushed the akosyakov/jetbrains-server-starts-13815 branch from 8b1eff9 to e5bbaf7 Compare November 24, 2022 16:01
@akosyakov
Copy link
Member Author

/hold

brr, I broke it trying to resolve a comment, will check tomorrow

@akosyakov akosyakov force-pushed the akosyakov/jetbrains-server-starts-13815 branch from e5bbaf7 to f2c98d1 Compare November 25, 2022 14:21
@akosyakov akosyakov force-pushed the akosyakov/jetbrains-server-starts-13815 branch 2 times, most recently from a5c67dc to f5e3984 Compare November 25, 2022 15:08
@akosyakov
Copy link
Member Author

@andreafalzetti @iQQBot @felladrin Now it is good to review.

@akosyakov akosyakov force-pushed the akosyakov/jetbrains-server-starts-13815 branch from 97b9beb to a5c67dc Compare November 25, 2022 15:10
@akosyakov
Copy link
Member Author

/unhold

@akosyakov akosyakov force-pushed the akosyakov/jetbrains-server-starts-13815 branch from f5e3984 to bff90da Compare November 25, 2022 15:10
@felladrin
Copy link
Contributor

felladrin commented Nov 28, 2022

/werft run recreate-preview

👍 started the job as gitpod-build-akosyakov-jetbrains-server-starts-13815.12
(with .werft/ from main)

@felladrin
Copy link
Contributor

felladrin commented Nov 28, 2022

ℹ️ I'm reviewing it 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.

Tested and works as expected! Good work 🎉

/hold

wait for others to finish the review, feel free to unhold

Copy link
Contributor

@felladrin felladrin left a comment

Choose a reason for hiding this comment

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

Worked as described! ✅
I've also noticed it resolved the issue of Goland and package dependencies. Now when opening GoLand, it already indexes all Go Modules! (Tested with two different Go repos)

image

image

image

@akosyakov
Copy link
Member Author

/unhold

@roboquat roboquat merged commit 534e741 into main Nov 28, 2022
@roboquat roboquat deleted the akosyakov/jetbrains-server-starts-13815 branch November 28, 2022 10:28
felladrin added a commit that referenced this pull request Nov 28, 2022
Because JDK should be correctly detected now that #14916 has been merged.
felladrin added a commit that referenced this pull request Nov 28, 2022
Because JDK should be correctly detected now that #14916 has been merged.
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Nov 28, 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 size/XL team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JetBrains server starts without loading user's bashrc
5 participants