Skip to content

Commit

Permalink
Update/cleanup/consolidate dependencies (#1338)
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-ivanov-name authored Jun 13, 2024
1 parent cd6dc20 commit 301c8fd
Show file tree
Hide file tree
Showing 8 changed files with 259 additions and 322 deletions.
476 changes: 204 additions & 272 deletions Cargo.lock

Large diffs are not rendered by default.

36 changes: 19 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,34 @@ opt-level = 3
codegen-units = 1

[workspace.dependencies]
defer = "0.1.0"
env_logger = "0.10.0"
futures = "0.3.28"
base64 = "0.21.7"
defer = "0.2.1"
env_logger = "0.11.3"
futures = "0.3.30"
gix = { version = "0.63.0", default-features = false }
hyper-reverse-proxy = "0.5.1"
lazy_static = "1.4.0"
libc = "0.2.148"
regex = "1.9.5"
rs_tracing= { version = "1.1.0", features = ["rs_tracing"] }
serde = { version = "1.0.188", features = ["std", "derive"] }
serde_json = "1.0.107"
serde_yaml = "0.9.25"
toml = "0.8.1"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
libc = "0.2.155"
regex = "1.10.4"
rs_tracing = { version = "1.1.0", features = ["rs_tracing"] }
serde = { version = "1.0.203", features = ["std", "derive"] }
serde_json = "1.0.117"
serde_yaml = "0.9.33"
toml = "0.8.13"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tempfile = "3.10.1"

[workspace.dependencies.git2]
default-features = false
version = "0.18.1"
version = "0.18.3"

[workspace.dependencies.juniper]
version = "0.15.11"
default-features = false
features = ["expose-test-schema"]

[workspace.dependencies.tokio]
version = "1.32.0"
version = "1.38.0"
features = [
"fs",
"rt-multi-thread",
Expand All @@ -54,19 +56,19 @@ features = [
]

[workspace.dependencies.tokio-util]
version = "0.7.9"
version = "0.7.11"
features = ["compat"]

[workspace.dependencies.reqwest]
version = "0.11.20"
version = "0.11.26"
default-features = false
features = ["blocking", "json"]

[workspace.dependencies.tracing]
version = "0.1.37"
version = "0.1.40"
features = ["max_level_trace", "release_max_level_trace"]

[workspace.dependencies.clap]
version = "4.4.6"
version = "4.5.4"
features = ["derive", "help", "std", "usage"]
default-features = false
6 changes: 3 additions & 3 deletions hyper_cgi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ readme = "README.md"
futures = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
hyper = { version = "0.14.27", features = ["stream", "tcp", "server", "http1"] }
hyper = { version = "0.14.28", features = ["stream", "tcp", "server", "http1"] }

clap = { version = "4.4.6", optional = true }
base64 = { version = "0.21.4", optional = true }
clap = { workspace = true, optional = true }
base64 = { workspace = true, optional = true }
rand = { version = "0.8.5", optional = true, features = ["std"] }
lazy_static = { version = "1.4.0", optional = true }
hyper-reverse-proxy = { workspace = true }
Expand Down
22 changes: 11 additions & 11 deletions josh-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ readme = "README.md"
edition = "2021"

[dependencies]
backtrace = "0.3.69"
backtrace = "0.3.72"
bitvec = "1.0.1"
git-version = "0.3.5"
git-version = "0.3.9"
git2 = { workspace = true }
glob = "0.3.1"
handlebars = "5.1.1"
handlebars = "5.1.2"
hex = "0.4.3"
indoc = "2.0.4"
itertools = "0.11.0"
indoc = "2.0.5"
itertools = "0.13.0"
lazy_static = { workspace = true }
log = "0.4.20"
percent-encoding = "2.3.0"
pest = "2.7.4"
pest_derive = "2.7.4"
rayon = "1.8.0"
log = "0.4.21"
percent-encoding = "2.3.1"
pest = "2.7.10"
pest_derive = "2.7.10"
rayon = "1.10.0"
regex = { workspace = true }
rs_tracing = { workspace = true }
serde = { workspace = true }
Expand All @@ -40,4 +40,4 @@ form_urlencoded = "1.2.1"
[dependencies.chrono]
default-features = false
features = ["alloc", "std"]
version = "0.4.31"
version = "0.4.38"
5 changes: 3 additions & 2 deletions josh-core/src/graphql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ impl Revision {

let ts = filter_commit.time().seconds();

let ndt = chrono::NaiveDateTime::from_timestamp_opt(ts, 0)
.ok_or(josh_error("from_timestamp_opt"))?;
let ndt =
chrono::DateTime::from_timestamp(ts, 0).ok_or(josh_error("from_timestamp_opt"))?;

Ok(ndt.format(&format).to_string())
}

Expand Down
23 changes: 12 additions & 11 deletions josh-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ repository = "https://github.com/josh-project/josh"
version = "22.4.15"

[dependencies]
base64 = "0.21.4"
base64 = { workspace = true }
clap = { workspace = true }
futures = { workspace = true }
hyper = { version = "0.14.27", features = ["stream"] }
hyper = { version = "0.14.28", features = ["stream"] }
hyper-reverse-proxy = { workspace = true }
hyper-staticfile = "0.9.5"
hyper-tls = "0.5.0"
hyper_cgi = { path = "../hyper_cgi" }
indoc = "2.0.4"
indoc = "2.0.5"
josh = {path = "../josh-core" }
lazy_static = { workspace = true }
opentelemetry = "0.20.0"
opentelemetry-jaeger = "0.19.0"
opentelemetry = "0.23.0"
opentelemetry-jaeger = "0.22.0"
percent-encoding = "2.3.0"
regex = { workspace = true }
reqwest = { workspace = true }
Expand All @@ -33,16 +33,17 @@ tokio = { workspace = true }
toml = { workspace = true }
tracing = { workspace = true }
tracing-futures = "0.2.5"
tracing-opentelemetry = "0.21.0"
tracing-opentelemetry = "0.24.0"
tracing-subscriber = { workspace = true }
unindent = "0.2.3"
url = "2.4.1"
uuid = { version = "1.4.1", features = ["v4"] }
url = "2.5.0"
uuid = { version = "1.8.0", features = ["v4"] }
josh-rpc = { path = "../josh-rpc" }
tokio-util = { workspace = true }
tempdir = "0.3.7"
tempfile = { workspace = true }
gix = { workspace = true }
juniper = { workspace = true }
git2 = { workspace = true }
opentelemetry-semantic-conventions = "0.14.0"
opentelemetry-otlp = "0.13.0"
opentelemetry-semantic-conventions = "0.15.0"
opentelemetry-otlp = "0.16.0"
opentelemetry_sdk = "0.23.0"
9 changes: 5 additions & 4 deletions josh-proxy/src/bin/josh-proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use clap::Parser;
use josh_proxy::cli;
use josh_proxy::{run_git_with_auth, FetchError, MetaConfig, RemoteAuth, RepoConfig, RepoUpdate};
use opentelemetry::global;
use opentelemetry::sdk::propagation::TraceContextPropagator;
use tracing_opentelemetry::OpenTelemetrySpanExt;
use tracing_subscriber::Layer;

Expand Down Expand Up @@ -686,7 +685,7 @@ async fn ssh_list_refs(
auth_socket: std::path::PathBuf,
refs: Option<&[&str]>,
) -> JoshResult<HashMap<String, String>> {
let temp_dir = tempdir::TempDir::new("josh")?;
let temp_dir = tempfile::TempDir::with_prefix("josh")?;
let refs = match refs {
Some(refs) => refs.to_vec(),
None => vec!["HEAD"],
Expand Down Expand Up @@ -1961,8 +1960,10 @@ async fn shutdown_signal() {
println!("shutdown_signal");
}

#[allow(deprecated)]
fn init_trace() {
use opentelemetry_otlp::WithExportConfig;
use opentelemetry_sdk::propagation::TraceContextPropagator;

// Set format for propagating tracing context. This allows to link traces from one invocation
// of josh to the next
Expand Down Expand Up @@ -1998,7 +1999,7 @@ fn init_trace() {
use opentelemetry::KeyValue;

let resource =
opentelemetry::sdk::Resource::new(vec![KeyValue::new("service.name", service_name)]);
opentelemetry_sdk::Resource::new(vec![KeyValue::new("service.name", service_name)]);

let tracer = opentelemetry_otlp::new_pipeline()
.tracing()
Expand All @@ -2007,7 +2008,7 @@ fn init_trace() {
.tonic()
.with_endpoint(endpoint),
)
.with_trace_config(opentelemetry::sdk::trace::config().with_resource(resource))
.with_trace_config(opentelemetry_sdk::trace::config().with_resource(resource))
.install_simple()
.expect("can't install opentelemetry pipeline");

Expand Down
4 changes: 2 additions & 2 deletions josh-ssh-shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ serde_json = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tokio-util = { workspace = true }
thiserror = "1.0.49"
tempfile = "3.8.0"
thiserror = "1.0.57"
tempfile = { workspace = true }
reqwest = { workspace = true }

0 comments on commit 301c8fd

Please sign in to comment.