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

don't reverse change order when handling crates.io index updates #2302

Merged
merged 1 commit into from
Nov 8, 2023
Merged
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
5 changes: 1 addition & 4 deletions src/build_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,11 @@ impl BuildQueue {
.context("no last_seen_reference set in database")?;
diff.set_last_seen_reference(last_seen_reference)?;

let (mut changes, new_reference) = diff.peek_changes_ordered()?;
let (changes, new_reference) = diff.peek_changes_ordered()?;
let mut crates_added = 0;

debug!("queueing changes from {last_seen_reference} to {new_reference}");

// I believe this will fix ordering of queue if we get more than one crate from changes
changes.reverse();

for change in &changes {
if let Some((ref krate, ..)) = change.crate_deleted() {
match delete_crate(&mut conn, &self.storage, &self.config, krate)
Expand Down
Loading