Skip to content

GitOps: support categories for in-house apps gitops - #35531

Merged
mna merged 5 commits into
mainfrom
mna-33164-gitops-in-house-apps-2
Nov 12, 2025
Merged

GitOps: support categories for in-house apps gitops#35531
mna merged 5 commits into
mainfrom
mna-33164-gitops-in-house-apps-2

Conversation

@mna

@mna mna commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

NOTE: this is implemented from mna-33164-gitops-in-house-apps branch (PR #35423) and will only merge once @jkatz01 's work on categories for IPA (non-gitops) is merged. All that has happened and it's ready to merge once approved.

Related issue: Resolves #33164

Checklist for submitter

  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)

Testing

New Fleet configuration settings

  • Verified that the setting is exported via fleetctl generate-gitops
  • Verified the setting is documented in a separate PR to the GitOps documentation (already documented)
  • Verified that the setting is cleared on the server if it is not supplied in a YAML file (or that it is documented as being optional)
  • Verified that any relevant UI is disabled when GitOps mode is enabled (note that categories are not supported yet in the YAML preview - same as for other types of installers, e.g. .deb)

@codecov

codecov Bot commented Nov 11, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.48780% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.21%. Comparing base (22e6dcd) to head (a4cb182).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
server/datastore/mysql/in_house_apps.go 80.00% 4 Missing and 4 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #35531   +/-   ##
=======================================
  Coverage   66.20%   66.21%           
=======================================
  Files        2102     2102           
  Lines      178160   178200   +40     
  Branches     7324     7386   +62     
=======================================
+ Hits       117954   117987   +33     
- Misses      49401    49403    +2     
- Partials    10805    10810    +5     
Flag Coverage Δ
backend 67.85% <80.48%> (+<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 added a commit that referenced this pull request Nov 11, 2025
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35464 
Also allows #35531 to be merged
Adds self-service categories for #32247

Changes:
- Move category insertion up in update installer so in house apps can
use it
- Add migration for in_house_app_software_categories table
- Fix some overly wrapped errors
- Add new tests for categories
- Fix unused param in another test

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

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

## Database migrations

- [ ] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [ ] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [ ] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
@mna
mna force-pushed the mna-33164-gitops-in-house-apps-2 branch from 5d25c93 to 98e328d Compare November 11, 2025 20:56
@mna
mna force-pushed the mna-33164-gitops-in-house-apps-2 branch from 3daab2c to af49a83 Compare November 11, 2025 21:23
Base automatically changed from mna-33164-gitops-in-house-apps to main November 11, 2025 21:38
@mna
mna force-pushed the mna-33164-gitops-in-house-apps-2 branch from af49a83 to d13571c Compare November 11, 2025 21:40
@mna
mna marked this pull request as ready for review November 11, 2025 21:59
@mna
mna requested a review from a team as a code owner November 11, 2025 21:59

@jahzielv jahzielv 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.

@mna
mna merged commit 4e97263 into main Nov 12, 2025
39 checks passed
@mna
mna deleted the mna-33164-gitops-in-house-apps-2 branch November 12, 2025 14:06
jkatz01 added a commit that referenced this pull request Nov 12, 2025
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35464 
Also allows #35531 to be merged
Adds self-service categories for #32247

Changes:
- Move category insertion up in update installer so in house apps can
use it
- Add migration for in_house_app_software_categories table
- Fix some overly wrapped errors
- Add new tests for categories
- Fix unused param in another test

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

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

## Database migrations

- [ ] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [ ] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [ ] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
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.

Use GitOps to deploy in-house (enterprise) iOS/iPadOS package

2 participants