Repository navigation
feat: store harvester version, errors and warnings - #172
Merged
Merged
Conversation
API Specification - Non-breaking changesAPI Changelog 1.0.0 vs. 1.0.0API ChangesPOST /api/detection_results
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #172 +/- ##
=============================================
+ Coverage 69.27% 76.84% +7.57%
- Complexity 1300 1354 +54
=============================================
Files 168 172 +4
Lines 3987 4151 +164
=============================================
+ Hits 2762 3190 +428
+ Misses 1225 961 -264
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to ticket
https://leantime.itkdev.dk/#/tickets/showTicket/8363
Description
Store the harvester version, errors and warnings that the Python harvester sends with each detection result.
Changes:
DetectionResultgetsharvesterVersion(nullable string), anderrorsandwarnings(JSON lists, default[]), all writable through the API. Results from the TypeScript harvester, which sends none of them, still validate.[]into existing rows before making the JSON columnsNOT NULL.PersistDetectionResultHandlerkeeps the hash as it is. An existing result takes the latest version, errors and warnings along withlastContact, without reprocessing.Why: API Platform drops unknown fields, so the harvester's envelope was accepted and thrown away. Failed commands, such as the
composer auditbehind every docker result's"audit":"unknown", never reached ITKsites. Keeping the envelope out of the hash means a result shows its current errors without creating new rows.No screenshots yet: the dev database holds a production dump from the TypeScript harvester, so the new fields are empty.
Checklist