Skip to content

Judge0 API v1.6.0

Compare
Choose a tag to compare
@hermanzdosilovic hermanzdosilovic released this 01 May 18:09
· 246 commits to master since this release

v1.6.0 (2020-05-01)

New Features

  • Added support for automatically redirecting stderr to stdout of the running program with the configuration flag redirect_stderr_to_stdout. Added configuration variable REDIRECT_STDERR_TO_STDOUT that can be used for setting default behaviour for every submission.
  • Added configuration variable DISALLOW_ORIGIN that can be used for disabling CORS only for specific origins.
  • Added configuration variables ALLOW_IP and DISALLOW_IP that can be used for allowing/disallowing only specific IP addresses that can use instance of Judge0 API.
  • Added support for built in maintenance mode that can be enabled with configuration variables MAINTENANCE_MODE and MAINTENANCE_MESSAGE. In maintenance mode clients cannot create or delete submissions i.e. they cannot create new database changes.
  • Added support for universal field * which returns all attributes of a submission.
  • Added route GET /statistics which returns some basic and useful information about Judge0 API instance. Statistic report is cached for 10 minutes.
  • Added basic support for callbacks which are called with HTTP verb PUT.
  • Added support for presetting custom additional files in a sandbox.
  • Added routes GET /submissions/batch and POST /submissions/batch batch create and show or
    submissions.

Improvements

  • Use Redis queue with name that corresponds with the current Judge0 API version. This allows multiple instances of different versions of Judge0 API to use the same Redis instance.
  • Refactored submission field checking.
  • Refactored setting up of default values.

Bug Fixes

  • Fixed a bug that ignored custom setting of configuration variables enable_per_process_and_thread_time_limit and enable_per_process_and_thread_memory_limit.
  • Fixed a bug where cgroups flags for isolate were chosen in the wrong conditions.
  • Fixed a bug that caused Internal Error because sandbox cleanup failed.
  • Fixed a bug where low memory_limit would cause Internal Error. Minimum required value for memory_limit is now 2048.

Security Fixes

  • Fixed a bug that allowed creation of an arbitrary size of the compile output.

Other Changes

  • Do not implicitly force wide open CORS settings when in development mode. I.e. variable ALLOW_ORIGIN can now also be used in development mode.
  • Removed output of configuration settings when server or worker starts.
  • Updated all the gems except Rails to the latest versions.
  • Changed default value of enable_per_process_and_thread_memory_limit to false.
  • Don't show total number of workers in /workers that is determined with configuration variable COUNT because that number is not relevant.
  • Changed the default port to 80 in Docker Compose file.
  • Limited the log size to 100 MB in Docker Compose file.
  • Added logging to run-workers script.
  • Updated dummy client default values.
  • Added Docker Compose file for HTTPS support.
  • Refactored all development and production scripts from scripts directory.
  • Refactored judge0-api.conf file.

Deployment Procedure

With HTTPS (SSL/TLS)

  1. Install Docker and Docker Compose.
  2. Download and extract release archive:
wget https://github.com/judge0/api/releases/download/v1.6.0/judge0-api-v1.6.0-https.zip
unzip judge0-api-v1.6.0-https.zip
  1. Change directory to judge0-api-v1.6.0-https:
cd judge0-api-v1.6.0-https
  1. Edit docker-compose.yml and change variables VIRTUAL_HOST, LETSENCRYPT_HOST and LETSENCRYPT_EMAIL.
  2. Run all services and wait few seconds until everything is initialized:
docker-compose up -d db redis nginx letsencrypt
sleep 10s
docker-compose up -d
sleep 5s
  1. Your instance of Judge0 API v1.6.0 is now available at https://<YOUR DOMAIN>.

With HTTP

  1. Install Docker and Docker Compose.
  2. Download and extract release archive:
wget https://github.com/judge0/api/releases/download/v1.6.0/judge0-api-v1.6.0.zip
unzip judge0-api-v1.6.0.zip
  1. Run all services and wait few seconds until everything is initialized:
cd judge0-api-v1.6.0
docker-compose up -d db redis
sleep 10s
docker-compose up -d
sleep 5s
  1. Your instance of Judge0 API v1.6.0 is now available at http://<IP ADDRESS OF YOUR SERVER>.