Skip to content

Comments

buck2: don't add tls_config when URI does not call for it#174

Closed
krallin wants to merge 1 commit intofacebook:mainfrom
krallin:no-tls-uri
Closed

buck2: don't add tls_config when URI does not call for it#174
krallin wants to merge 1 commit intofacebook:mainfrom
krallin:no-tls-uri

Conversation

@krallin
Copy link
Contributor

@krallin krallin commented Apr 17, 2023

Summary:

Like it says in the title. Right now Tonic will try to connect using TLS if you pass tls_config even if the URI clearly does not call for it.

See: #156

Test Plan:

We have tests internally for the HTTPS case. The non-HTTPS scenario is unfortunately one for which we lack test coverage right now, but let's at least unbreak this to start.

I did test that this works locally with non-TLS Build Barn.

Summary:

Like it says in the title. Right now Tonic will try to
connect using TLS if you pass `tls_config` even if
the URI clearly does not call for it.

See: facebook#156

Test Plan:

We have tests internally for the HTTPS case. The non-HTTPS scenario is
unfortunately one for which we lack test coverage right now, but let's
at least unbreak this to start.

I did test that this works locally with non-TLS Build Barn.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 17, 2023
@krallin krallin changed the title buck2: don't add tls_config when URI does not request TLS buck2: don't add tls_config when URI does not call for it Apr 17, 2023
@facebook-github-bot
Copy link
Contributor

@krallin has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@stagnation
Copy link
Contributor

stagnation commented Apr 18, 2023

Thank you :) I was waiting for this to push my example of a BuildBarn configuration. With notes about how to use the bb-deployments repository. And some caveats about the not-yet plumbed instance name prefix. I'll rebase onto your example and submit a diff, with mostly documentation, for you to review.

@krallin
Copy link
Contributor Author

krallin commented Apr 18, 2023 via email

@stagnation
Copy link
Contributor

Yeah I saw that :) it's great to have an Buildbarn example: here is the documentation PR: #179

benbrittain pushed a commit to benbrittain/buck2 that referenced this pull request Apr 23, 2023
Summary:
Like it says in the title. Right now Tonic will try to connect using TLS if you pass `tls_config` even if the URI clearly does not call for it.

None of this is actually consistent with the GPRC naming spec, so let's just ban URIs that look like HTTP / HTTPS URIs, and then
use a dedicated field for TLS / no TLS.

See: facebook#156

Pull Request resolved: facebook#174

Test Plan:
We have tests internally for the HTTPS case. The non-HTTPS scenario is unfortunately one for which we lack test coverage right now, but let's at least unbreak this to start.

I did test that this works locally with non-TLS Build Barn.

Reviewed By: ndmitchell, themarwhal

Differential Revision: D45054439

Pulled By: krallin

fbshipit-source-id: fe0c1e1d287c462e568527590ffa812e7fb281c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants