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

Add ability to update package data #143

Closed
JonoYang opened this issue Jul 13, 2023 · 1 comment
Closed

Add ability to update package data #143

JonoYang opened this issue Jul 13, 2023 · 1 comment
Assignees

Comments

@JonoYang
Copy link
Contributor

JonoYang commented Jul 13, 2023

Currently, we have no ability to update Package data and Package resource data without deleting the existing Package resource data, deleting the corresponding scans on the purldb scancode.io instance, and clearing out the Package origin fields. We need to come up with an easier way to update package informaition on purldb.

  • The scan indexing logic should use get_or_create when processing package resource data such that we do not try to create an existing resource
  • We need to log in the history field when we have updated package information. The history field should be updated to work similarly to the history field in dejacode

Things to consider:

  • When we send a package off for scanning to the purldb scancode.io instance, we set the project name for that package scan to be the package's download url, hashed using sha1. We should update this so we have different sha1 values for multiple scans of the same package.
@JonoYang JonoYang self-assigned this Jul 13, 2023
JonoYang added a commit that referenced this issue Jul 14, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 14, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 18, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 19, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
@JonoYang
Copy link
Contributor Author

The scan requesting/processing steps have been updated. When we create a scan project for a package on scancode.io, the name of that project is <package name>-<package version>-<generated uuid truncated>. We have a flag on ScannableURI to tell whether or not that Package scan request should be reindexed. If it is set to true, then we send another Package scan request, get the scan back when it is done, remove existing Resources and recreate them from the scan, and then update Package info.

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