Skip to content

[supervisor] support multi-line environment variable in ssh #13822

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
Oct 13, 2022

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Oct 13, 2022

Description

Before we use ~/.ssh/supervisor_env to store user envvar in order to export to ssh terminal (it's required by vscode desktop and some user case)

But there have some problems with that, it's don't support multi-line environments (some thing like rsa private key...), if you set an environment variable with a multi-line value, you may cannot connection via ssh

This PR remove ~/.ssh/supervisor_env logic, instead we use SetEnv argument to support that.

Related Issue(s)

Fixes #13592

How to test

  1. start a workspace in the preview environment
  2. run gp env to set a multi-line env
gp env TEST='this 
is
a new line'
  1. open a new workspace in the same context (the env will only affect in new workspace, and gp env only set it in same scope)
  2. connect workspace via ssh, run env and export to see multi-line environment variable is work
  3. open this workspace in vscode desktop, it should work same with before

Release Notes

Support multi-line environment variables in SSH

Documentation

Werft options:

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

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-iqqbot-ssh-bug-in-supervisor-env-13592.5 because the annotations in the pull request description changed
(with .werft/ from main)

@iQQBot iQQBot force-pushed the iqqbot/ssh-bug-in-supervisor-env-13592 branch from 9ec1405 to 52be29c Compare October 13, 2022 06:21
@iQQBot iQQBot marked this pull request as ready for review October 13, 2022 12:43
@iQQBot iQQBot requested a review from a team October 13, 2022 12:43
@iQQBot iQQBot requested a review from aledbf October 13, 2022 12:43
@mustard-mh
Copy link
Contributor

mustard-mh commented Oct 13, 2022

Tested and works well in preview env Cannot connect via SSH

image

But in Dashboard, it's still one-line input. Will file an issue to track it

image

@mustard-mh mustard-mh self-requested a review October 13, 2022 13:02
Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

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

Code LGTM, tested with Desktop/Browser/SSH all good

/hold

For confirmation of workspace

image

@roboquat roboquat merged commit bbd0afd into main Oct 13, 2022
@roboquat roboquat deleted the iqqbot/ssh-bug-in-supervisor-env-13592 branch October 13, 2022 13:34
@mustard-mh
Copy link
Contributor

mustard-mh commented Oct 13, 2022

It's merged = =, sorry, I should /hold without approval to avoid race ( Tide moves faster than before 🐶

@mustard-mh
Copy link
Contributor

mustard-mh commented Oct 13, 2022

@aledbf Could you check the code again 🙏 ? And we can make a follow up PR to update if have some

@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: supervisor deployed: IDE IDE change is running in production deployed Change is completely running in production do-not-merge/hold release-note size/M team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SSH] Bug in supervisor_env
4 participants