Skip to content

Patch when closed: Fix generate-gitops generating invalid file and frontend copy - #50542

Merged
jkatz01 merged 2 commits into
feat/39962-patch-when-closedfrom
50522-50523-unreleased-patch-when-closed-bugs
Aug 5, 2026
Merged

Patch when closed: Fix generate-gitops generating invalid file and frontend copy#50542
jkatz01 merged 2 commits into
feat/39962-patch-when-closedfrom
50522-50523-unreleased-patch-when-closed-bugs

Conversation

@jkatz01

@jkatz01 jkatz01 commented Aug 4, 2026

Copy link
Copy Markdown
Member

Related issue:
Resolves #50522
Resolves #50523

Checklist for submitter

Testing

For unreleased bug fixes in a release candidate, one of:

  • Confirmed that the fix is not expected to adversely impact load test results
  • Alerted the release DRI if additional load testing is needed

Summary by CodeRabbit

  • Bug Fixes
    • Pre-install queries are no longer exported for apps configured to patch when closed.
    • Updated automation activity labels to clearly identify skipped patches, including the software name when available.

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (feat/39962-patch-when-closed@5121bbd). Learn more about missing BASE report.

Additional details and impacted files
@@                       Coverage Diff                       @@
##             feat/39962-patch-when-closed   #50542   +/-   ##
===============================================================
  Coverage                                ?   67.98%           
===============================================================
  Files                                   ?     3897           
  Lines                                   ?   248996           
  Branches                                ?    13325           
===============================================================
  Hits                                    ?   169289           
  Misses                                  ?    64481           
  Partials                                ?    15226           
Flag Coverage Δ
backend 69.28% <100.00%> (?)
frontend 61.05% <100.00%> (?)

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

☔ View full report in Codecov by Harness.
📢 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 August 4, 2026 22:22
@jkatz01
jkatz01 requested review from a team as code owners August 4, 2026 22:22
@jkatz01

jkatz01 commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a5254dd7-847a-49be-b83a-59dce8183a23

📥 Commits

Reviewing files that changed from the base of the PR and between 5121bbd and 0477d04.

📒 Files selected for processing (4)
  • cmd/fleetctl/fleetctl/generate_gitops.go
  • cmd/fleetctl/fleetctl/generate_gitops_test.go
  • frontend/pages/policies/details/components/PolicyAutomationsActivitiesTable/PolicyAutomationsActivitiesTable.tests.tsx
  • frontend/pages/policies/details/components/PolicyAutomationsActivitiesTable/helpers.tsx

Walkthrough

generate-gitops now omits pre-install query files for packages with PatchWhenClosed enabled. Tests add matching Fleet-maintained app metadata and verify the file is not generated. The automation activities table now displays skipped patch events as “Patch skipped” while retaining the software name.

Possibly related PRs

  • fleetdm/fleet#49691 — Adds related patch_when_closed behavior and managed pre-install query handling.
  • fleetdm/fleet#49871 — Extends related patch_when_closed behavior and automation labeling.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies both fixes: invalid GitOps generation and incorrect frontend text for patch-when-closed behavior.
Description check ✅ Passed The description links both issues and documents automated tests, manual QA, and release-candidate load-test assessment.
Linked Issues check ✅ Passed The changes satisfy both linked issues by suppressing invalid pre-install queries and renaming the skip label to “Patch skipped.”
Out of Scope Changes check ✅ Passed All modified files directly support the two linked patch-when-closed fixes, with no unrelated changes identified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 50522-50523-unreleased-patch-when-closed-bugs

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

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

@jkatz01
jkatz01 merged commit 298146f into feat/39962-patch-when-closed Aug 5, 2026
41 checks passed
@jkatz01
jkatz01 deleted the 50522-50523-unreleased-patch-when-closed-bugs branch August 5, 2026 14:02
@coderabbitai coderabbitai Bot mentioned this pull request Aug 7, 2026
15 tasks
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