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

Epic: Remove need to commit to git (Gitpod "Inner Loop") #7671

Closed
4 of 9 tasks
mickmister opened this issue Jan 18, 2022 · 14 comments
Closed
4 of 9 tasks

Epic: Remove need to commit to git (Gitpod "Inner Loop") #7671

mickmister opened this issue Jan 18, 2022 · 14 comments

Comments

@mickmister
Copy link

mickmister commented Jan 18, 2022

Improve the speed that users can iterate on their configuration, particularly their .gitpod.yml in a way that doesn't require them to leave gitpod and/or start other workspaces. Doc or research progress.

There are some main configuration areas to improve on:

  1. gitpod.yml - inclusive of the task commands
  2. Image: Dockerfile updates / prebuilds
  3. IDE integrations
  4. Dotfiles iterations
  5. Logs for feedback

Also useful to think on different dimensions:

  1. Does it lint?
  2. Does it build?
  3. Does it run? (integrate)

In scope

Nice to have

Out of scope - Improve outer loop

Closes

Related issues:

Original issue description

Context

When I'm building a workspace, I oftentimes want to iterate on the .gitpod.yml file and test its behavior. My workflow is:

  • make a change to .gitpod.yml
  • commit and push change
  • open gitpod through the commit's/branch's GitHub url
  • now I have a workspace created from my edited .gitpod.yml file

Problem with this approach

Two things that are inconvenient about my current workflow:

  • I'm going to github as part of the workflow. I'd rather stay in gitpod while I'm iterating
  • I end up with an extra workspace that I need to delete

Possible Solution

Add a command to the gp CLI, which takes the current .gitpod.yml (and dockerfile) and starts a fresh workspace with an explicit prebuild stage (so it runs through the automation). The CLI would output the build logs (docker build, prebuild, tasks) to standard out and at the end (ready state) print a link so one can optionally go and open the IDE.
The workspace stops when I terminate the process.

We can then have IDE commands to run this. I think a code lens in the .gitpod.yml would be even better. Also, a notification when the config has changed could be useful for users to discover this.

@pawlean pawlean added the team: webapp Issue belongs to the WebApp team label Jan 19, 2022
@svenefftinge svenefftinge changed the title Feature Request: Support "Recreate Workspace" Epic: Inner Loop for Configuration Changes Jan 20, 2022
@svenefftinge
Copy link
Member

svenefftinge commented Jan 20, 2022

@mickmister this has been discussed more on a solution side in #4861 and #6818. I like that you framed it from the problem/user perspective, so would like to use this as the driving epic. That means we are updating the initial description as we discover this.

@mickmister
Copy link
Author

mickmister commented Jan 20, 2022

@svenefftinge It would be interesting if the workflow could match the style of docker image development, how you can iterate on a dockerfile as it caches the execution of each step. It's more difficult in the .gitpod.yml case, because there are multiple scripts running at once, and probably a million other things I'm not aware of that makes it difficult to cache the steps.

I haven't tried the approach of using a dockerfile to setup the Gitpod image. In what's currently available, that may provide a faster workflow of building the workspace, as you can iterate on the Dockerfile and test with the resulting Docker image, without needing to recreate the workspace on each iteration.

We may be able to access the build context from the Docker build process using build arguments:

docker build --build-arg repository=https://github.com/gitpod-io --build-arg commit=8c3e9a08d96f61d74fad72d67029eefe61a53dba

Then the project maintainer can develop the Dockerfile with access to the repo name etc. Then the Dockerfile would clone the repo and install dependencies etc. It looks like we have access to /workspace during Docker build time here, so this seems possible from a cursory investigation.

@loujaybee
Copy link
Member

Moving to Q3 as the currently proposed solution for this would be dependent upon #7185, which in turn is dependent on API changes introduced in #7900 and #8512. However, if required, some simpler (non-dependent) solutions could be found for immediate pain relief here rather than doing this via a Gitpod CLI / using the Gitpod API's.

@loujaybee
Copy link
Member

loujaybee commented Mar 2, 2022

Note: There is also the related use-case of iterating/feedback loop on updating dotfiles configuration (in addition to .gitpod.yml, which might well be solved with the same solution) but there might be some way to improve the feedback loop for dotfiles iteration in addition, so wanted to add the dotfile use-case / consideration here, also.

@raphaeltm
Copy link

Just adding some feedback from another perspective.

We have a custom Docker image for our workspaces where we pre-install various CLIs that we use on a bunch of projects. If I update the Docker image, to get the latest CLIs, but don't want to get rid of the files in my current workspace (which might include docker volumes with data that I still need), don't have a good path forward. To get the latest image, I need to create a new workspace. It would be really useful (in my use case) to be able to rebuild the current workspace, preserving all the files in /workspace. i.e. re-run the prebuild steps, and then remount /workspace.

We've only just started testing GitPod in the last few weeks, so I might be missing a few things about how it works, but I think this ties in well with this issue.

@richardfrankza
Copy link

Loving the product overall, but as a newbie to gitpod customising my workspace image - it has been painfully slow to iterate and get it right. I look forward to this feature.

@jmls
Copy link

jmls commented Jun 8, 2022

yeah, needing this asap ;)

@csweichel
Copy link
Contributor

csweichel commented Jun 24, 2022

run-gp almost provides that - we'd just need to disable the IDE and port forwarding, and add a good means for getting feedback from the tasks.

Built a prototype using run-gp: https://github.com/gitpod-io/run-gp/compare/cw/lint

@loujaybee
Copy link
Member

loujaybee commented Aug 9, 2022

We have begun technical investigations here and created some draft plans around this. However, I'm going to move this from Q3 currently as it's unlikely to complete in this quarter, with most of our efforts going towards the JetBrains integration.

However, we will continue to gather more information, and you comments, ideas and feedback on this issue are still much appreciated and will get incorporated into any final solution(s).

@loujaybee
Copy link
Member

Temporarily removing @andreafalzetti as owner, will need to figure out who picks this up again in Q4.

@loujaybee
Copy link
Member

Documentation raised w/ announcement: https://github.com/gitpod-io/website/pull/3290

@loujaybee
Copy link
Member

loujaybee commented Apr 11, 2023

Hey folks, a beta version of the gp validate command is now shipped, here's the announcement:

https://www.gitpod.io/changelog/validate-gitpod-yaml-without-commit

You can find some more information of how to use the feature...

Here, in the context of configuring a workspace: https://www.gitpod.io/docs/configure/workspaces
And also here for the CLI command: https://www.gitpod.io/docs/references/gitpod-cli#validate

Feedback is tagged up against the gp validate label [1], feel free to add more issues with any other feedback.

I say we consider this issue closed 🙏

@GitMensch

This comment was marked as outdated.

@akosyakov
Copy link
Member

akosyakov commented Jun 28, 2023

@GitMensch It sounds like a regression. Could you create a new issue and share with which repo you can reproduce it please? I'm trying to reproduce with https://github.com/akosyakov/parcel-demo but I cannot reproduce with VS Code Browser. I tried with both workspace-full and gitpod/workspace-c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests