-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[server] incremental workspaces #14461
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
Conversation
started the job as gitpod-build-se-inc-ws2.1 because the annotations in the pull request description changed |
started the job as gitpod-build-se-inc-ws2.2 because the annotations in the pull request description changed |
43440fd
to
4a8557a
Compare
This issue is related: #14237 I would make sense to decouple receiving push events from actually triggering a prebuild. We could introduce a control loop (on quorum leader) to go through the recorded webhook events and then call the prebuild manager periodically. |
I think we can and should tackle this issue separately, to avoid making this PR bigger than it needs to be. |
4a8557a
to
5d7094a
Compare
5d7094a
to
d49aea0
Compare
Looking at this now! 👀 |
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.
Thanks for reaching out, @svenefftinge! Left some comments below!
</div> | ||
<div className="flex mt-4 max-w-2xl"> | ||
<div className="flex flex-col ml-6"> | ||
<input |
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.
suggestion: This could also benefit from a button to update the number here, as we do with dotfiles.
d49aea0
to
fa6fb9d
Compare
fa6fb9d
to
ffdad13
Compare
ffdad13
to
f0793ee
Compare
f0793ee
to
09152d3
Compare
/werft run with-clean-slate-deployment 👍 started the job as gitpod-build-se-inc-ws2.10 |
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.
Awesome work, many thanks @svenefftinge! 💯
I read through the code changes twice, and tested various cases, and everything looks good so far, so approving to unblock this. 🚢
(I feel like I'd need to spend more time to fully understand and test all the implications of the workspace creation mode changes, but this provides sufficient value and seems low-risk enough that we can also go ahead with this, and we can adjust and look for bugs async / or worst case, revert at the first sign of trouble 😋)
Let's do this! 🏀
// we are disabling prebuild cancellation when incremental workspaces are enabled | ||
keepOutdatedPrebuildsRunning: target.checked || project?.settings?.keepOutdatedPrebuildsRunning, |
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 feel like we'll eventually want to remove this feature. It's not ideal / has too many unfortunate side effects.
<div className="text-gray-500 dark:text-gray-400 text-sm mt-2"> | ||
The number of commits that are skipped between prebuilds. | ||
</div> |
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.
We'll likely iterate on this feature and the UX more later, but I wonder: Why bundle these two features together? (I.e. "run prebuilds every N commits" and "always skip prebuild in progress").
I feel like these should be two separate features, and I'm not 100% sure we can do a good job explaining to users exactly what this "number of skipped commits" does and how to use it properly for their project.
if (!ws.done) { | ||
await this.webhookEvents.updateEvent(event.id, { | ||
prebuildStatus: "prebuild_triggered", | ||
status: "processed", | ||
prebuildId: ws.prebuildId, | ||
}); | ||
return ws; | ||
} |
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'm not sure I fully understand this change. What does it mean when ws.done
is true
? And does it always mean that we did not in fact trigger a prebuild? 💭
Description
Introduces a project setting that allows for starting workspaces on the successful prebuild on the direct linear commit history. Enabling this will always skip the "prebuild-in-progress" view.
It also allows specifying the number of commits to skip in between prebuilds.
Related Issue(s)
Fixes #12583
How to test
Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide