-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ws-daemon] do not fail workspace if git status failed during dispose #11331
Conversation
/hold |
@sagor999 I think we need to update the configuration and configure |
@aledbf I was referring to this particular case: I think what you are referring to is a frequent similar error that seems to be coming from prebuilds (unsafe directory error). |
8d2d1c6
to
5688da8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach 👍
I encountered a scenario with the error git status failed
, but the volume snapshot is ready to use.
In the scenario, we enable the PVC feature flag and manually make the node into a NotReady state (by disabling the k3s-agent on the host).
Then, the workspace pod becomes a Terminating state—finally, the VolumeSnapshot object is created by ws-manager and taken the snapshot of the PVC.
After relaunching the workspace pod, the workspace pod launches at another Ready node, and the user's content is recovered from the VolumeSnapshot.
Without this PR change, the dashboard shows the error cannot get git status
.
The pro is we keep the user's content by PVC w/o data loss, and the con is we can't see the git difference in the dashboard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(minor nit, hence the hold)
/hold
/hold |
/unhold |
/hold (due to the build error) |
/werft run with-clean-slate-deployment=true 👍 started the job as gitpod-build-pavel-git-status-fix.3 |
/werft run with-clean-slate-deployment=true 👍 started the job as gitpod-build-pavel-git-status-fix.4 |
something funky with unit tests in this build. each time it is a different test that fails, but opened it and did a leeway build and everything built fine... |
Co-authored-by: Christian Weichel <chris@gitpod.io>
9b29fc9
to
74c2f36
Compare
/werft run 👍 started the job as gitpod-build-pavel-git-status-fix.6 |
The test succeeded this time. The set of of components that Leeway decided it needed to build is very different between gitpod-build-pavel-git-status-fix.5 and gitpod-build-pavel-git-status-fix.6 - I'm not quite sure why. But given the failing tests were sporadic and unrelated to this PR I'll remove the hold so it can be merged and you can at least wake up to a merged PR /unhold Update: Here is the internal Slack - I think that we're using a shared Leeway cache for all non-main branches which might hide test flakiness as you only need one successful build across all non-main branches. So you experienced the flakiness because you happened to be the first to build these components off main (if my theory is correct) |
Description
(This PR is stacked on top of #11330, please review commit: 8d2d1c6)
Some workspaces fail with
cannot get git status
, which is not a critical error.Observed in some cases it failed due to potentially corrupt\misconfigured .git folder (potentially due to user's actions).
This PR would make it so that we don't fail workspace when this happens and instead continue disposing it.
For example, we already do that if workspace folder does not contain .git folder in it:
gitpod/components/ws-daemon/pkg/internal/session/workspace.go
Lines 309 to 312 in 905be0a
Main reasoning is that even if we cannot get git status, all that means is that we not going to show the user in dashboard uncommitted changes, which should not be a reason for failing whole workspace.
Related Issue(s)
Fixes #
How to test
Open workspace and corrupt your .git folder
Observe that workspace still finishes correctly, albeit without showing any uncommitted changes in dashboard.
Release Notes
Documentation
Werft options: