Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

For more general architectural details: XQueue Architecture

Table of Contents

So you need to develop/troubleshoot XQueue and its external grading? This page contains helpful details.

xqueue

A devstack xqueue Docker container is available, which supports the same development as other Python/Django IDAs.

To run xqueue in devstack, use: make dev.up.xqueue

xqueue-watcher

Local Development

Here’s the steps required to get a functional xqueue-watcher running locally (without codejail):

  1. Start up the xqueue container in devstack.

    1. make dev.up.xqueue

  2. Run xqueue migrations to create DB tables.

    1. Code Block
      languagetext
      make dev.shell.xqueue
      Then:
      # source ../xqueue_env
      # python manage.py migrate
  3. Create a Django user to use for xqueue-watcher authentication into XQueue.

    1. Code Block
      languagetext
      make dev.shell.xqueue
      Then:
      # source ../xqueue_env
      # python manage.py shell
      Then:
      >>> from django.contrib.auth.models import User
      >>> user = User.objects.create_user('lms', 'test@example.com', 'lms')
      >>> user.save()
  4. Clone the xqueue-watcher repo.

    1. git clone https://github.com/edx/xqueue-watcher.git

  5. Create a Python 3.8 virtualenv.

  6. Install the xqueue-watcher requirements.

    1. pip install -r requirements/production.txt

  7. Create a directory structure that mirrors the one below:

    1. Code Block
      languagetext
      .
      └── root
          ├── 600
          ├── config
          │   ├── conf.d
          │   │   └── 600.json
          │   └── logging.json
          └── xqueue-watcher
              ├── AUTHORS
              ├── LICENSE.TXT
              ├── Makefile
              ├── README.md
              ├── conf.d
              ├── coverage.xml
              ├── grader_support
              ├── load_test
              ├── openedx.yaml
              ├── requirements
              ├── setup.py
              ├── tests
              └── xqueue_watcher
  8. Now, run the xqueue-watcher:

    1. python -m xqueue_watcher -d ../config

Troubleshooting

If the xqueue-watcher doesn’t connect successfully, look at its debug logs to see why. The logs are output to stdout when bringing up xqueue-watcher.

To view the xqueue logs and look for errors/activity, run this devstack make command:

  • make dev.logs.xqueue

Suggested Future Development Work

Developing graders or fixes to xqueue-watcher is not easy! Here’s some suggested items to make things easier:

...