-
-
Notifications
You must be signed in to change notification settings - Fork 646
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_oauth_bearer_token
option, deprecating remote_oauth_bearer_token_path
#20116
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, no major complaints from my side! A bit messy with the temporary dict to check for which variants are enabled, but I think it's mostly the variable name lengths that cause that due to the extra line breaks + casting.
I'm gonna get this in. It'll be in 2.20 (~12 weeks away, at least?), so lots of time to undo if I've got something wonky here. |
…n=partial (#20616) There were three deprecations originally scheduled for 2.21 (#20609), two of will have only been deprecated for one release, and aren't a significant burden to support, so we can ease users life for a little longer: | description | deprecation started in | what could be removed | |------------------------------------------------------|------------------------|-------------------------------------------------------------------------------------------------| | the `[GLOBAL].remote_oauth_bearer_token_path` option | 2.20.0.dev1 (#20116) | configuration for the option, plus some a few small `if` statements, all in `global_options.py` | | passing `crossversion="partial"` for scala artifacts | 2.20.0 (#20264) ^ | an extra enum variant, and a test | ^ NB. due to an easy-to-make misuse of `start_version` I believe people will only be getting the deprecation warnings in 2.20.0 stable, not any of the release candidates. The third (`python_awslambda`) is removed in #20619.
…n=partial (#20616) There were three deprecations originally scheduled for 2.21 (#20609), two of will have only been deprecated for one release, and aren't a significant burden to support, so we can ease users life for a little longer: | description | deprecation started in | what could be removed | |------------------------------------------------------|------------------------|-------------------------------------------------------------------------------------------------| | the `[GLOBAL].remote_oauth_bearer_token_path` option | 2.20.0.dev1 (#20116) | configuration for the option, plus some a few small `if` statements, all in `global_options.py` | | passing `crossversion="partial"` for scala artifacts | 2.20.0 (#20264) ^ | an extra enum variant, and a test | ^ NB. due to an easy-to-make misuse of `start_version` I believe people will only be getting the deprecation warnings in 2.20.0 stable, not any of the release candidates. The third (`python_awslambda`) is removed in #20619.
…n=partial (Cherry-pick of #20616) (#20623) There were three deprecations originally scheduled for 2.21 (#20609), two of will have only been deprecated for one release, and aren't a significant burden to support, so we can ease users life for a little longer: | description | deprecation started in | what could be removed | |------------------------------------------------------|------------------------|-------------------------------------------------------------------------------------------------| | the `[GLOBAL].remote_oauth_bearer_token_path` option | 2.20.0.dev1 (#20116) | configuration for the option, plus some a few small `if` statements, all in `global_options.py` | | passing `crossversion="partial"` for scala artifacts | 2.20.0 (#20264) ^ | an extra enum variant, and a test | ^ NB. due to an easy-to-make misuse of `start_version` I believe people will only be getting the deprecation warnings in 2.20.0 stable, not any of the release candidates The third (`python_awslambda`) is removed in #20619. Co-authored-by: Huon Wilson <huon@exoflare.io>
This adds a new global option
remote_oauth_bearer_token
, that allows setting the remote store OAuth token directly. This is easier to work with in CI contexts (and similar), where setting an environment variable is often quite simple, and having a direct option allows setting this viaPANTS_REMOTE_OAUTH_BEARER_TOKEN
.For instance, it simplifies how one can configure the token for the GitHub Actions Cache remote cache provider.
I believe this replaces
remote_oauth_bearer_token_path
fully: I thinkremote_oauth_bearer_token_path = "/path/to/token.txt"
can becomeremote_oauth_bearer_token = "@/path/to/token.txt"
. Thus, I have deprecated the..._path
option, for removal in a couple of versions.(This is part of #19902.)