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

[ws-daemon] when WaitForInit ensure that state is indeed ready #12360

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

sagor999
Copy link
Contributor

@sagor999 sagor999 commented Aug 24, 2022

Description

This was quite fun to hunt it down.

When calling WaitForInit we will wait for operatingCondition to broadcast to unlock us.
There are two places where broadcast is being done:
MarkInitDone that changes state to WorkspaceReady
Dispose that changes state to WorkspaceDisposed
If workspace fails during InitWorkspace, then its state will be disposed.
We call InitWorkspace during CREATING phase, and then we WaitForInit in INITIALIZING state.
So if InitWorkspace failed, we incorrectly would mark workspace as ready, causing all types of issues down the line.

Related Issue(s)

Fixes #12357
Fixes #11713
Fixes #12049

How to test

Release Notes

none

Documentation

Werft options:

  • /werft with-preview

@sagor999 sagor999 requested a review from a team August 24, 2022 20:50
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-pavel-12357.1 because the annotations in the pull request description changed
(with .werft/ from main)

@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Aug 24, 2022
Copy link
Contributor

@utam0k utam0k left a comment

Choose a reason for hiding this comment

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

Great insight 💯

@roboquat roboquat merged commit 94a9ee7 into main Aug 25, 2022
@roboquat roboquat deleted the pavel/12357 branch August 25, 2022 00:09
@jenting
Copy link
Contributor

jenting commented Aug 25, 2022

Amazing 🤩

@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/XS team: workspace Issue belongs to the Workspace team
Projects
None yet
4 participants