Skip to content

Add automation_type filter to count policies endpoint#42007

Merged
jkatz01 merged 2 commits intomainfrom
41987-count-policies-filter
Mar 19, 2026
Merged

Add automation_type filter to count policies endpoint#42007
jkatz01 merged 2 commits intomainfrom
41987-count-policies-filter

Conversation

@jkatz01
Copy link
Member

@jkatz01 jkatz01 commented Mar 18, 2026

Related issue: Resolves #41987

Checklist for submitter

Testing

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.43%. Comparing base (c4d142a) to head (44194d3).
⚠️ Report is 53 commits behind head on main.

Files with missing lines Patch % Lines
server/datastore/mysql/policies.go 75.00% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #42007    +/-   ##
========================================
  Coverage   66.42%   66.43%            
========================================
  Files        2511     2512     +1     
  Lines      200786   201435   +649     
  Branches     9059     9059            
========================================
+ Hits       133363   133814   +451     
- Misses      55367    55532   +165     
- Partials    12056    12089    +33     
Flag Coverage Δ
backend 68.21% <80.00%> (+<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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jkatz01 jkatz01 marked this pull request as ready for review March 18, 2026 21:12
@jkatz01 jkatz01 requested a review from a team as a code owner March 18, 2026 21:12
@jkatz01 jkatz01 merged commit 50bc31c into main Mar 19, 2026
51 checks passed
@jkatz01 jkatz01 deleted the 41987-count-policies-filter branch March 19, 2026 13:50
jkatz01 added a commit that referenced this pull request Mar 19, 2026
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #41987 

# Checklist for submitter


## Testing

- [x] Added/updated automated tests
- [ ] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)

- [x] QA'd all new/changed functionality manually
- Tested with the "scripts" filter and >20 policies with that
automation, and together with #41991 the policy count and pagination is
correct
jkatz01 added a commit that referenced this pull request Mar 19, 2026
…42007) (#42059)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
Resolves #41987 
Introduced to main in #42007
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.

Count policies endpoint missing automation_type filter

2 participants