Skip to content

Commit

Permalink
Remove cert validity check on daemon connection
Browse files Browse the repository at this point in the history
Summary: This change has been in for almost 2 months now and didn't get a single hit https://fburl.com/scuba/buck2_builds/8ljtd8j3. If I'm not mistaken, certs are not required for client to make a connection with the daemon. It's more likely that daemon initialization would fail due to certs but even then the connection itself would succeed

Reviewed By: JakobDegen

Differential Revision: D60941721

fbshipit-source-id: 38f5d9153a6ca67c01f0e31e512707dfb8f8f9c5
  • Loading branch information
Will-MingLun-Li authored and facebook-github-bot committed Aug 16, 2024
1 parent a816cf5 commit c785bfe
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/buck2_client_ctx/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ rust_library(
"fbsource//third-party/rust:tonic",
"fbsource//third-party/rust:tracing",
"//buck2/app/buck2_build_info:buck2_build_info",
"//buck2/app/buck2_certs:buck2_certs",
"//buck2/app/buck2_cli_proto:buck2_cli_proto",
"//buck2/app/buck2_common:buck2_common",
"//buck2/app/buck2_core:buck2_core",
Expand Down
1 change: 0 additions & 1 deletion app/buck2_client_ctx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ superconsole = { version = "0.2.0", path = "../../superconsole" }

# Please do not add dependency on `buck2_build_api`.
buck2_build_info = { workspace = true }
buck2_certs = { workspace = true }
buck2_cli_proto = { workspace = true }
buck2_common = { workspace = true }
buck2_core = { workspace = true }
Expand Down
3 changes: 0 additions & 3 deletions app/buck2_client_ctx/src/daemon/client/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use std::path::PathBuf;
use std::time::Duration;

use anyhow::Context;
use buck2_certs::validate::validate_certs;
use buck2_cli_proto::daemon_api_client::DaemonApiClient;
use buck2_cli_proto::DaemonProcessInfo;
use buck2_common::buckd_connection::ConnectionType;
Expand Down Expand Up @@ -632,14 +631,12 @@ impl<'a> BuckdConnectOptions<'a> {
mut self,
paths: &InvocationPaths,
) -> anyhow::Result<BuckdClientConnector<'a>> {
let handle = tokio::spawn(validate_certs());
match BootstrapBuckdClient::connect(paths, self.constraints, &mut self.subscribers)
.await
.map_err(buck2_error::Error::from)
{
Ok(client) => Ok(client.with_subscribers(self.subscribers)),
Err(e) => {
handle.await.unwrap().context("Daemon Failed to Connect")?;
self.subscribers.handle_daemon_connection_failure(&e);
Err(e.into())
}
Expand Down

0 comments on commit c785bfe

Please sign in to comment.