-
Notifications
You must be signed in to change notification settings - Fork 446
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
Display ingested software on host details page. #19576
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19576 +/- ##
==========================================
+ Coverage 62.37% 62.50% +0.12%
==========================================
Files 1397 1398 +1
Lines 130578 130342 -236
Branches 3166 3162 -4
==========================================
+ Hits 81454 81475 +21
+ Misses 42887 42631 -256
+ Partials 6237 6236 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
LGTM! Left some questions.
software s | ||
WHERE | ||
NOT EXISTS (SELECT 1 FROM software_titles st WHERE (s.name, s.source, s.browser) = (st.name, st.source, st.browser)) | ||
ON DUPLICATE KEY UPDATE software_titles.id = software_titles.id` |
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.
Why UPDATE software_titles.id = software_titles.id
?
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.
This is how it was done in ReconcileSoftwareTitles
method, so I kept it consistent. I'm guessing it was done so that the INSERT statement doesn't fail. It does seem like INSERT IGNORE
would be less wordy/faster.
|
||
// update new title ids for new software table entries | ||
updateSoftwareStmt := ` | ||
UPDATE |
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.
Am worried about this update locking the two tables. Maybe load test will tell us if this is expensive.
Another approach is to insert the titles first, then insert the software entries with the existing and new title_ids.
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.
This flow should only lock the new software items that are being inserted and the new titles that are being inserted. Yes, load test should tell us if we're getting long lock times when many hosts try to enroll and insert their software.
Something to think about:
|
dc8801b
to
15a8444
Compare
Yes, I filed a feature request for it: #19546 |
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.
FE looks good. Thanks for making this improvement 👍🏽
#19348 Fixed host details page and device details page not showing the latest software. - During software ingestion, software titles are now added if needed and software items have their title_id field populated. - In addition, after refreshing via UI, the software will be re-fetched if it has been modified. Added `exclude_software` query parameter to the `/api/latest/fleet/hosts/:id` endpoint to exclude software from the response. PR for API doc change: #19617 Related issue filed for the Device User Page: #19618 # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [x] Added/updated tests - [x] Manual QA for all new/changed functionality
#19348
Fixed host details page and device details page not showing the latest software.
Added
exclude_software
query parameter to the/api/latest/fleet/hosts/:id
endpoint to exclude software from the response.PR for API doc change: #19617
Related issue filed for the Device User Page: #19618
Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/
,orbit/changes/
oree/fleetd-chrome/changes
.See Changes files for more information.