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

feat(worker): remove stale import findings for successful record #2945

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewpollock
Copy link
Contributor

This adds functionality to the worker to clear any existing import findings for a record that previously failed to import, but now does. This avoids confusing historical findings existing for records that are successfully importing now.

Part of #2189 and #2188

This adds functionality to the worker to clear any existing import
findings for a record that previously failed to import, but now does.
This avoids confusing historical findings existing for records that are
successfully importing now.

Part of google#2189 and google#2188
finding = osv.ImportFinding.get_by_id(vulnerability.id())
if finding:
logging.info('Removing stale import finding for %s', vulnerability.id())
finding.key.delete()
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a random thought, will we ever need to query historical finding data? For example, to evaluate how many records the linter helped fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will we ever need to query historical finding data?

In my opinion, it's more of a "nice to have" than a strong "need" in terms of requirement. Yes, it's helpful to be able to quantify impact. We can determine that from the logs for as long as we have log retention for...

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.

2 participants