-
Notifications
You must be signed in to change notification settings - Fork 107
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
Implement PackageScanner service #170
Conversation
Codecov Report
@@ Coverage Diff @@
## scanner #170 +/- ##
=============================================
- Coverage 99.87% 99.86% -0.02%
- Complexity 1177 1273 +96
=============================================
Files 203 215 +12
Lines 3332 3613 +281
=============================================
+ Hits 3328 3608 +280
- Misses 4 5 +1
Continue to review full report at Codecov.
|
$this->packageRepository->getById(Uuid::fromString($item->id())) | ||
); | ||
$progressBar->advance(); | ||
} |
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 need to call EntityManager::clear to reduce memory usage, and use transaction here
return $this->formatContent(); | ||
} | ||
|
||
public function htmlSimple(): string |
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.
I would like to rename this method and maybe we can remove html from readl model?
I know it simplifies, but it's not their responsibility to format html.
/** | ||
* @param Advisory[] $advisories | ||
*/ | ||
private function advisoriesHtml(array $advisories): string |
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.
same as above
SELECT content FROM organization_package_scan_result s | ||
WHERE s.package_id = p.id | ||
ORDER BY date DESC LIMIT 1 | ||
) scan_result_content |
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 need to rewrite this query, fortunately, we have already agreed on a better solution
* Implement PackageScanner service * Remove php 7.4.3 constant
* Implement PackageScanner service (#170) * Implement PackageScanner service * Remove php 7.4.3 constant * Implement SecurityChecker (#171) * Implement SecurityChecker * Remove unused class; Load advisories only when var is empty * Add `repman:security:update-db` command to cron (#176) * Add last scan result to package model (#177) * Add last scan result to package entity * Disable command output * Get rid of html from read model * Update db command (#178) * Scan all packages when database is updated * CR fixes * Add expectations * Fix update advisories database git command (#182) * Fix update advisories database git command * Add git config for buddy pipeline Co-authored-by: Piotr Rogowski <piotr.rogowski0@gmail.com>
No description provided.