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

scan queue API redesign #504

Closed
JonoYang opened this issue Jul 19, 2024 · 1 comment
Closed

scan queue API redesign #504

JonoYang opened this issue Jul 19, 2024 · 1 comment
Assignees

Comments

@JonoYang
Copy link
Member

Currently, the scan queue API has two endpoints:

  • /api/scan_queue/get_next_download_url/
  • /api/scan_queue/update_status/

The worker gets the next download url from /api/scan_queue/get_next_download_url/ and then performs a scan on it, then uses the /api/scan_queue/update_status/ to send back results or to indicate a failure.

It may be more logical to organize the scan queue API such that the update_status functions are actions on the scannable_uri instances themselves.

@JonoYang JonoYang self-assigned this Jul 19, 2024
JonoYang added a commit that referenced this issue Jul 20, 2024
    * Handle webhook response from scancode.io

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 22, 2024
    * Handle webhook response from scancode.io

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 24, 2024
    * Handle webhook response from scancode.io

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 24, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 24, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 24, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 26, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 29, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 30, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 30, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 31, 2024
    * We are going to use user.id for now to avoid migration issues

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 31, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 31, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 31, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 31, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 31, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 31, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 31, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 31, 2024
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 31, 2024
    * Add docstring for index_package_scan

Signed-off-by: Jono Yang <jyang@nexb.com>
@JonoYang
Copy link
Member Author

JonoYang commented Aug 1, 2024

We now have the API endpoint /api/scan_queue/index_package_scan/ that is used to accept the purldb scan worker scan project info when a package scan has completed. Whenever get_next_download_url() is called, a webhook url is created, which is used as the webhook subscription target for the purldb scan worker project.

@JonoYang JonoYang closed this as completed Aug 1, 2024
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

No branches or pull requests

1 participant