Skip to content

Comments

Add documentation for intermediate Docker layers in a workspace#16787

Merged
zanieb merged 2 commits intomainfrom
zb/docker-workspace
Nov 24, 2025
Merged

Add documentation for intermediate Docker layers in a workspace#16787
zanieb merged 2 commits intomainfrom
zb/docker-workspace

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Nov 20, 2025

No description provided.

@zanieb zanieb added the documentation Improvements or additions to documentation label Nov 20, 2025
@zanieb zanieb changed the title Add documentation for intermediate layers with a workspace Add documentation for intermediate Docker layers in a workspace Nov 20, 2025
@zanieb zanieb requested a review from charliermarsh November 20, 2025 17:28
ADD . /app

RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked
Copy link
Member

Choose a reason for hiding this comment

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

I think I would recommend --frozen here, isn't it much simpler? That's what we tend to do in our own Dockerfiles.

Copy link
Member Author

Choose a reason for hiding this comment

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

In what sense? --frozen here doesn't change anything because the whole workspace has been added already, it'd be up above where using --frozen instead of --locked makes things simpler.

I don't think we should recommend --frozen in general though, because I think --locked asserting that your uv.lock is not stale is meaningful and helpful.

I think it's fine to recommend --frozen above and rely on this subsequent --locked to catch a stale lock, but I worry that will also be confusing to people (i.e., I recommended exactly this in the issue and the user opted to do the additional mounts instead)

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I meant to comment on the line above. I personally find it unnecessary to enumerate all of the pyproject.toml files in the uv sync --no-install-workspace when you're doing a locked install here anyway? (But -- again personally -- I wouldn't use --locked in a Dockerfile, I think that validation should be done in CI.)

In pyx at least, we instead use --frozen for this install phase, but enumerate all the workspace members when we do the ADD (to minimize invalidation).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah... I'll change it.

@zhcn000000
Copy link

If I need to install all the packages for a specific workspace, how should I handle it? If I directly use uv sync --package, will the packages in the project root directory be ignored

@zanieb
Copy link
Member Author

zanieb commented Nov 24, 2025

Yeah, use --package.

@zanieb zanieb enabled auto-merge (squash) November 24, 2025 15:09
@zanieb zanieb temporarily deployed to uv-test-registries November 24, 2025 15:12 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-publish November 24, 2025 15:13 — with GitHub Actions Inactive
@zanieb zanieb merged commit 666059b into main Nov 24, 2025
101 checks passed
@zanieb zanieb deleted the zb/docker-workspace branch November 24, 2025 15:22
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 24, 2025

CodSpeed Performance Report

Merging #16787 will degrade performances by 19.45%

Comparing zb/docker-workspace (29fc564) with main (d6eb285)

Summary

❌ 1 regression
✅ 5 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Mode Benchmark BASE HEAD Change
Simulation resolve_warm_airflow 808.3 ms 1,003.6 ms -19.45%

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 27, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.9.11` -> `0.9.13` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.9.13`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0913)

[Compare Source](astral-sh/uv@0.9.12...0.9.13)

Released on 2025-11-26.

##### Bug fixes

- Revert "Allow `--with-requirements` to load extensionless inline-metadata scripts" to fix reading of requirements files from streams ([#&#8203;16861](astral-sh/uv#16861))
- Validate URL wheel tags against `Requires-Python` and required environments ([#&#8203;16824](astral-sh/uv#16824))

##### Documentation

- Drop unpublished crates from the uv crates.io README ([#&#8203;16847](astral-sh/uv#16847))
- Fix the links to uv in crates.io member READMEs ([#&#8203;16848](astral-sh/uv#16848))

### [`v0.9.12`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0912)

[Compare Source](astral-sh/uv@0.9.11...0.9.12)

Released on 2025-11-24.

##### Enhancements

- Allow `--with-requirements` to load extensionless inline-metadata scripts ([#&#8203;16744](astral-sh/uv#16744))
- Collect and upload PEP 740 attestations during `uv publish` ([#&#8203;16731](astral-sh/uv#16731))
- Prevent `uv export` from overwriting `pyproject.toml` ([#&#8203;16745](astral-sh/uv#16745))

##### Documentation

- Add a crates.io README for uv ([#&#8203;16809](astral-sh/uv#16809))
- Add documentation for intermediate Docker layers in a workspace ([#&#8203;16787](astral-sh/uv#16787))
- Enumerate workspace members in the uv crate README ([#&#8203;16811](astral-sh/uv#16811))
- Fix documentation links for crates ([#&#8203;16801](astral-sh/uv#16801))
- Generate a crates.io README for uv workspace members ([#&#8203;16812](astral-sh/uv#16812))
- Move the "Export" guide to the projects concept section ([#&#8203;16835](astral-sh/uv#16835))
- Update the cargo install recommendation to use crates ([#&#8203;16800](astral-sh/uv#16800))
- Use the word "internal" in crate descriptions ([#&#8203;16810](astral-sh/uv#16810))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xOS43IiwidXBkYXRlZEluVmVyIjoiNDIuMjEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants