Judge0 API v1.13.0 Release Notes

Release Date: 2021-03-10 // over 1 year ago
  • Huge thanks to Filtered for sponsoring this release.

    🆕 New Features

    • 🔧 Added support for enable_network configuration flag. With the new ALLOW_ENABLE_NETWORK configuration variable, usage of this flag can be permitted or denied. Furthermore, with the new ENABLE_NETWORK configuration variable the default value of this flag can be set for every submission.
    • 📄 Added USE_DOCS_AS_HOMEPAGE configuration variable, which allows you to show or hide Judge0 homepage. Now, by default, Judge0 homepage is empty and does not show the API documentation. However, you can still access the API documentation via /docs.

    🐛 Bug Fixes

    • 🛠 Fixed the bug where the wrong number of workers would be reported via /workers.

    🔒 Security Fixes

    • HIGH Fixed a security bug where certain submission configuration settings would allow the user to run a program that would run infinetly long. With this fix wall_time_limit must be at least 1 second.

    Other Changes

    • Allow setting the max_file_size and stack_limit to 0 kB.
    • Allow setting the cpu_time_limit and cpu_extra_time to 0 seconds.
    • 0️⃣ Updated to a port 2358 as a new default port for Judge0 as a online code execution service.
    • ⚡️ Updated the default number of Judge0 Workers, those that acutally run the user's code, to the 2*nproc. This has been shown as a good choice for general purpose use-case.
    • ⚡️ Updated the default number of Rails threads to nproc and Rails processes to 2. This has been shown as a good choice for general purpose use-case.
    • 🚀 Updated Let's Encrypt Docker image for deployment with HTTPS.
    • 🚀 Updated Nginx proxy Docker image that is used in development setup and deployment with HTTPS.
    • 🛠 Fixed documentation typos. Thank you @balababa.
      • Pull Requests: #245
    • ⚡️ Updated base image to judge0/compilers:1.4.0 which uses updated Isolate to @ad39cc4d.

    🚀 Deployment Procedure

    👍 Judge0 is collecting telemetry data to help understand how to improve the product and to better understand how Judge0 is used in various production environments. Read more about telemetry here.

    🐧 Please note that Judge0 has only been tested on Linux and macOS, and might not work on Windows, thus we do not provide support for it.

    With HTTP

    🐳 1. Install Docker and Docker Compose. 🚀 2. Download and extract the release archive:

    wget https://github.com/judge0/judge0/releases/download/v1.13.0/judge0-v1.13.0.zip
    unzip judge0-v1.13.0.zip
    
    1. Run all services and wait a few seconds until everything is initialized:

      cd judge0-v1.13.0
      docker-compose up -d db redis
      sleep 10s
      docker-compose up -d
      sleep 5s
      
    2. Your instance of Judge0 CE v1.13.0 is now available at http://<IP ADDRESS OF YOUR SERVER>:2358.

    With HTTPS (SSL/TLS)

    🐳 1. Install Docker and Docker Compose. 🚀 2. Download and extract the release archive:

    wget https://github.com/judge0/judge0/releases/download/v1.13.0/judge0-v1.13.0-https.zip
    unzip judge0-v1.13.0-https.zip
    
    1. Change directory to judge0-v1.13.0-https: cd judge0-v1.13.0-https
    2. Edit docker-compose.yml and change variables VIRTUAL_HOST, LETSENCRYPT_HOST and LETSENCRYPT_EMAIL.
    3. Run all services and wait a few seconds until everything is initialized:

      docker-compose up -d db redis
      sleep 10s
      docker-compose up -d
      sleep 5s
      
    4. Your instance of Judge0 CE v1.13.0 is now available at https://<YOUR DOMAIN>.


Previous changes from v1.12.0

  • v1.12.0 (2020-10-18)

    🆕 New Features

    • ➕ Added support for invalidating statistics cache using the invalidate_cache query parameter.
    • Added rake task judge0:run_in_queue to manually run submissions that might have stuck in the In Queue state.
    • Added support for specifying CALLBACKS_MAX_TRIES and CALLBACKS_TIMEOUT. This is a global configuration that applies to all submissions that have defined webhooks (HTTP callbacks).
    • Added support for submission caching to reduce the number of unnecessary database hits. Cache duration can be controlled with the SUBMISSION_CACHE_DURATION variable which is currently set to 1 second by default. Submissions are only cached for GET /submissions/<token> route. Cache files are written to the server's file system and are automatically cleared every day at midnight. This is the first step toward more serious submission caching in the future.

    👌 Improvements

    • ⚡️ Update PostgreSQL to 13.0 and Redis to 6.0.
    • ⏱ Reschedule failed jobs after 0.1 seconds with 100 attempts.
    • 👷 Send only submission ID to the worker and not the whole serialized submission.
    • Automatically restart Judge0 server without the need for Docker restart policies. Use the RESTART_MAX_TRIES variable to specify the maximum number of restart tries.

    🐛 Bug Fixes

    • 🛠 Fixed a bug in the is_project method of submission model where an exception was raised and not handled properly due to unknown language.

    Other Changes

    • 🐳 Use Docker volumes for storing Postgres and Redis data instead of mounting directories. This is now the new recommended setting.
    • ➕ Added Resque Web to the development stack.
    • 📚 Changed binding ports for Nginx and documentation server in the development stack. Nginx is now bound to port 80, and the development server to port 3001.
    • ✂ Removed port bindings of Postgres and Redis in the development stack.
    • ➕ Added PgBouncer to the development stack for testing and experimenting.
    • Changed recommended values for POSTGRES_DB and POSTGRES_USER. Both are now judge0.

    🚀 Deployment Procedure

    👍 Judge0 is collecting telemetry data to help understand how to improve the product and to better understand how Judge0 is used in various production environments. Read more about telemetry here.

    🐧 Please note that Judge0 has only been tested on Linux and macOS , and might not work on Windows, thus we do not provide support for it.

    With HTTP

    🐳 1. Install Docker and Docker Compose. 🚀 2. Download and extract release archive:

    wget https://github.com/judge0/judge0/releases/download/v1.12.0/judge0-v1.12.0.zip
    unzip judge0-v1.12.0.zip
    
    1. Run all services and wait a few seconds until everything is initialized:

      cd judge0-v1.12.0 docker-compose up -d db redis sleep 10s docker-compose up -d sleep 5s

    2. Your instance of Judge0 v1.12.0 is now available at http://<IP ADDRESS OF YOUR SERVER>.

    With HTTPS (SSL/TLS)

    🐳 1. Install Docker and Docker Compose. 🚀 2. Download and extract release archive:

    wget https://github.com/judge0/judge0/releases/download/v1.12.0/judge0-v1.12.0-https.zip
    unzip judge0-v1.12.0-https.zip
    
    1. Change directory to judge0-v1.12.0-https:

      cd judge0-v1.12.0-https

    2. Edit docker-compose.yml and change variables VIRTUAL_HOST, LETSENCRYPT_HOST and LETSENCRYPT_EMAIL.

    3. Run all services and wait a few seconds until everything is initialized:

      docker-compose up -d db redis sleep 10s docker-compose up -d sleep 5s

    4. Your instance of Judge0 v1.12.0 is now available at https://<YOUR DOMAIN>.