Skip to content

Fix Docker build: switch to uv and tighten dbt adapter lower bounds to >=1.8#2157

Merged
haritamar merged 3 commits intomasterfrom
devin/1773924292-dockerfile-uv-tighten-deps
Mar 19, 2026
Merged

Fix Docker build: switch to uv and tighten dbt adapter lower bounds to >=1.8#2157
haritamar merged 3 commits intomasterfrom
devin/1773924292-dockerfile-uv-tighten-deps

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Mar 19, 2026

Summary

The v0.23.0 Docker build fails with pip's resolution-too-deep error (failed job). pip 26.0.1 (installed via pip install --upgrade pip) includes a stricter resolution depth limit from resolvelib 1.1.0, and the [all] extra's 15 dbt adapters with wide version ranges (>=0.20) create a dependency graph too complex for the resolver.

Three changes to fix this:

  1. Dockerfile: Replace pip with uv for package installation, pinned to 0.10.11. uv's resolver handles complex dependency graphs without hitting depth limits. Both install steps are combined into a single RUN layer.

  2. pyproject.toml: Tighten lower bounds for dbt-core and all adapter extras from various old versions (>=0.20, >=1.4, >=1.5, etc.) to >=1.8. dbt versions before 1.8 are deprecated/EOL, and narrowing the version ranges reduces the resolver search space.

  3. pyproject.toml: Remove dbt-fabricspark from the all extra. There is no installable version of dbt-fabricspark>=1.8 — v1.9.0 has broken transitive deps (azure-keyvault-administration==4.4.0b2 and azure-batch==15.0.0b1 are pre-release pins that don't resolve), and v1.9.1 was yanked. The individual fabricspark extra is retained but excluded from [all] until the upstream package is fixed.

Updates since last revision

  • Pinned uv==0.10.11 (the version verified in the successful local build) via a UV_VERSION build arg for reproducibility
  • Merged the two RUN pip install uv / RUN uv pip install ... steps into a single layer to reduce image size
  • Removed dbt-fabricspark from the all extra (broken upstream — no installable version >=1.8)
  • Docker build verified locally — builds successfully in ~18s with pinned uv (vs. the 430s+ timeout with pip)
  • All 19 CI checks passing (14 warehouse tests + code-quality + others)

Review & Testing Checklist for Human

  • Confirm dbt <1.8 support drop is acceptable — this is a breaking change for anyone still on dbt 1.7 or earlier (applies to both pyproject.toml installs and the Docker image)
  • Trigger a multi-platform Docker build — the local build was verified on x86_64 only; the original failure was on a multi-platform workflow. Re-create the v0.23.0 tag and re-run the release workflow to confirm
  • Verify dbt-fabricspark removal from all is acceptable — the individual [fabricspark] extra still exists but will fail to install until the upstream package is fixed. Confirm this adapter can be temporarily excluded

Recommended test plan: After merging, re-create the v0.23.0 tag and re-run the release workflow to verify the Docker image builds and pushes successfully on all target platforms.

Notes

  • The base image (python:3.10.7) ships with pip 22.2.2 which is used to install uv itself — this is fine since it's a single-package install with no complex resolution.
  • uv is pinned via ARG UV_VERSION=0.10.11 so it can be bumped easily in future releases. The version can also be overridden at build time with --build-arg UV_VERSION=x.y.z.
  • The dbt-fabricspark upstream issue: v1.9.0 depends on azure-cli>=2.60.0, which requires pre-release versions of azure-keyvault-administration and azure-batch that don't resolve without --prerelease=allow. This is a packaging bug in dbt-fabricspark, not something we can fix here.

Link to Devin session: https://app.devin.ai/sessions/a67f519882744e45b279502a0fe54bde
Requested by: @haritamar


Open with Devin

Summary by CodeRabbit

  • Chores
    • Updated minimum dbt-core version requirement to 1.8; all dbt adapter dependencies now require version 1.8 or later.
    • Updated Docker build process to use an alternative package installer.

- Replace pip with uv in Dockerfile to avoid pip's resolution-too-deep error
- Bump dbt-core and all adapter lower bounds from >=0.20 to >=1.8 (pre-1.8 is EOL)

Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Contributor

👋 @devin-ai-integration[bot]
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in this pull request.

@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e19ab4d9-7ae0-496b-bd58-4088f8e8258e

📥 Commits

Reviewing files that changed from the base of the PR and between 0b36d5f and af89c1d.

📒 Files selected for processing (1)
  • Dockerfile
🚧 Files skipped from review as they are similar to previous changes (1)
  • Dockerfile

📝 Walkthrough

Walkthrough

Replaces Dockerfile's direct pip upgrade/install with installing a pinned uv (UV_VERSION=0.10.11) and running uv pip install --no-cache --system "/app[all]". Raises lower bounds for dbt-core and all optional dbt-* adapter dependencies from >=0.20 to >=1.8 (upper bounds remain <2.0.0).

Changes

Cohort / File(s) Summary
Docker Installation Mechanism
Dockerfile
Remove pip upgrade and direct pip install "/app[all]"; add UV_VERSION=0.10.11 build-arg, pip install --no-cache-dir "uv==${UV_VERSION}", then run uv pip install --no-cache --system "/app[all]".
Dependency Version Constraints
pyproject.toml
Increase lower bound for dbt-core and all dbt-* adapter optional deps from >=0.20 to >=1.8 (upper bounds unchanged at <2.0.0).

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Docker as Docker build
    participant Py as Python env
    participant UV as uv (tool)
    participant PyPI as PyPI

    Dev->>Docker: docker build (with UV_VERSION)
    Docker->>Py: create image base, install python deps
    Docker->>Py: pip install "uv==${UV_VERSION}"
    Py->>UV: uv available in environment
    Docker->>UV: uv pip install --no-cache --system "/app[all]"
    UV->>PyPI: fetch packages listed in `all` extras
    PyPI-->>UV: return packages
    UV-->>Py: install packages into system environment
    Docker-->>Dev: image built with dependencies installed
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nibble at builds both near and far,
Swapped pip for uv, a tiny star,
dbt climbed up a notch today,
I hop, I tweak, then bound away—
A happy thump, behold the jar! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the two main changes: switching Docker to use uv for package installation and tightening dbt adapter lower bounds to >=1.8, matching the core objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch devin/1773924292-dockerfile-uv-tighten-deps
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Dockerfile`:
- Around line 21-22: Pin the `uv` package to a tested, specific version and
merge the two RUN steps into a single Docker layer; replace the loose "RUN pip
install uv" with a pinned installation (e.g., `pip install
uv==<tested-version>`) and correct and combine the second command (the erroneous
`RUN uv pip install --no-cache --system "/app[all]"`) so both installs run in
one RUN instruction to keep builds reproducible and avoid the typo. Ensure you
update the RUN lines in the Dockerfile where "RUN pip install uv" and "RUN uv
pip install --no-cache --system \"/app[all]\"" appear.

In `@pyproject.toml`:
- Line 28: The pyproject.toml change narrows dbt-core and adapter version ranges
(the dbt-core entry and the adapter entries referenced at lines 48-62) to
>=1.8,<2.0.0 which breaks users on dbt 1.7 and below; restore the original broad
ranges in pyproject.toml (keep dbt-core >=0.20 and adapters >=1.4 as per project
convention) and instead enforce the >=1.8 floor only in the Docker build by
adding a separate constraints file (e.g., constraints-dbt18.txt) and using pip's
--constraint during the Docker build process so pip/Poetry installs remain
backward-compatible.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 608bcbb8-e35f-4707-aa46-a1744b6d56c3

📥 Commits

Reviewing files that changed from the base of the PR and between 2f98ef7 and 45d683d.

📒 Files selected for processing (2)
  • Dockerfile
  • pyproject.toml

Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

devin-ai-integration bot and others added 2 commits March 19, 2026 13:35
…e version >=1.8)

Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
@haritamar haritamar merged commit 1b8dec0 into master Mar 19, 2026
23 checks passed
@haritamar haritamar deleted the devin/1773924292-dockerfile-uv-tighten-deps branch March 19, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant