gitpod-io / gitpod-io/gitpod

"Rerun Prebuild" button does not actually re-run failed prebuild

Open
#12,010 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature: prebuilds meta: never-stale team: webapp type: improvement
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

Description

Bug description

A Gitpod customer reports the following:

  • Prebuilds are enabled for all branches on a project
  • A new commit 1234 was pushed to branch-a
  • A new prebuild abcd was triggered for commit 1234 on branch-a, but eventually the prebuild failed
  • However, clicking on the button Rerun Prebuild (branch-a) does not actually re-run the prebuild -- instead, it redirects to the list of prebuilds

Investigating a bit further, we see that:

  • The prebuild abcd appears in Failed state, with the error The tasks executed in the prebuild returned a non-zero exit code. headless task failed: exit status 255
  • The prebuild abcd also does not show any logs (maybe another, unrelated bug?)
  • When receiving the request triggerPrebuild (with commit ID 1234 and branch branch-a), Gitpod's server responds immediately with:
{
    result: {
        done: true,
        prebuildId: "abcd",
        wsid: "org-project-123"
    }
}

I guess Gitpod considers that commit 1234 already has a successful prebuild, which does not need to be rebuilt, even though prebuild abcd is actually Failed?

Steps to reproduce
  1. Have prebuilds enabled for all branches in a project
  2. Have a "Failed" prebuild for the latest commit of a given branch
  3. Click on "Rerun Prebuild (branch-a)" in the bottom bar of the failed prebuild view
Workspace affected

No response

Expected behavior

Expected: Gitpod triggers a new prebuild for the branch, and then shows you its live logs and status

Actual: Gitpod redirects to the list of prebuilds, just as if the latest prebuild had been successful

Example repository

No response

Anything else?

No response

Front logo Front conversations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Rerun Prebuild action from the failed prebuild view and the triggerPrebuild request, then inspect how failed prebuilds are handled. Done means clicking the button creates a new prebuild for the branch and displays its live logs and status instead of redirecting to the prebuild list.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cloud, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.