Skip to content

Commit

Permalink
Rename crate to avoid spamming the namespace
Browse files Browse the repository at this point in the history
Summary:
## This stack

Running the worker for all repos is causing OOMs; sharding should help.

## This diff

In hindsight, `client` is too generic; let's pick something specific.

Reviewed By: RajivTS

Differential Revision: D64393262

fbshipit-source-id: 45dc7b3d1379c23b8d06388191dd0fcb4748581b
  • Loading branch information
andreacampi authored and facebook-github-bot committed Oct 15, 2024
1 parent 864a734 commit 4a5820e
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion eden/mononoke/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ members = [
"acl_regions",
"admin",
"aliasverify",
"async_requests/client",
"async_requests/async_requests_client",
"async_requests/if",
"async_requests/if/clients",
"async_requests/if/mocks",
Expand Down
6 changes: 3 additions & 3 deletions eden/mononoke/async_requests/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ rust_library(
)

rust_library(
name = "client",
srcs = glob(["client/src/**/*.rs"]),
autocargo = {"cargo_toml_dir": "client"},
name = "async_requests_client",
srcs = glob(["async_requests_client/src/**/*.rs"]),
autocargo = {"cargo_toml_dir": "async_requests_client"},
deps = [
"fbsource//third-party/rust:anyhow",
"fbsource//third-party/rust:slog",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @generated by autocargo from //eden/mononoke/async_requests:client
# @generated by autocargo from //eden/mononoke/async_requests:async_requests_client

[package]
name = "client"
name = "async_requests_client"
version = "0.1.0"
authors = ["Facebook"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/async_requests/worker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ anyhow = "1.0.86"
async-stream = "0.3"
async-trait = "0.1.71"
async_requests = { version = "0.1.0", path = "../lib" }
async_requests_client = { version = "0.1.0", path = "../async_requests_client" }
async_requests_types_thrift = { version = "0.1.0", path = "../if" }
clap = { version = "4.5.20", features = ["derive", "env", "string", "unicode", "wrap_help"] }
client = { version = "0.1.0", path = "../client" }
cloned = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
cmdlib_logging = { version = "0.1.0", path = "../../cmdlib/log" }
context = { version = "0.1.0", path = "../../server/context" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/async_requests/worker/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ rust_binary(
"//common/rust/shed/hostname:hostname",
"//common/rust/shed/stats:stats",
"//eden/mononoke/async_requests:async_requests",
"//eden/mononoke/async_requests:client",
"//eden/mononoke/async_requests:async_requests_client",
"//eden/mononoke/async_requests/if:async_requests_types-thrift-rust",
"//eden/mononoke/blobstore:ephemeral_blobstore",
"//eden/mononoke/cmdlib:cmdlib_logging",
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/async_requests/worker/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ use async_requests::AsyncMethodRequestQueue;
use async_requests::AsyncRequestsError;
use async_requests::ClaimedBy;
use async_requests::RequestId;
use async_requests_client::AsyncRequestsQueue;
use async_stream::try_stream;
use async_trait::async_trait;
use client::AsyncRequestsQueue;
use cloned::cloned;
use context::CoreContext;
use executor_lib::RepoShardedProcessExecutor;
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/scs/scs_methods/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ rust_library(
"//common/rust/srserver:srserver",
"//configerator/structs/common/fbtype:fbtypes-rust",
"//eden/mononoke/async_requests:async_requests",
"//eden/mononoke/async_requests:client",
"//eden/mononoke/async_requests:async_requests_client",
"//eden/mononoke/blobstore:ephemeral_blobstore",
"//eden/mononoke/bookmarks:bookmarks",
"//eden/mononoke/bookmarks:bookmarks_movement",
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/scs/scs_methods/src/async_requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use async_requests::types::Request;
use async_requests::types::ThriftParams;
use async_requests::types::Token;
use async_requests::AsyncMethodRequestQueue;
use client::AsyncRequestsQueue;
use async_requests_client::AsyncRequestsQueue;
use context::CoreContext;
use mononoke_api::RepositoryId;

Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/scs/scs_methods/src/source_control_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::num::NonZeroU64;
use std::pin::Pin;
use std::sync::Arc;

use client::AsyncRequestsQueue;
use async_requests_client::AsyncRequestsQueue;
use clientinfo::ClientEntryPoint;
use clientinfo::ClientInfo;
use clientinfo::CLIENT_INFO_HEADER;
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/scs/scs_server/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rust_binary(
"//common/rust/shed/fbinit:fbinit",
"//common/rust/shed/panichandler:panichandler",
"//common/rust/srserver:srserver",
"//eden/mononoke/async_requests:client",
"//eden/mononoke/async_requests:async_requests_client",
"//eden/mononoke/cmdlib:cmdlib_logging",
"//eden/mononoke/cmdlib:environment",
"//eden/mononoke/cmdlib/mononoke_app:mononoke_app",
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/scs/scs_server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ use std::sync::Arc;

use anyhow::Context;
use anyhow::Error;
use async_requests_client::AsyncRequestsQueue;
use async_trait::async_trait;
use clap::Parser;
use clap::ValueEnum;
use client::AsyncRequestsQueue;
use clientinfo::ClientEntryPoint;
use cloned::cloned;
use cmdlib_logging::ScribeLoggingArgs;
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/tools/admin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ license = "GPLv2+"
anyhow = "1.0.86"
async-stream = "0.3"
async_requests = { version = "0.1.0", path = "../../async_requests/lib" }
async_requests_client = { version = "0.1.0", path = "../../async_requests/async_requests_client" }
backsyncer = { version = "0.1.0", path = "../../commit_rewriting/backsyncer" }
blobstore = { version = "0.1.0", path = "../../blobstore" }
blobstore_factory = { version = "0.1.0", path = "../../blobstore/factory" }
Expand All @@ -35,7 +36,6 @@ changesets_creation = { version = "0.1.0", path = "../../changesets/changesets_c
changesets_uploader = { version = "0.1.0", path = "../../cas_client/changesets_uploader" }
chrono = { version = "0.4", features = ["clock", "serde", "std"], default-features = false }
clap = { version = "4.5.20", features = ["derive", "env", "string", "unicode", "wrap_help"] }
client = { version = "0.1.0", path = "../../async_requests/client" }
cloned = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
cmdlib_cross_repo = { version = "0.1.0", path = "../../cmdlib/cross_repo" }
cmdlib_displaying = { version = "0.1.0", path = "../../cmdlib/displaying" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/tools/admin/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ rust_binary(
"//common/rust/shed/fbinit:fbinit",
"//common/rust/shed/futures_stats:futures_stats",
"//eden/mononoke/async_requests:async_requests",
"//eden/mononoke/async_requests:client",
"//eden/mononoke/async_requests:async_requests_client",
"//eden/mononoke/blobrepo:repo_blobstore",
"//eden/mononoke/blobstore:blobstore",
"//eden/mononoke/blobstore:cacheblob",
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/tools/admin/src/commands/async_requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ use std::sync::Arc;

use anyhow::Context;
use anyhow::Result;
use async_requests_client::AsyncRequestsQueue;
use clap::Parser;
use clap::Subcommand;
use client::AsyncRequestsQueue;
use context::SessionContainer;
use mononoke_api::Repo;
use mononoke_app::args::RepoArgs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use anyhow::Result;
use async_requests::types::AsynchronousRequestResult;
use async_requests::types::RowId;
use async_requests::types::ThriftAsynchronousRequestParams;
use async_requests_client::AsyncRequestsQueue;
use clap::Args;
use client::AsyncRequestsQueue;
use context::CoreContext;
use megarepo_error::MegarepoError;
use mononoke_api::MononokeRepo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use anyhow::Context;
use anyhow::Error;
use anyhow::Result;
use async_requests::types::ThriftAsynchronousRequestParams;
use async_requests_client::AsyncRequestsQueue;
use clap::Args;
use client::AsyncRequestsQueue;
use context::CoreContext;
use mononoke_api::MononokeRepo;
use mononoke_types::ChangesetId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use anyhow::Context;
use anyhow::Error;
use anyhow::Result;
use async_requests::types::RowId;
use async_requests_client::AsyncRequestsQueue;
use clap::Args;
use client::AsyncRequestsQueue;
use context::CoreContext;
use mononoke_api::MononokeRepo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use async_requests::types::RowId;
use async_requests::types::ThriftAsynchronousRequestParams;
use async_requests::types::ThriftAsynchronousRequestResult;
use async_requests::types::ThriftMegarepoSyncChangesetResult;
use async_requests_client::AsyncRequestsQueue;
use clap::Args;
use client::AsyncRequestsQueue;
use context::CoreContext;
use mononoke_api::Mononoke;
use mononoke_api::MononokeRepo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use async_requests::types::ThriftMegarepoSyncChangesetParams;
use async_requests::types::ThriftParams;
use async_requests::types::Token;
use async_requests::AsyncMethodRequestQueue;
use async_requests_client::AsyncRequestsQueue;
use clap::Args;
use client::AsyncRequestsQueue;
use context::CoreContext;
use mononoke_api::MononokeRepo;
use mononoke_api::Repo;
Expand Down

0 comments on commit 4a5820e

Please sign in to comment.