Skip to content

Refactored ListMDMWindowsProfilesToRemove test to filter orphaned hosts and streamline validation - #44665

Merged
getvictor merged 1 commit into
rc-minor-fleet-v4.85.0from
victor/4.85.0-test-fix
May 4, 2026
Merged

Refactored ListMDMWindowsProfilesToRemove test to filter orphaned hosts and streamline validation#44665
getvictor merged 1 commit into
rc-minor-fleet-v4.85.0from
victor/4.85.0-test-fix

Conversation

@getvictor

@getvictor getvictor commented May 4, 2026

Copy link
Copy Markdown
Member

Fix failing CI test.

On main, the host-scoped method ListMDMWindowsProfilesToRemoveForHosts exists (added by PR #44075, merged 2026-04-28 to main but not cherry-picked to the RC).

Summary by CodeRabbit

  • Tests
    • Improved test coverage for MDM Windows profile removal logic to better validate edge case handling.

@getvictor
getvictor marked this pull request as ready for review May 4, 2026 15:34

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@getvictor
getvictor requested a review from a team as a code owner May 4, 2026 15:34
@getvictor

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

2 similar comments
@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e59a3fec-7e86-4f19-922d-575fb6145aaf

📥 Commits

Reviewing files that changed from the base of the PR and between 4d51b85 and 71f4b87.

📒 Files selected for processing (1)
  • server/datastore/mysql/microsoft_mdm_test.go

Walkthrough

The test testMDMWindowsProfilesToRemoveSkipsOrphanedHosts was refactored to change how it validates Windows MDM profile removal behavior. Instead of using the host-scoped ListMDMWindowsProfilesToRemoveForHosts method, the test now calls the broader ListMDMWindowsProfilesToRemove method and filters the results in-test using a helper function. The orphaned host assertion logic was adjusted to verify that only the still-enrolled host appears after deletion of another host's enrollment records.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal and does not follow the repository's template structure. It lacks required sections such as testing checklist items, related issue reference, and other mandatory validation items. Complete the PR description using the repository template, including the testing checklist and any other required sections. At minimum, add the related issue number and confirm testing was performed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: refactoring a test to filter orphaned hosts and streamline validation, which aligns with the file-level changes shown in the summary.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch victor/4.85.0-test-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented May 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.76%. Comparing base (9de8af6) to head (71f4b87).
⚠️ Report is 14 commits behind head on rc-minor-fleet-v4.85.0.

Additional details and impacted files
@@                    Coverage Diff                     @@
##           rc-minor-fleet-v4.85.0   #44665      +/-   ##
==========================================================
+ Coverage                   66.72%   66.76%   +0.03%     
==========================================================
  Files                        2626     2627       +1     
  Lines                      211198   211350     +152     
  Branches                     9428     9428              
==========================================================
+ Hits                       140924   141106     +182     
+ Misses                      57485    57423      -62     
- Partials                    12789    12821      +32     
Flag Coverage Δ
backend 68.54% <ø> (+0.04%) ⬆️

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.

@ksykulev ksykulev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lot of churn on this file. I assume some sort of not great merge?

@getvictor
getvictor merged commit 46fb129 into rc-minor-fleet-v4.85.0 May 4, 2026
45 checks passed
@getvictor
getvictor deleted the victor/4.85.0-test-fix branch May 4, 2026 16:23
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