You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Incremental Prebuilds are enabled for a project, new prebuilds will look for a compatible parent prebuild (by looking up the ancestor commits) in order to use it as a base and make the new prebuild faster.
"Compatible" means, among other things, that both the parent and the new prebuild have the exact same set of init, before and prebuild tasks.
If a compatible parent prebuild is found, the new prebuild is started from the older prebuild, and simply runs the init tasks again:
This works well for before, prebuild and init tasks (because we check that they are identical when looking for a compatible parent), however, if the command tasks (or anything else in the config) has changed since the parent prebuild was created, the new incremental prebuild will get an outdated config and GITPOD_TASKS, and e.g. execute oudated command tasks on startup (even if the .gitpod.yml in the repo shows the newer tasks).
Bug description
When Incremental Prebuilds are enabled for a project, new prebuilds will look for a compatible parent prebuild (by looking up the ancestor commits) in order to use it as a base and make the new prebuild faster.
"Compatible" means, among other things, that both the parent and the new prebuild have the exact same set of
init
,before
andprebuild
tasks.If a compatible parent prebuild is found, the new prebuild is started from the older prebuild, and simply runs the
init
tasks again:gitpod/components/server/ee/src/workspace/workspace-factory.ts
Line 111 in 91c09f7
However, the effective configuration of the new incremental prebuild is copied over from the (parent) prebuild:
gitpod/components/server/ee/src/workspace/workspace-factory.ts
Line 204 in 91c09f7
This works well for
before
,prebuild
andinit
tasks (because we check that they are identical when looking for a compatible parent), however, if thecommand
tasks (or anything else in the config) has changed since the parent prebuild was created, the new incremental prebuild will get an outdated config andGITPOD_TASKS
, and e.g. execute oudatedcommand
tasks on startup (even if the.gitpod.yml
in the repo shows the newer tasks).This happened to @mads-hartmann in #7456
Steps to reproduce
init
task and acommand
task, then wait for it to be successfulcommand
task, and wait for this new commit to prebuild successfullyExpected:
command
task should be runObserved:
command
task is executed (or, if the.gitpod.yml
did not have acommand
in 1., nocommand
task is executed at all)Workspace affected
No response
Expected behavior
No response
Example repository
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: