overhangio / tutor-mfe

This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.
GNU Affero General Public License v3.0
22 stars 95 forks source link

fix: yaml.parser.ParserError due to unrendered image name in dev #102

Closed regisb closed 1 year ago

regisb commented 1 year ago

A user reported the following error on tutor dev start:

======================================================
    Starting the platform in detached mode
======================================================
docker-compose -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.yml -f /home/ubuntu/.local/share/tutor/env/dev/docker-compose.yml -f /home/ubuntu/.local/share/tutor/env/dev/docker-compose.tmp.yml --project-name tutor_dev stop
ERROR: yaml.parser.ParserError: while parsing a block mapping
 in "/home/ubuntu/.local/share/tutor/env/dev/docker-compose.yml", line 66, column 7
expected <block end>, but found '<scalar>'
 in "/home/ubuntu/.local/share/tutor/env/dev/docker-compose.yml", line 66, column 35
Error applying action 'compose:project:started': func=<function _stop_on_local_start at 0x7f78ced225e0> contexts=[]'
Error: Command failed with status 1: docker-compose -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.yml -f /home/ubuntu/.local/share/tutor/env/dev/docker-compose.yml -f /home/ubuntu/.local/share/tutor/env/dev/docker-compose.tmp.yml --project-name tutor_dev stop

Line 66 is: "image: {{ DOCKER_REGISTRY }}overhangio/openedx-authn-dev:{{ MFE_VERSION }}"

Basically the dev image name is not rendered in the template... Thus, we cannot use a function to generate the image name. It's a shame, because it causes some redundancy, but I found no other solution.

regisb commented 1 year ago

@arbrandes FYI I'm going to merge this immediately.