Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --docker-execution option #17049

Merged
merged 2 commits into from
Sep 28, 2022

Conversation

Eric-Arellano
Copy link
Contributor

@Eric-Arellano Eric-Arellano commented Sep 28, 2022

This gives more flexibility to likely user stories, such as wanting to use Docker in CI but not locally, or vice versa.

Before, the sole way to turn off Docker was on Linux that you used a different platform for the Docker image than the local host. That condition is not possible on macOS, so there was no way to disable Docker there.

[ci skip-rust]
[ci skip-build-wheels]

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@Eric-Arellano Eric-Arellano added the category:internal CI, fixes for not-yet-released features, etc. label Sep 28, 2022
Copy link
Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Thanks!

Note that this intentionally is not a bootstrap option. The benefit of it being a bootstrap option is we would avoid creating the Docker command runner when not necessary. But because the Docker command runner is safe to create and lazily connects to Docker, that is fine. By avoiding a bootstrap option, we avoid needing to restart Pantsd, which is desirable.

To be clear: in global_options.py, only daemon=True options trigger "restarts" of pantsd. Options which are fingerprint=True (the default: disabled via fingerprint=False for some options) will trigger a scheduler re-initialization without restarting.

src/python/pants/core/util_rules/environments.py Outdated Show resolved Hide resolved
Co-authored-by: Stu Hood <stuhood@gmail.com>
@Eric-Arellano Eric-Arellano enabled auto-merge (squash) September 28, 2022 22:56
@Eric-Arellano Eric-Arellano merged commit d8380aa into pantsbuild:main Sep 28, 2022
@Eric-Arellano Eric-Arellano deleted the docker-global-option branch September 28, 2022 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:internal CI, fixes for not-yet-released features, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants