Open atilante opened 3 years ago
Actually, the issue is that a-plus-rst-tools assumes that the course always has at least one exercise in the "submit" category. That should be fixed in the a-plus-rst-tools. It has a low priority since this rarely affects typical courses.
The infinite loop in the run-aplus-front container is intentional. It tries to import the course in a loop because it may fail on the first time if the grader container is slow to start up.
The error message CommandError: Configuration failed! Category requires a name.
describes the situation accurately from the perspective of A+. A+ processes the JSON course configuration and sees a category definition that does not have any name. If I remember correctly, the JSON does not have any other key for categories so there is no key that could be printed in the error message. It is an unnamed category definition, but creating a category in the A+ database requires a name.
It is possible to cause an infinite loop in A+ course configuration. This seems to happen if there are no
submit
exercises on the course. I encountered this phenomenon when creating a modified version of the Data Structures and Algorithms Y course for research purposes.How to reproduce this behaviour:
aplus-infinite-loop-bug
:git clone -b aplus-infinite-loop-bug git@version.aalto.fi:course/traky.git traky
cd traky
git submodule init && git submodule update
./docker-compile.sh 1141
./docker-up.sh
plus_1 | [aplus course update] Note: defined settings.BASE_URL from environment
plus_1 | [aplus course update] Note: defined settings.SECRET_KEY_FILE from environment
plus_1 | [aplus course update] Note: defined settings.LOCAL_SETTINGS from environment
plus_1 | [aplus course update] Installing logger for deferred model fields...
plus_1 | [aplus course update] CommandError: Configuration failed!
plus_1 | [aplus course update] Category requires a name.
The location of the error message in the A+ source code seems to be https://github.com/apluslms/a-plus/blob/master/edit_course/operations/configure.py#L422 .
If one uncomments a
submit
exercise with keymy_sort
in the following files, the course configures normally:I see two issues here:
Sidenote: the course currently uses my fork of A+ RST tools, but that does not likely cause the bug; modifications in my fork have been merged to the official repository in pull request https://github.com/apluslms/a-plus-rst-tools/pull/92 .