We’re currently implementing a “prebuilds dashboard” page in Gitpod where you can check the status and the logs of your project’s prebuilds (and e.g. see why they failed / with which error message). Unfortunately, this isn’t quite finished yet, so we still need workarounds for now.
I looked at your project’s last 10 prebuilds in our database, and saw a lot of “headless task failed” messages. This means that your
init task generates some error and exits with a non-zero return code.
I suggest you try to manually trigger a new prebuild for your project by using the special URL prefix (i.e. https://gitpod.io/#prebuild/https://github.com/jmcelreavey/dev-job).
I tried that, and the prebuild seemed to work fine, but then when the new workspace started, its third Terminal (called “Application”) failed with this error:
75a8d2dc6608: Pull complete
Status: Downloaded newer image for mariadb:10.6
Creating dev-job_db_1 ... done
Creating dev-job_db-test_1 ... done
$ blitz prisma migrate dev
Error: Cannot find module '@blitzjs/server'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Maybe that’s somehow related?
Also, I notice that you use the YAML multi-line scalar syntax (i.e. “pipe”) for commands:
docker network prune -f
yarn run dev
I’d normally advise against this, because I believe this will still run
yarn run dev even if one of the above commands fails. Instead, I generally prefer using the YAML multi-line folded syntax (i.e. “greater-than”):
docker-compose down &&
docker network prune -f &&
yarn run dev
But maybe this is just a matter of personal preference.
To recap, I think the best current way to trouble-shoot a prebuild command is to:
- Commit your
.gitpod.yml prebuild tasks, and push the commit to some branch (e.g. your project’s default branch, or some temporary test branch)
- Manually trigger a new prebuild for the branch you just pushed to (or simply for your project) by adding the URL prefix
gitpod.io/#prebuild/ in front of the branch or project URL
Then, watch the logs while the prebuild is in progress, notice any errors and iterate.
This will become much more convenient in our upcoming Teams & Projects UI (ships in a few weeks), thanks to an overview of all project prebuilds (and their status/logs) and a side-by-side project configuration “wizard” (with a YAML editor on left and a build output on right, to allow faster iterations).