[Bug] Package build failure after grading submission

This is an error report.


Screenshot of the error


Error details

I am able to successfully build the service quiz packages (colcon build --packages-select services_quiz services_quiz_srv) when I refresh the course. Gradebot fails to build the packages when I submit the quiz, and after the failure, building the packages again with the same command fails. Before quiz submission, the packages/code build and work successfully, but the build fails once Gradebot runs.

Error message:
CMake Error at CMakeLists.txt:13 (find_package):
By not providing "Findservices_quiz_srv.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"services_quiz_srv", but CMake did not find one.

Could not find a package configuration file provided by "services_quiz_srv"
with any of the following names:

services_quiz_srvConfig.cmake
services_quiz_srv-config.cmake

Add the installation prefix of "services_quiz_srv" to CMAKE_PREFIX_PATH or
set "services_quiz_srv_DIR" to a directory containing one of the above
files. If "services_quiz_srv" provides a separate development package or
SDK, be sure it has been installed.

This typically happens if any of your quiz packages depend on another package in the workspace (a situation that is not supported)

services_quiz must depend on services_quiz_srv, which must not depend on another package in the workspace.

You must be able to compile your quiz packages with --packages-select services_quiz services_quiz_srv any time.

The reason you saw this error after submitting is that gradebot does rm -rf build/ install/ log/, effectively clearing previous compilations, which might have “illegally assisted” your previous local runs to pass.