tls: Allow TLS flags to be reset#29312
Open
alloveras wants to merge 1 commit intobazelbuild:masterfrom
Open
Conversation
7b31180 to
3d389c1
Compare
Contributor
Author
|
The failed test seems to be a flake or somehow unrelated breakage to this change 🤔 ? I don't seem to have enough permissions to retry the failed step, so I am unsure how to proceed. I would appreciate some guidance 😉 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add a
NullableStringConverterto the options framework that maps an empty string tonulland wire it to the TLS flags--tls_certificate,--tls_client_certificate, and--tls_client_keyso that passing--<flag-name>=on the command line resets the flag to its unset state.Motivation
Flags with
defaultValue = "null"are correctlynullat startup, but there was no way to reset them back to unset from the command line (e.g. to override a.bazelrcsetting). Passing--tls_certificate=leaves the value as an empty string, which is then passed tonew File(""), causing a confusing error.Build API Changes
This PR affects the following command-line flags:
--tls_certificate--tls_client_certificate--tls_client_keyHas this been discussed in a design doc or issue? bazelbuild/bazel#4595
Is the change backward compatible? Any previously valid non-empty value continues to work exactly as before. Any empty string now correctly resets the flag to its default value as opposed to propagating the empty string value downstream, which, in some cases, turns out to be catastrophic.
If it's a breaking change, what is the migration plan? N/A.
Checklist
Release Notes
RELNOTES:
--tls_certificate=,--tls_client_certificate=, and--tls_client_key=can now be used to reset those flags to their unset state.