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

502 queue priority update #503

Merged
merged 5 commits into from
Jul 19, 2024
Merged

502 queue priority update #503

merged 5 commits into from
Jul 19, 2024

Conversation

JonoYang
Copy link
Member

This PR updates the /api/collect and /api/collect/index_packages/ endpoints where purls with versions are placed in the front of the scan queue. This is done as it is assumed that if the user knows which versions of a package they want to look at, they would probably want to see it sooner.

Copy link
Member

@keshav-space keshav-space left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @JonoYang.
Looking good! It seems like you forgot to pass the priority in priority_queue.py command. https://github.com/nexB/purldb/blob/275d6daa47276c32dd50f0f8f622d2472bae6796/minecode/management/commands/priority_queue.py#L117-L120

Also, it would be nice to have a test to ensure that these priority values are indeed making their way to process_request in visitors.

Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonoYang LGTM! Thanks++

minecode/model_utils.py Outdated Show resolved Hide resolved
packagedb/api.py Show resolved Hide resolved
JonoYang added 2 commits July 18, 2024 12:58
Signed-off-by: Jono Yang <[email protected]>
@JonoYang
Copy link
Member Author

Thanks for the review!

@keshav-space I've created a test that checks the priority of the created ScannableURIs from a request to /api/collect/index_packages/

@JonoYang JonoYang merged commit d4094f5 into main Jul 19, 2024
7 of 8 checks passed
@JonoYang JonoYang deleted the 502-queue-priority-update branch July 19, 2024 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants