Problems starting from a branch

I’m making a repo with gitpod-ready project templates, with branches for specific project types, see https://gitlab.stud.idi.ntnu.no/it1901/gitpod-templates where the gitpod label is clickable. The master is an empty repo with just the gitpod docker and yml files, while each branch has a project setup, e.g. for javafx with an extra label for opening that branch in gitpod.

It works to open the repo itself in gitpod, but when I open using the branch URL for the javafx branch, https://gitlab.stud.idi.ntnu.no/it1901/gitpod-templates/-/tree/javafx, the workspace does not initialise propertly, e.g. java 14 isn’t installed (docker) or used (init).

Is my approach wrong?

Hi @hallvard, sorry for the (very) late response.

It looks like there is a syntax error in your .gitpod.yml file on the javafx branch:

tasks:
  - init: sdk use java 14.0.1.j9-adpt
  command: cd javafx-app

should be:

tasks:
  - init: sdk use java 14.0.1.j9-adpt
    command: cd javafx-app

In general, whenever a Gitpod configuration is completely ignored by Gitpod, my first suspicion is a YAML syntax error.

We should definitely make them more obvious (e.g. currently, Gitpod will print an error in the browser’s devtools console, but this is very easily overlooked – maybe something more obvious like an alert in the IDE would be better).

Thanks! And I agree, better error reporting would help, and of course the editor should provide some validation.