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 --remote-store-headers and fix --remote-execution-headers to not impact remote caching #11501

Merged
merged 4 commits into from Jan 28, 2021

Conversation

Eric-Arellano
Copy link
Contributor

Previously, we only had --remote-execution-headers. We weren't applying those to the store setup, and we were incorrectly applying them to the remote cache setup.

We considered instead consolidating to only have --remote-headers, which applies to both contexts. However, prior art from Bazel shows that it's useful to have service-specific options and we avoid a deprecation warning this way. We could add both --remote-headers and --remote-store-headers, but that's not done here for simplicity. We can add --remote-headers in the future, if necessary.

This PR also refactors to convert the --remote-oauth-bearer-token-path into the relevant header in Python, before crossing the FFI boundary. This simplifies our Rust code so that it simply gets a dictionary of headers. All header injection now happens in Python, which will facilitate adding a plugin hook to dynamically set these headers.

…ote cache runner

This fixes the remote cache runner to no longer use --remote-execution-headers, which was a misnomer. While this is a breaking API change, its semantics were never documented and this is an alpha API.
# 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 changed the title Add --remote-store-headers Add --remote-store-headers (and fix --remote-execution-headers to not impact remote caching) Jan 27, 2021
@Eric-Arellano Eric-Arellano changed the title Add --remote-store-headers (and fix --remote-execution-headers to not impact remote caching) Add --remote-store-headers and fix --remote-execution-headers to not impact remote caching Jan 27, 2021
Copy link
Contributor

@tdyas tdyas left a comment

Choose a reason for hiding this comment

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

lgtm

@Eric-Arellano Eric-Arellano merged commit 2a5346e into pantsbuild:master Jan 28, 2021
@Eric-Arellano Eric-Arellano deleted the store-headers branch January 28, 2021 03:18
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.

None yet

3 participants