• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 37416
0%
main: 79%

Build:
Build:
LAST BUILD BRANCH: cbs/scope-find-links
DEFAULT BRANCH: main
Ran 01 Feb 2021 09:30PM UTC
Jobs 1
Files 411
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
37416

push

travis-ci-com

web-flow
Add `--remote-auth-plugin` (#11503)

### Problem

Currently, remote caching/execution users can set authentication headers two ways:

1. Hardcoding via `--remote-store-headers` and `--remote-execution-headers`.
2. Storing in a file and using `--remote-oauth-bearer-token-path` and having Pants auto-set the relevant header.

However, this does not work for more complex cases where the headers should be dynamically set, such as wanting to make a network request to get an auth token, or consuming Pants options to determine the behavior. While users could write scripts to get the token and set it via env var, that does not scale very well and we want to provide a more robust first-class solution to dynamically setting auth headers.

### Solution

Add a simple plugin hook that allows users to write a function that does any arbitrary logic necessary and returns a standardized `AuthPluginResult` object. This will get called at the start of every Pants run.

Note that this plugin cannot use the Rules API, as it is used to determine the options that are used to initialize the Rust CommandRunner and Store. (Chicken and egg problem). Given this, the plugin runs pre-memoization so we do not need to worry about caching semantics here.

One expected user of this feature (Toolchain) needs the ability to consume arbitrary subsystems, so we rewire some things to pass an `Options` object to the `ExecutionOptions` constructor.

0 of 28557 relevant lines covered (0.0%)

0.0 hits per line

Jobs
ID Job ID Ran Files Coverage
5 37416.5 (PANTS_CONFIG_FILES="${TRAVIS_BUILD_DIR}/pants.travis-ci.toml" PANTS_DYNAMIC_UI=false LC_ALL="en_US.UTF-8" AWS_BUCKET=ci-public.pantsbuild.org BOOTSTRAPPED_PEX_KEY_PREFIX=daily/${TRAVIS_BUILD_NUMBER}/${TRAVIS_BUILD_ID}/pants.pex NATIVE_ENGINE_SO_KEY_PREFIX=monthly/native_engine_so MACOS_PYENV_PY27_VERSION=2.7.18 MACOS_PYENV_PY37_VERSION=3.7.7 MACOS_PYENV_PY38_VERSION=3.8.3 PYENV_ROOT_OSX=${HOME}/.pants_pyenv PYENV_ROOT="${PYENV_ROOT:-${PYENV_ROOT_OSX}}" PATH="${PYENV_ROOT}/shims:${PATH}" AWS_CLI_ROOT="${HOME}/.aws_cli" AWS_ACCESS_KEY_ID__TO_BE_REEXPORTED_ON_DEPLOYS=AKIAV6A6G7RQ2HFZ5KP7 AWS_SECRET_ACCESS_KEY=[secure] RUST_BACKTRACE="all" PANTS_REMOTE_CA_CERTS_PATH=/etc/ssl/certs/ca-certificates.crt BOOTSTRAPPED_PEX_KEY_SUFFIX=py37.linux CACHE_NAME=python_tests.py37) 01 Feb 2021 09:30PM UTC 0
0.0
Travis Job 37416.5
Source Files on build 37416
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #37416
  • 24471ac2 on github
  • Prev Build on master (#37415)
  • Next Build on master (#37428)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc