-
Notifications
You must be signed in to change notification settings - Fork 16
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
Ingestion fixes, auto-create vulnerabilities using upsert #532
Conversation
d052c8d
to
07dd1ef
Compare
Deleting the function altogether would lead a gap for e.g. testing. Also see: trustification#531 (comment)
07cd69a
to
c8f31f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need some changes in the fundamental VulnerabilityService to avoid the stupid-ass workaround I put there for synthesizing vulnerabilities from the advisory_vuln table when no row existed in the vuln table.
impl super::Graph { | ||
impl Graph { | ||
#[instrument(skip(self, tx), err)] | ||
pub async fn get_organizations( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
related: I'd still argue we should be deleting get_plurals() and defer that ish to the appropriate fundamental Service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a tracking issue: #547
Ah yes. I'll fix this as part of this PR. |
Align the code with the ingestion module, only returning actual vulnerabilities.
ef72fe9
to
8faa1c5
Compare
@bobmcwhirter I updated the PR and dropped the special handling for the advisory_vulns. |
This PR adds a few tests for re-ingesting documents. It also fixes issues alongside those. Most notably, it auto-creates vulnerabilities and switches the creation of those to an upsert model.