Repository navigation
Fix Breeze ownership fix-up chowning all sources under rootless Docker - #73606
Merged
Merged
Conversation
dabla
requested review from
amoghrajesh,
ashb,
bugraoz93,
choo121600,
ephraimbuddy,
gopidesupavan,
jason810496,
jedcunningham,
jscheffl,
potiuk and
vatsrahul1001
as code owners
September 23, 2026 10:38
Breeze skips the ownership fix-up when Docker runs in rootless mode, because container root already maps to the host user. The flag however reached the in-container script as the Python literal "True" while the script only skips on lowercase "true", so the skip never applied: every file that looked root-owned inside the container (all of the host user's files) was chowned to the mapped user id and ended up owned by a subordinate uid on the host, leaving the checkout unusable after each `breeze run` or hook that uses it.
dabla
force-pushed
the
fix/breeze-rootless-fix-ownership
branch
from
September 23, 2026 12:23
9d54b70 to
3161ede
Compare
Contributor
|
Thanks for the patch! LGTM. |
Eason09053360
approved these changes
Sep 23, 2026
Contributor
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
potiuk
pushed a commit
that referenced
this pull request
Sep 23, 2026
…otless Docker (#73606) (#73641) Breeze skips the ownership fix-up when Docker runs in rootless mode, because container root already maps to the host user. The flag however reached the in-container script as the Python literal "True" while the script only skips on lowercase "true", so the skip never applied: every file that looked root-owned inside the container (all of the host user's files) was chowned to the mapped user id and ended up owned by a subordinate uid on the host, leaving the checkout unusable after each `breeze run` or hook that uses it. (cherry picked from commit ababf5c) Co-authored-by: David Blain <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breeze already knows how to deal with rootless Docker (ADR 15): when the container's root maps back to the host user there is nothing to fix, so
scripts/in_container/run_fix_ownership.pyis meant to exit early whenDOCKER_IS_ROOTLESSis set.The value never matched.
fix_ownership_using_docker()formats the Python bool straight into the-eargument, so the container receivedDOCKER_IS_ROOTLESS=True, while the script only skips on the lowercase stringtrue. TheVERBOSEvariable right above it is lowercased; this one was not. Thebreeze shellentry path is unaffected becauseShellParams._set_varlowercases booleans.The consequence under rootless Docker (here: Docker Engine 29 rootless on WSL2) is the opposite of the intent. Inside the container every file owned by the host user looks root-owned, so the script chowns the whole mounted checkout to the mapped uid, which lands on a subordinate uid on the host (100999 for uid 1000). Git then refuses the repository as dubiously owned, prek can no longer read the files, and a uv cache hardlinked into the checkout's
.venvchanges owner as well. This happens after everybreeze runand therefore after every prek hook that goes through Breeze, such ascheck-provider-yaml-valid.Reproduction with the unmodified script in a scratch directory, with
HOST_USER_ID=1000and a plainpython:3.12-slimimage:DOCKER_IS_ROOTLESSTruetrueChanges:
fix_ownership_using_docker(), matchingVERBOSE.-eargument for both rootless states. It fails on the previous code.Checks executed: the new test in
dev/breeze/tests/test_docker_command_utils.py(2 passed, both fail without the fix), the reproduction above against the patched script (True,trueandfalsenow behave as intended), andprek run --fileson the three changed files (all hooks passed, including mypy).Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5.1) following the guidelines