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

Make software batch endpoint asynchronous #22258

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

lucasmrod
Copy link
Member

@lucasmrod lucasmrod commented Sep 19, 2024

#22069

API changes: #22259

QAd by applying 10 pieces of software on a team, which took 3+ minutes in total (which, before these changes was timing out at 100s.)

With this approach, a GitOps CI run timing out might leave the background process running (which will eventually be applied to the database). The team discussed and agreed that we can fix this edge case later.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)
  • Added/updated tests
  • Manual QA for all new/changed functionality

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 71.49533% with 61 lines in your changes missing coverage. Please review.

Project coverage is 65.21%. Comparing base (36ea5cc) to head (9e5333b).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
ee/server/service/software_installers.go 69.40% 28 Missing and 13 partials ⚠️
server/service/software_installers.go 61.11% 6 Missing and 1 partial ⚠️
server/service/client_software.go 75.00% 3 Missing and 2 partials ⚠️
server/service/redis_key_value/redis_key_value.go 76.47% 2 Missing and 2 partials ⚠️
server/datastore/mysql/software_installers.go 82.35% 2 Missing and 1 partial ⚠️
cmd/fleet/serve.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #22258    +/-   ##
========================================
  Coverage   65.20%   65.21%            
========================================
  Files        1495     1496     +1     
  Lines      117112   117240   +128     
  Branches     3562     3562            
========================================
+ Hits        76363    76458    +95     
- Misses      33628    33648    +20     
- Partials     7121     7134    +13     
Flag Coverage Δ
backend 66.50% <71.49%> (+<0.01%) ⬆️

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.

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.

Caught a couple things, plus a bunch of quick nits. Guessing these will be quick fixes. Overall seems reasonable as an initial iteraction of async-ifying this; thanks!

ee/server/service/software_installers.go Outdated Show resolved Hide resolved
ee/server/service/software_installers.go Show resolved Hide resolved
ee/server/service/software_installers.go Show resolved Hide resolved
ee/server/service/software_installers.go Show resolved Hide resolved
ee/server/service/software_installers.go Outdated Show resolved Hide resolved
ee/server/service/software_installers.go Outdated Show resolved Hide resolved
ee/server/service/software_installers.go Outdated Show resolved Hide resolved
ee/server/service/software_installers.go Outdated Show resolved Hide resolved
ee/server/service/software_installers.go Outdated Show resolved Hide resolved
server/fleet/service.go Outdated Show resolved Hide resolved
@lucasmrod lucasmrod merged commit 8d664bd into main Sep 20, 2024
26 checks passed
@lucasmrod lucasmrod deleted the 22069-gitops-async-software-batch branch September 20, 2024 14:55
lucasmrod added a commit that referenced this pull request Sep 20, 2024
#22069

API changes: #22259

QAd by applying 10 pieces of software on a team, which took 3+ minutes
in total (which, before these changes was timing out at 100s.)

With this approach, a GitOps CI run timing out might leave the
background process running (which will eventually be applied to the
database). The team discussed and agreed that we can fix this edge case
later.

- [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] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
iansltx pushed a commit that referenced this pull request Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants