Repository navigation
Conversation
**Related issue:** #56477 The `pull_request_target` trigger in the `fleetctl new` GitHub Actions workflow template had `branches:` indented two spaces deeper than its sibling `paths:`, so the generated `.github/workflows/workflow.yml` isn't valid YAML (`did not find expected key while parsing a block mapping`) and GitHub rejects it as an invalid workflow. This dedents `branches:` and `- main` to match the `push:` block. Nothing else in the template changes. The bug came in with #53059 and is also on `rc-minor-fleet-v4.94.0`, so this **needs a cherry-pick into `rc-minor-fleet-v4.94.0`** before 4.94.0 ships. 4.93.1 isn't affected. # Checklist for submitter - [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 `TestNewBasicFileStructure` gets a new `generates valid YAML files` subtest that walks the `fleetctl new` output and parses every `.yml`/`.yaml` file with `github.com/ghodss/yaml`, the library `new_test.go` already uses. It fails on `main` and passes with the fix: ``` # before --- FAIL: TestNewBasicFileStructure/generates_valid_YAML_files Error: error converting YAML to JSON: yaml: line 16: did not find expected key Messages: invalid YAML in .../out/.github/workflows/workflow.yml # after --- PASS: TestNewBasicFileStructure/generates_valid_YAML_files ok github.com/fleetdm/fleet/v4/cmd/fleetctl/fleetctl ``` - [x] QA'd all new/changed functionality manually Built `fleetctl` from this branch and ran `fleetctl new --org-name "QA Org"`. All 11 generated YAML files parse with a second, independent parser (Ruby Psych), and `yq '.on.pull_request_target'` on the generated `workflow.yml` returns `branches: [main]` and `paths: ["**"]`, matching `push:`. Psych rejects the `main` version of the template with the same "did not find expected key" error. For unreleased bug fixes in a release candidate, one of: - [x] Confirmed that the fix is not expected to adversely impact load test results ## AI **AI:** Claude Code (claude-opus-5-5) ## Frontend - [ ] Attached a screenshot or screen recording of each user-visible change. Screenshot: N/A, no UI change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed the GitHub Actions workflow generated by `fleetctl new` so it uses valid YAML and can be accepted by GitHub. This prevents newly generated workflows from failing due to a YAML parsing error. * Added checks to help ensure YAML files in generated output are parseable, reducing the risk of invalid configuration files. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
nulmete
approved these changes
Oct 27, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## rc-minor-fleet-v4.94.0 #56685 +/- ##
=========================================================
Coverage ? 78.55%
=========================================================
Files ? 2020
Lines ? 222565
Branches ? 0
=========================================================
Hits ? 174847
Misses ? 47710
Partials ? 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch was previously deployed
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 #56479 into the RC branch.