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

Add support for iOS/iPadOS to osquery-perf #19522

Merged
merged 4 commits into from
Jun 10, 2024

Conversation

lucasmrod
Copy link
Member

#18119

  • Added support on fleet's osquery simulator cmd/osquery-perf for new osquery data ingestion features.

Sample on how to simulate 50 iPads and 50 iPhones:

go run ./cmd/osquery-perf -host_count 100 -os_templates iphone_14.6.tmpl:50,ipad_13.18.tmpl:50 -mdm_scep_challenge <...>

@lucasmrod lucasmrod requested a review from a team as a code owner June 5, 2024 11:53
mna
mna previously approved these changes Jun 5, 2024
Copy link
Member

@mna mna left a comment

Choose a reason for hiding this comment

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

Awesome to already have that supported for load tests!

cmd/osquery-perf/agent.go Outdated Show resolved Hide resolved
go runAppleIDeviceMDMLoop(i, stats, model, *serverURL, *mdmSCEPChallenge, *mdmCheckInInterval)
time.Sleep(sleepTime)
continue
}
Copy link
Member

Choose a reason for hiding this comment

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

Just wondering if it wouldn't be better for future maintainability to have this iDevice thing part of the agent as for the other hosts, or maybe create a distinct agent type and have a constructor function take care of returning the right agent based on the template?

Not a blocker, just that osquery-perf is already very "loosely organized" and it is a bit tricky to understand and maintain. Maybe for some future work, to refactor some of this (not just iDevice stuff).

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, this is on my mind.

I did not go that route because current iteration required us testing for ~100 apple devices and also due to time constraints :). As soon as we require support for a bigger number we should do some refactoring (and factor in the refactor during estimation).

cmd/osquery-perf/agent.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 6.49351% with 72 lines in your changes missing coverage. Please review.

Project coverage is 63.26%. Comparing base (0265554) to head (88bda06).
Report is 64 commits behind head on main.

Files Patch % Lines
cmd/osquery-perf/agent.go 0.00% 52 Missing ⚠️
pkg/mdm/mdmtest/apple.go 20.00% 19 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main   #19522       +/-   ##
===========================================
- Coverage   69.81%   63.26%    -6.55%     
===========================================
  Files          15      984      +969     
  Lines         921   120661   +119740     
  Branches       75       75               
===========================================
+ Hits          643    76342    +75699     
- Misses        277    38116    +37839     
- Partials        1     6203     +6202     
Flag Coverage Δ
backend 63.21% <6.49%> (?)

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.

@lucasmrod
Copy link
Member Author

Merging as the Docker publish looks unrelated (probably related to the move to Goreleaser 2.0)

@lucasmrod lucasmrod merged commit 3dbdbc1 into main Jun 10, 2024
20 of 22 checks passed
@lucasmrod lucasmrod deleted the 18119-iphone-ipad-support-osquery-perf branch June 10, 2024 20:02
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.

3 participants