Cherry-pick #40414: Allow "unassigned.yml" in GitOps#40617
Merged
sgress454 merged 1 commit intorc-minor-fleet-v4.82.0from Feb 26, 2026
Merged
Cherry-pick #40414: Allow "unassigned.yml" in GitOps#40617sgress454 merged 1 commit intorc-minor-fleet-v4.82.0from
sgress454 merged 1 commit intorc-minor-fleet-v4.82.0from
Conversation
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** For #40433 # Details This PR updates `fleetctl gitops` and `fleetctl generate_gitops` to use `unassigned.yml` in place of `no-team.yml`. The two files are utilized identically, except that `unassigned.yml` expects the `name:` to be `Unassigned` rather than `No team`. Internally, we still map some things to the string "no team" before sending to the back end so that we don't have to update back-end code and make more spaghetti to clean up when we 🔪 No Team as a concept in Fleet 5. We do pass the filename into the main `DoGitOps` method, but both I and Claude did our best to determine that it's not used in any way that would break with this change. # Checklist for submitter If some of the following don't apply, delete the relevant line. - [X] 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. ## Testing - [X] Added/updated automated tests - [X] QA'd all new/changed functionality manually From test plan: - [X] With a pre-existing GitOps folder w/ `no-team.yml`, run `fleetctl gitops -f /path/to/no-team.yml --dry-run --enable-log-topics=deprecated-field-names` and verify that everything works as expected and you get the deprecation warning. - [X] Do the above without `--dry-run` and verify via the UI and/or `fleetctl generate-gitops` that the Fleet config is as expected. - [X] Change `no-team.yml` to `unassigned.yml`, try a gitops run with `fleetctl gitops -f /path/to/unassigned.yml --dry-run --enable-log-topics=deprecated-field-names` and verify that you get an error because the `name:` is still `No team` - [X] Change the `name:` to `Unassigned`, repeat the run above and verify that the output is the same as with `no-team.yml`, and that no deprecation warning is listed. - [X] Do the same as the above without `--dry-run` and verify that the Fleet config is as expected. - [X] Run `fleetctl generate-gitops` and verify that `unassigned.yml` is output rather than `no-team.yml`, and any related files are under the `lib/unassigned` folder rather than `lib/no-team`, and any paths inside `unassigned.yml` (e.g. for scripts) are pointed at `lib/unassigned`. ## New Fleet configuration settings - [X] Verified that the setting is exported via `fleetctl generate-gitops` - [ ] Verified the setting is documented in a separate PR to [the GitOps documentation](https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485) @noahtalerman will work on this --------- Co-authored-by: Ian Littman <iansltx@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## rc-minor-fleet-v4.82.0 #40617 +/- ##
=========================================================
Coverage ? 66.40%
=========================================================
Files ? 2456
Lines ? 197007
Branches ? 8556
=========================================================
Hits ? 130818
Misses ? 54352
Partials ? 11837
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #40414 into
rc-minor-fleet-v4.82.0.