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

Optimized software versions endpoint #24496

Merged
merged 2 commits into from
Dec 9, 2024
Merged

Optimized software versions endpoint #24496

merged 2 commits into from
Dec 9, 2024

Conversation

ksykulev
Copy link
Contributor

@ksykulev ksykulev commented Dec 6, 2024

The software versions endpoint cve details can be truncated using the without_vulnerability_details flag.

#23679

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Added/updated tests
  • Manual QA for all new/changed functionality

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.51%. Comparing base (8fc7069) to head (9ab69d2).
Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24496      +/-   ##
==========================================
- Coverage   63.52%   63.51%   -0.01%     
==========================================
  Files        1591     1592       +1     
  Lines      151131   151159      +28     
  Branches     3881     3831      -50     
==========================================
+ Hits        96000    96014      +14     
- Misses      47483    47493      +10     
- Partials     7648     7652       +4     
Flag Coverage Δ
backend 64.31% <100.00%> (-0.01%) ⬇️
frontend 53.64% <ø> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

s.DoJSON(
"GET", "/api/latest/fleet/software/versions",
listSoftwareRequest{},
http.StatusOK, &respVersions,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When using a premium flag/feature it appears the API returns an error and fleet.ErrMissingLicense. Wonder if that is something that should be done here as well.

Copy link
Member

Choose a reason for hiding this comment

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

Silently dropping the option for Fleet Free, since theoretically you should be able to run Fleet Free without the EE code, feels fine here.

Also, in order to do the license error you'd need to be able to tell the difference between an unset query param and an explicit false, which would blow up complexity on this a bit, so just as well not to do that.

@ksykulev ksykulev marked this pull request as ready for review December 6, 2024 22:12
@ksykulev ksykulev requested review from a team as code owners December 6, 2024 22:12
The software versions endpoint cve details can be truncated using the
`without_vulnerability_details` flag.
Copy link
Member

@iansltx iansltx left a comment

Choose a reason for hiding this comment

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

LGTM other than changes file

s.DoJSON(
"GET", "/api/latest/fleet/software/versions",
listSoftwareRequest{},
http.StatusOK, &respVersions,
Copy link
Member

Choose a reason for hiding this comment

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

Silently dropping the option for Fleet Free, since theoretically you should be able to run Fleet Free without the EE code, feels fine here.

Also, in order to do the license error you'd need to be able to tell the difference between an unset query param and an explicit false, which would blow up complexity on this a bit, so just as well not to do that.

changes/23679-optimize-software-versions Outdated Show resolved Hide resolved
@ksykulev ksykulev merged commit cae70d2 into main Dec 9, 2024
27 checks passed
@ksykulev ksykulev deleted the 23679-software-versions branch December 9, 2024 22:24
ksykulev added a commit that referenced this pull request Dec 9, 2024
The software versions endpoint cve details can be truncated using the
`without_vulnerability_details` flag.

#23679

# 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://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Ian Littman <[email protected]>
ksykulev added a commit that referenced this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants