Skip to content

[gp] Support gp env by talking to server directly #3162

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

Closed
vymarkov opened this issue Feb 10, 2021 · 6 comments · Fixed by #3569
Closed

[gp] Support gp env by talking to server directly #3162

vymarkov opened this issue Feb 10, 2021 · 6 comments · Fixed by #3569
Assignees
Labels
component: gp cli roadmap item: gitpod code https://bit.ly/3oqjuOn type: work item This issue pertains to something we have to do where the result is not code or a deployed feature

Comments

@vymarkov
Copy link

vymarkov commented Feb 10, 2021

I've faced with the issue that doesn't allow to read or write any env variable by using gp cli

  1. Set Code as a default editor
  2. Open repo https://github.com/stripe-samples/firebase-subscription-payments
  3. gp env it will produce the error cannot get environment variables: not found
  4. gp env foo=bar it will produce the error cannot get environment variables: not found

image

Version: 1.52.1
Commit: 791d97eab4a4d591cc12a4784bf263088968c6d3
Date: 2021-02-05T11:45:08.161Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36 OPR/74.0.3911.75
@corneliusludmann
Copy link
Contributor

Thanks for reporting!

/cc @akosyakov

@akosyakov
Copy link
Member

We should generally refactor GP to decouple it from Theia as much as possible, i.e. everything besides open and preview.

@akosyakov akosyakov added this to the March 2021 milestone Feb 10, 2021
@csweichel
Copy link
Contributor

Indeed, gp should talk to server directly. We need to take great care to not simply give the workspace token power access to all the user's environment variables.

@csweichel csweichel changed the title [code] Unable to read or write environment variable by using gp [gp] Support gp env by talking to server directly Mar 1, 2021
@csweichel csweichel added component: gp cli type: work item This issue pertains to something we have to do where the result is not code or a deployed feature and removed editor: code (browser) type: bug Something isn't working labels Mar 1, 2021
@csweichel csweichel modified the milestones: March Backlog 2021, [do-not-add-issues] March 2021 Mar 1, 2021
@csweichel csweichel added the roadmap item: gitpod code https://bit.ly/3oqjuOn label Mar 1, 2021
@csweichel
Copy link
Contributor

We should generally refactor GP to decouple it from Theia as much as possible, i.e. everything besides open and preview.

Very much agree. We should also file issues for those individual work items :)

@csweichel
Copy link
Contributor

We should to this in two PRs:

  • make env var API on server resource scope aware (introduce repository pattern based resource scopes for env vars)
  • make gitpod-cli talk to server directly using the workspace token from supervisor

@geropl
Copy link
Member

geropl commented Mar 8, 2021

(BTW: This is an enabler for frontend-less integration tests that check nontrivial stuff inside your workspaces (e.g., are access right configured correctly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: gp cli roadmap item: gitpod code https://bit.ly/3oqjuOn type: work item This issue pertains to something we have to do where the result is not code or a deployed feature
Projects
None yet
7 participants