Judge0 API v1.6.0 Release Notes

Release Date: 2020-05-01 // about 4 years ago
  • ๐Ÿ†• 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
    2. Edit docker-compose.yml and change variables VIRTUAL_HOST, LETSENCRYPT_HOST and LETSENCRYPT_EMAIL.
    3. 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
      
    4. 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
      
    2. Your instance of Judge0 API v1.6.0 is now available at http://<IP ADDRESS OF YOUR SERVER>.