# Set Up Dependabot for a Dagster Workspace with uv

Yes. An agent writes a dependabot.yml for your Dagster workspace that covers every uv project, groups the Dagster and dbt libraries, and opens a PR with a dry run.

[Run this on Rush](https://cloud.getrush.ai/run/add-dependabot/dagster/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent reads the workspace layout before it writes a configuration, because a Dagster repository is usually several Python projects, not one. In a repository like dagster-io/hooli-data-eng-pipelines, `dg.toml` declares a workspace of six projects and comments out a seventh, `hooli-airlift`, with a note about an import error; each of the seven directories has its own hatchling `pyproject.toml` with `requires-python >= 3.9, < 3.13`, unpinned dependencies such as `dagster`, `dagster-dbt`, `dagster-cloud[insights]` and `dbt-snowflake`, a `uv.lock` that resolves them (the `hooli-data-eng` lock pins `dagster` 1.12.1, `dagster-dbt` 0.28.1, `dbt-core` 1.10.19 and `dbt-snowflake` 1.10.2), and a `Dockerfile` that starts from a `ghcr.io/astral-sh/uv` Python image and runs `uv sync --frozen`. An eighth uv project sits in `.github/python_dependencies/` for CI. The only workflow, `deploy-dagster-cloud.yml`, uses `actions/checkout@v4`, `astral-sh/setup-uv@v3`, `docker/build-push-action@v5`, a SHA-pinned `step-security/changed-files` and `dagster-io/dagster-cloud-action` at `v1.12.14`, and installs `dagster-cloud` and the dbt adapters with `uv pip install --upgrade` at deploy time. The `Makefile`'s `update_packages` target runs `uv lock --upgrade` in each project by hand, `dbt_project/packages.yml` pins `calogica/dbt_expectations` 0.10.3, and there is no `.github/dependabot.yml` and no Renovate file.

The agent writes `.github/dependabot.yml` with a `uv` entry whose `directories` list names the seven project directories and `.github/python_dependencies`, on a weekly schedule with a `commit-message` prefix and a `dependencies` label. Dagster's libraries are versioned in lockstep, `dagster` 1.x alongside `dagster-dbt`, `dagster-aws` and the rest at 0.2x, and a mixed set fails to import, so one group named `dagster` matches `dagster` and `dagster-*` and opens them as one pull request per project; a second group `dbt` holds `dbt-core` and `dbt-*`; a third takes every other minor and patch update, leaving other majors on their own. It sets `open-pull-requests-limit` per entry so eight directories cannot open forty pull requests in a week, and ignores `dbt-snowflake` above 1.8 with the reason the deploy workflow gives in its own `<=1.8.4` pin, flagged in the pull request as a constraint to confirm or drop.

A `github-actions` entry covers the workflow, which brings `setup-uv@v3` and `build-push-action@v5` forward and updates the SHA pin on `changed-files` with its version comment intact. The agent adds a `docker` entry for the seven Dockerfiles and says plainly what it can do: the base image tag `python3.12-bookworm` carries no version number, so Dependabot will not propose a change to it, and the entry mostly documents intent until the team pins a digest. It does not add an entry for `dbt_project/packages.yml`, since dbt packages are not an ecosystem Dependabot knows, and leaves a note that the deploy workflow's unpinned `uv pip install --upgrade` is a separate problem the lockfiles do not reach.

To check it, the agent runs `uv lock --upgrade --dry-run` in each project to list what the first grouped pull requests would carry, which needs nothing beyond uv in its sandbox, and validates the YAML against GitHub's published schema. It then installs Docker (`sudo apt-get install -y docker.io`, then starts `dockerd`), because the Dependabot CLI runs each updater in a container, and runs the `uv` updater in dry-run mode against one project to confirm the groups and the ignore resolve as written. Both outputs go into the pull request description.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Set up Dependabot for this Dagster workspace. Read dg.toml, dagster_cloud.yaml, the Makefile, every pyproject.toml, uv.lock and Dockerfile in the project directories, .github/python_dependencies/, every workflow under .github/workflows/ and dbt_project/packages.yml first. Write .github/dependabot.yml with a weekly uv entry whose directories list every project that has a uv.lock, with a commit message prefix and a label; group dagster and dagster-* into one pull request per project, dbt-core and dbt-* into another, and other minor and patch updates into a third; set an open pull request limit per entry; add an ignore for any constraint the workflows already express, with its reason. Add a github-actions entry for the workflow and a docker entry for the Dockerfiles, and say in the pull request what the docker entry cannot update and why dbt packages are not covered. Run uv lock --upgrade --dry-run in each project and paste what the first pull requests would carry, validate the YAML against GitHub's schema, run the Dependabot CLI in dry-run mode for one project in your sandbox, and open a pull request with that 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

The pull request adds `.github/dependabot.yml` and changes nothing else. Its description lists the three entries as written, the `uv lock --upgrade --dry-run` summary per project showing which Dagster, dbt and other packages would move in the first week, the Dependabot CLI's dry run for one project with its groups resolved, the schema validation result, and the two notes about the Docker base tag and the dbt packages file.

Once merged, Dependabot opens on the next scheduled day one grouped Dagster pull request and one grouped dbt pull request per project that has something to move, plus one for the workflow's actions, each updating a `uv.lock` that the project's Dockerfile installs with `--frozen`. Each pull request runs the deploy workflow, so a branch deployment to Dagster+ shows whether the code locations still load before anyone merges.

Before merging, a reviewer picks the day and time zone, confirms or removes the `dbt-snowflake` ignore, decides whether the deploy workflow's own `uv pip install --upgrade` should be replaced by the CI lockfile so what Dependabot tests is what deploys, and sets the pull request limit to what the team will review.

## Run it on every repository without an update bot

A data platform team with several Dagster repositories sends this body once per repository to `POST /o/{org}/sessions`, each with its own repository in `resources` and a `request_id` that is a UUID v5 of the repository's full name, so a retried call returns the run already started. Each run reads its own `dg.toml` and lockfiles: a single-project repository gets one `uv` directory, one with `requirements.txt` files gets `pip` entries instead, and one that already has Renovate is left alone with a note.

After the bot is on, the recurring job is reviewing what it opens. A `schedule` trigger on an automation, set to the morning after Dependabot's day, starts one run whose prompt asks the agent to read each open Dependabot pull request, check the Dagster release notes for the versions in the group, load each affected code location with `dg check defs` and leave a review. A Dependabot pull request fires no `github` trigger, since bot senders never do, and an automation run has its own `max_runs_per_hour` cap.

## Why run it on Rush?

A Dependabot file for a Dagster workspace copied from a single-project template either misses most of the lockfiles or opens a pull request per library per project, and a Dagster core bump that lands without its libraries breaks every code location at import. The agent reads the workspace, writes one entry across all the uv directories with groups that match how Dagster and dbt version themselves, and shows from a dry run what the first week would look like before anyone turns the bot on.

The dry runs, the schema check and the notes about what the configuration cannot cover stay with the run and go into the pull request, so the review is about schedule and limits rather than a guess at what the bot will do. Several repositories can get a matching configuration at once, each with its own groups and ignores.

## Frequently asked questions

### Why group all the Dagster libraries together?

Because they are released in lockstep and a mismatched pair fails at import time. One grouped pull request per project moves `dagster` and every `dagster-*` library to the same release, which is also what `uv lock --upgrade` in the Makefile would do by hand.

### Does Dependabot understand uv workspaces and uv.lock?

Dependabot has a `uv` ecosystem that updates `pyproject.toml` and `uv.lock` together. Each project here has its own lockfile, so the configuration lists the directories rather than relying on the `dg.toml` workspace, which Dependabot does not read.

### What about the Docker base images?

The Dockerfiles use a `ghcr.io/astral-sh/uv` image tagged by Python version and Debian release, with no version number to bump, so the `docker` entry will not open anything for them. The pull request says so and suggests pinning a digest if the team wants those updates.

### Will the dbt packages file get updates?

No. Dependabot has no ecosystem for `packages.yml`, so `dbt_expectations` stays at the pinned version until someone runs `dbt deps` with a new constraint. The pull request names this as a gap rather than leaving it implied.

## More Dagster jobs

- [Set Up GitHub Actions CI for a Dagster Project](https://getrush.ai/run/add-github-actions-ci/dagster/)
- [Add Retry Policies to the Flaky Assets in a Dagster Project](https://getrush.ai/run/add-retry-policies/dagster/)
- [Add a Schedule to a Dagster Project](https://getrush.ai/run/add-schedules/dagster/)

## The same job on other stacks

- [Add Dependabot to a Docker Compose Repository](https://getrush.ai/run/add-dependabot/docker-compose/)
- [Add Dependabot to an Echo App](https://getrush.ai/run/add-dependabot/echo/)
- [Add Dependabot to an Elixir Library](https://getrush.ai/run/add-dependabot/elixir/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
