Skip to content

Conversation

@Carbonhell
Copy link
Contributor

Closes #3064 .
To facilitate testing, I decided to split up the get_new_crates method in smaller units. The actual change that updates the priority for older releases is contained in the deprioritize_other_releases method, which is called when only a new crate is processed. This logic is only invoked when processing new crate versions are found by the registry watcher.

For the refactor, a point worthy of note relates to the removal of manual report_error calls, in favor of propagating the error to the caller, since they're already reported in the registry watcher entrypoint - this does not include calls to deprioritize_other_releases and queue_crate_invalidation, for which a failure can be logged without killing the watcher.

The tests introduced are quite simple - let me know if more are needed!

@Carbonhell Carbonhell requested a review from a team as a code owner December 4, 2025 21:58
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Dec 4, 2025
@Carbonhell Carbonhell force-pushed the tweak/deprioritize-older-releases branch 2 times, most recently from 744ab80 to 308726c Compare December 4, 2025 22:11
refactor(queue): break up get_new_crates() in smaller methods to facilitate testing
chore(tracing): update tracing macro usages to use structured fields instead of string interpolation
@Carbonhell Carbonhell force-pushed the tweak/deprioritize-older-releases branch from 7607323 to 75575bc Compare December 8, 2025 19:03
@Carbonhell Carbonhell requested a review from syphar December 8, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

automatically deprioritize older releases when newer come in

2 participants