forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid bind-mounts for docker environments on macOS (pantsbuild#18225)
Bind mounts in Docker for macOS have been implemented in a variety of ways over time, and are still in flux (https://www.cncf.io/blog/2023/02/02/docker-on-macos-is-slow-and-how-to-fix-it/ is a good overview of the chaos). But the `gRPC FUSE` implementation which is the default in the most recently released version at the time of writing (`4.16.2`) can suffer from race conditions where files which are created on the host inside a bind mount may not be visible to the container. This causes issues like pantsbuild#18162. To avoid race conditions for file inputs, this change introduces a "pipe" IO strategy for Docker inputs, which uses a tar-pipe (from a tar-file stream written by the `Store`, to an `exec` of `tar` inside the container) to write process inputs. This strategy is used by default on macOS (for now), but the choice of strategy can be overridden. The `pipe` IO strategy is about 30% slower for test running than the `mount` strategy. As we gather feedback from macOS users, we should be able to gain a clearer picture of which Docker for macOS versions and filesystem implementations can safely use the `mount` strategy. Fixes pantsbuild#18162.
- Loading branch information
Showing
23 changed files
with
650 additions
and
219 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.