Skip to content

Commit

Permalink
Revert "Revert "drop CBOR index support & migration""
Browse files Browse the repository at this point in the history
This reverts commit 1912cad.
  • Loading branch information
syphar committed Aug 24, 2023
1 parent a1108d7 commit de23473
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 475 deletions.
3 changes: 0 additions & 3 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ ignore = [
"RUSTSEC-2020-0036", # failure is officially deprecated/unmaintained
# https://github.com/rust-lang/docs.rs/issues/1014

"RUSTSEC-2021-0127", # serde_cbor is unmaintained
# https://github.com/rust-lang/docs.rs/issues/1568

"RUSTSEC-2023-0018", # rustwide -> remove_dir_all,TOCTOU / Race Condition
# https://github.com/rust-lang/docs.rs/issues/2074
]
Expand Down
45 changes: 12 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ string_cache = "0.8.0"
postgres-types = { version = "0.2", features = ["derive"] }
zip = {version = "0.6.2", default-features = false, features = ["bzip2"]}
bzip2 = "0.4.4"
serde_cbor = "0.11.1"
getrandom = "0.2.1"
itertools = { version = "0.11.0", optional = true}
rusqlite = { version = "0.29.0", features = ["bundled"] }
Expand All @@ -87,7 +86,6 @@ uuid = "1.1.2"
# Data serialization and deserialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
memmap2 = "0.5.0"

# axum dependencies
axum = { version = "0.6.1", features = ["headers"]}
Expand Down
11 changes: 2 additions & 9 deletions src/bin/cratesfyi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use docs_rs::utils::{
remove_crate_priority, set_crate_priority, ConfigName,
};
use docs_rs::{
migrate_old_archive_indexes, start_background_metrics_webserver, start_web_server, BuildQueue,
Config, Context, Index, InstanceMetrics, PackageKind, RustwideBuilder, ServiceMetrics, Storage,
start_background_metrics_webserver, start_web_server, BuildQueue, Config, Context, Index,
InstanceMetrics, PackageKind, RustwideBuilder, ServiceMetrics, Storage,
};
use humantime::Duration;
use once_cell::sync::OnceCell;
Expand Down Expand Up @@ -482,9 +482,6 @@ enum DatabaseSubcommand {
/// Backfill GitHub/Gitlab stats for crates.
BackfillRepositoryStats,

/// migrate the old CBOR archive index files to SQLIte
MigrateArchiveIndex,

/// Updates info for a crate from the registry's API
UpdateCrateRegistryFields {
#[arg(name = "CRATE")]
Expand Down Expand Up @@ -536,10 +533,6 @@ impl DatabaseSubcommand {
ctx.repository_stats_updater()?.update_all_crates()?;
}

Self::MigrateArchiveIndex => {
migrate_old_archive_indexes(&*ctx.storage()?, &mut *ctx.conn()?)?;
}

Self::BackfillRepositoryStats => {
ctx.repository_stats_updater()?.backfill_repositories()?;
}
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pub use self::docbuilder::PackageKind;
pub use self::docbuilder::RustwideBuilder;
pub use self::index::Index;
pub use self::metrics::{InstanceMetrics, ServiceMetrics};
pub use self::storage::migrate_old_archive_indexes;
pub use self::storage::Storage;
pub use self::web::{start_background_metrics_webserver, start_web_server};

Expand Down
Loading

0 comments on commit de23473

Please sign in to comment.