eduNEXT / tutor-contrib-codejail

Tutor plugin that enables execution of untrusted code in secure sandboxes using an external service based on the codejail library.
GNU Affero General Public License v3.0
3 stars 13 forks source link

["BUG"] `tutor.py` is not being used. #44

Closed MoisesGSalas closed 6 months ago

MoisesGSalas commented 1 year ago

Describe the bug This plugins defines a tutor.py file that allows you to override the default configuration of the service, this pattern is also used in other Tutor plugins (e.g. tutor-notes). Even though the tutor.py file is mounted in the container (local-docker-compose-services) it's not actually being used by the service. In order to make use of the file we would need to set the environment variable FLASK_APP_SETTINGS to use the tutor.py module in the container definition.

Additionally we would need to use a new patch similar to notes-settings that allows us to override the default settings of the service..

To Reproduce Steps to reproduce the behavior:

  1. Manually edit the tutor.py file and alter the default configuration (see description message)
  2. Inside the container run flask shell
  3. Check the values by running app.config['CODE_JAIL'] in the shell.
  4. None of the values were overriden.

Expected behavior Is possible to modify the default values of the codejail service.

MaferMazu commented 1 year ago

@MoisesGSalas, thanks for reporting this; I will add it to the backlog for future prioritizing.