Skip to content

Patch policy: edit policy and automations FE#41276

Merged
cdcme merged 8 commits intofeat/31914-patch-policyfrom
feat-31914-fe-edit-policy-page
Mar 11, 2026
Merged

Patch policy: edit policy and automations FE#41276
cdcme merged 8 commits intofeat/31914-patch-policyfrom
feat-31914-fe-edit-policy-page

Conversation

@cdcme
Copy link
Copy Markdown
Member

@cdcme cdcme commented Mar 9, 2026

Fixes #40401

Screencast.from.2026-03-09.14-22-49.webm

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 76.31579% with 18 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat/31914-patch-policy@12abbdb). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...es/PolicyPage/components/PolicyForm/PolicyForm.tsx 69.44% 11 Missing ⚠️
...components/PolicyAutomations/PolicyAutomations.tsx 82.50% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##             feat/31914-patch-policy   #41276   +/-   ##
==========================================================
  Coverage                           ?   66.37%           
==========================================================
  Files                              ?     2483           
  Lines                              ?   198695           
  Branches                           ?     8810           
==========================================================
  Hits                               ?   131890           
  Misses                             ?    54893           
  Partials                           ?    11912           
Flag Coverage Δ
frontend 54.53% <76.31%> (?)

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.

@cdcme cdcme marked this pull request as ready for review March 9, 2026 19:00
@cdcme cdcme requested a review from a team as a code owner March 9, 2026 19:00
RachelElysia and others added 3 commits March 10, 2026 09:18
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #40314 
- New error when attempting to delete an installer that has a patch
policy associated
- New error when attempting to update the file for an installer
associated with an FMA
- Gitops runs will generate the patch policy every time so it matches
the current installer version
- Existing code checks if the query was changed and resets membership,
which should be enough.
- Added patch_policy object to software title, but we might change that
based on discussion

## 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

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
@cdcme cdcme linked an issue Mar 10, 2026 that may be closed by this pull request
@cdcme cdcme mentioned this pull request Mar 11, 2026
10 tasks
Comment thread frontend/pages/policies/PolicyPage/components/PolicyForm/PolicyForm.tsx Outdated
Copy link
Copy Markdown
Member

@RachelElysia RachelElysia left a comment

Choose a reason for hiding this comment

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

Just one thing and styling. Code is super clean, thank you for all this <3

@cdcme cdcme requested a review from a team as a code owner March 11, 2026 17:47
@cdcme cdcme requested a review from RachelElysia March 11, 2026 17:59
Copy link
Copy Markdown
Member

@RachelElysia RachelElysia left a comment

Choose a reason for hiding this comment

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

no blockers

@cdcme cdcme merged commit 8074a50 into feat/31914-patch-policy Mar 11, 2026
16 checks passed
@cdcme cdcme deleted the feat-31914-fe-edit-policy-page branch March 11, 2026 22:19
@cdcme cdcme mentioned this pull request Mar 11, 2026
4 tasks
cdcme added a commit that referenced this pull request Mar 13, 2026
Implements patch policies #31914 

- #40816
- #41248
- #41276
- #40948
- #40837
- #40956
- #41168
- #41171
- #40691
- #41524
- #41674

---------

Co-authored-by: Jonathan Katz <44128041+jkatz01@users.noreply.github.com>
Co-authored-by: jkatz01 <yehonatankatz@gmail.com>
Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
Co-authored-by: Jahziel Villasana-Espinoza <jahziel@fleetdm.com>
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.

FE: Edit policy page

3 participants