gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
12.71k stars 1.21k forks source link

Deprecate and remove "Cancel Prebuilds on Outdated Commits" feature #14949

Closed jankeromnes closed 1 year ago

jankeromnes commented 1 year ago

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":

Screenshot 2022-11-25 at 09 38 54

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:

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

Screenshot 2022-11-25 at 09 48 39

Additional context

easyCZ commented 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

svenefftinge commented 1 year ago

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.

stale[bot] commented 1 year ago

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.