Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clear gateway cache to drop SparseRepodata and associated locks #1224

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/render/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use indicatif::{HumanBytes, ProgressBar, ProgressStyle};
use itertools::Itertools;
use rattler::install::{DefaultProgressFormatter, IndicatifReporter, Installer};
use rattler_conda_types::{Channel, ChannelUrl, MatchSpec, Platform, RepoDataRecord};
use rattler_repodata_gateway::SubdirSelection;
use rattler_solve::{resolvo::Solver, ChannelPriority, SolveStrategy, SolverImpl, SolverTask};
use url::Url;

Expand Down Expand Up @@ -260,7 +261,7 @@ pub async fn load_repodatas(
let result = tool_configuration
.repodata_gateway
.query(
channels,
channels.clone(),
[target_platform, Platform::NoArch],
specs.to_vec(),
)
Expand Down Expand Up @@ -291,6 +292,12 @@ pub async fn load_repodatas(
.clear()
.unwrap();

for channel in &channels {
tool_configuration
.repodata_gateway
.clear_repodata_cache(channel, SubdirSelection::All);
}

Ok(result)
}

Expand Down