Closed jankeromnes closed 1 year ago
Should also deprecate (not remove) it from https://github.com/gitpod-io/gitpod/blob/main/components/public-api/gitpod/experimental/v1/projects.proto#L51 used by the public api
For projects with a low commit frequency, this feature does nothing (i.e. prebuilds are always finished before the next push, so this feature brings zero value)
A very common working mode is to force push on a branch. In those case any running prebuilds should always be immediately cancelled (no opt-out), because they are no longer reachable (the commit doesn't exist).
The original motivation for this feature was to cancel prebuilds that are non-reachable. I.e. where the commit no longer exists (force-pushed) or has been superseded by a new commit. The latter are now reachable since we use older prebuilds and incrementally update them. So we can deprecate that part but killing prebuilds for which no commit exists would still make sense.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is your feature request related to a problem? Please describe
In an effort to optimize Prebuilds, we've previously introduced a Project Settings feature called "Cancel Prebuilds on Outdated Commits":
What this feature does is: When new commits are pushed to a given branch, automatically cancel any prebuilds that are currently still running for this branch.
Unfortunately, this feature doesn't quite work as we intended, and it has a number of unfortunate side effects:
For projects with a low commit frequency, this feature does nothing (i.e. prebuilds are always finished before the next push, so this feature brings zero value)
For projects with a high commit frequency, this feature:
Describe the behaviour you'd like
We should deprecate and remove the "Cancel Prebuilds on Outdated Commits" feature, because it doesn't work well.
Describe alternatives you've considered
We already have better alternatives to optimize prebuilds:
https://github.com/gitpod-io/gitpod/blob/08be4195d40cbea9248847547a8fc25fe44f3cba/components/server/ee/src/prebuilds/prebuild-manager.ts#L243-L258
Additional context