All jobs

Upgrade Wagtail to the Latest Release

An agent finds a Wagtail site already on the newest Wagtail, raises its Django pin from 6.0 to 6.1, and shows check, migrations and tests passing both ways.

Run this on RushOpens the console with this prompt ready to send, in a Project that has your repository.

What the agent does

The agent reads requirements/base.txt, requirements/development.txt, runtime.txt and the Dockerfile first. The site pins wagtail>=8.0,<8.1 and Django>=6.0,<6.1, and asks for Python 3.12, so it builds a 3.12 venv with uv rather than use the sandbox's 3.11. The untouched clone installs Wagtail 8.0.1 and Django 6.0.9.

Wagtail 8.0.1 is already the newest release, so there is no Wagtail bump to make. Its wheel metadata asks for Django>=5.2 and lists Django 6.1 among its classifiers, and Django 6.1.2 is the latest, so the one change is the Django pin. pip check reports no conflicts after the install.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "Upgrade Wagtail and Django to the latest versions compatible with this site's Python runtime and its other requirements. Trace requirements/*.txt and runtime.txt first, check each candidate's declared Django and Python support, and read the Wagtail upgrade notes for every release you cross. In an isolated environment on the site's Python, run manage.py check, manage.py makemigrations --check, migrate, the demo data load and manage.py test before and after. Keep only bumps that pass, and open a pull request with one line per bump and the output.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

Tried on wagtail/bakerydemo at c9b38d7: 1 file changed, 1 insertion(+), 1 deletion(-), Django>=6.0,<6.1 to Django>=6.1,<6.2 in requirements/base.txt. On both Django 6.0.9 and 6.1.2, manage.py check printed System check identified no issues (0 silenced)., makemigrations --check printed No changes detected, load_initial_data loaded the demo bakery, and manage.py test found 7 tests and ended OK.

For the reviewer: whether to tighten the Wagtail pin to >=8.0.1, since the current range already installs it. Under python -Wd, Django 6.1 warns that EMAIL_BACKEND is deprecated in favour of MAILERS; the settings still use it. The agent did not read the Wagtail release notes, since no Wagtail release was crossed, and did not run runserver or the production extras.

Run it on every Monday morning

An automation with a schedule trigger, cron set to 0 9 * * 1 and your team's timezone, runs this prompt weekly. Most weeks it will find what this run found, nothing to move on Wagtail, and the pull request is a one-line Django pin or nothing at all.

The use case this job follows, with its automation and trigger: Upgrade dependencies weekly.

Why run it on Rush?

A Wagtail upgrade request often turns out to be a Django one: Wagtail 8.0.1 was current, and the gap was a Django pin one minor behind. The run checked the claim in Wagtail's own wheel metadata instead of trusting a changelog, and surfaced the EMAIL_BACKEND deprecation only a warnings-enabled check shows.

Frequently asked questions

Why 7 tests for a whole site?

That is all bakerydemo ships. The agent says so plainly: the upgrade is proved by check, the migration check, a full demo-data load and those tests, not by clicking through the admin.

Why did it install Python 3.12?

runtime.txt and the Dockerfile name 3.12, while the sandbox defaulted to 3.11. Testing on the wrong interpreter can pass an upgrade that fails in deploy, so it made a 3.12 venv with uv.

More Wagtail jobs

More jobs like this: Upgrade dependencies weekly

Keep reading