envbuilder icon indicating copy to clipboard operation
envbuilder copied to clipboard

Force cloning or pull of repo on each run of envbuilder

Open ns-mkusper opened this issue 1 year ago • 3 comments

When using envbuilder and restarting my workspace I nearly always want a fresh copy of the repo, but when using a pvc similar to this example template I envbuilder simply finds the existing repo, prints:

#1: 📦 Cloning MY_REPO...
#1: 📦 The repository already exists! [5.29944ms]

I see no way to force envbuilder to either clone it each time or, preferably, run a git pull to ensure the repo is fresh between rebuilds, but this would make the process more intuitive for our users.

ns-mkusper avatar Mar 19 '24 23:03 ns-mkusper

This is also particularly important when iterating on dockerfiles that fail to build for any reason, particularly if the build process is long. Restarting the workspace is how I'd normally test any new changes pushed to my repo since the failed build and restarting only to find that it's rebuilding the stale repo it checked out earlier is not necessarily the behavior I want.

ns-mkusper avatar Mar 21 '24 15:03 ns-mkusper

Another instance in which this is particularly confusing is when we have users modifying the parameters of their workspace and updating the branch. The envbuilder container will not check out the new branch, which is certainly count-intuitive to their expectations and forces them to create a new workspace in order to get the branch they want.

ns-mkusper avatar May 29 '24 22:05 ns-mkusper