Skip to content

Commit

Permalink
Use custom github client for connection pooling and 50% faster install
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptibell committed Mar 29, 2024
1 parent 074122a commit 5ecd122
Show file tree
Hide file tree
Showing 9 changed files with 262 additions and 561 deletions.
304 changes: 5 additions & 299 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,23 @@ lto = true
dashmap = { version = "5.5", features = ["serde"] }
dirs = "5.0"
flate2 = "1.0"
octocrab = "0.37"
once_cell = "1.8"
secrecy = "0.8"
semver = { version = "1.0", features = ["serde"] }
tar = "0.4"
tempfile = "3.3"
thiserror = "1.0"
url = "2.5"
url = { version = "2.5", features = ["serde"] }
zip = "0.6"

# Async / runtime dependencies

async-once-cell = "0.5"
async-signal = "0.2"
futures = "0.3"
http = "1.1"
http-body-util = "0.1"
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls",
"http2",
"json",
"gzip",
"brotli",
"deflate",
Expand Down
4 changes: 2 additions & 2 deletions lib/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::path::PathBuf;

use thiserror::Error;

use crate::sources::ArtifactFormat;
use crate::sources::{github::GithubError, ArtifactFormat};

#[derive(Debug, Error)]
pub enum RokitError {
Expand Down Expand Up @@ -36,7 +36,7 @@ pub enum RokitError {
#[error("Zip file error: {0}")]
Zip(#[from] zip::result::ZipError),
#[error("GitHub error: {0}")]
GitHub(#[from] octocrab::Error),
GitHub(#[from] GithubError),
}

pub type RokitResult<T> = Result<T, RokitError>;
2 changes: 1 addition & 1 deletion lib/sources/artifact.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{fmt, path::Path, str::FromStr};

use octocrab::models::repos::Asset;
use tracing::instrument;
use url::Url;

Expand All @@ -13,6 +12,7 @@ use crate::{
use super::{
decompression::decompress_gzip,
extraction::{extract_tar_file, extract_zip_file},
github::models::Asset,
};

/**
Expand Down
253 changes: 0 additions & 253 deletions lib/sources/github.rs

This file was deleted.

Loading

0 comments on commit 5ecd122

Please sign in to comment.