fleet/.github
Allen Houchins b688fe3636
Improve changed app detection in CI (#37838)
This pull request improves the robustness and reliability of the script
and workflows that detect changed or new maintained apps in pull
requests. The main focus is on making the detection script pass
validation when the test is triggered but no new FMAs are detected.

**Script robustness and error handling:**

* The `.github/scripts/detect-new-fmas-in-pr.sh` script is updated to
always exit successfully (status 0) when no changes are detected, and
only exit with error (status 1) for critical failures like missing `jq`.
A new `safe_exit` function is introduced to standardize output and
ensure graceful exits.
[[1]](diffhunk://#diff-f9bbb0340f504713c99d610f3c64bf281fc13ed3cb8a1c06a5366272c9828a8dR7-R11)
[[2]](diffhunk://#diff-f9bbb0340f504713c99d610f3c64bf281fc13ed3cb8a1c06a5366272c9828a8dL21-R39)
* Improved error handling for missing files, empty variables, and failed
commands throughout the script, including handling cases where
`merge-base`, `git show`, or `jq` fail, and ensuring empty or missing
data does not cause the script to error out.
[[1]](diffhunk://#diff-f9bbb0340f504713c99d610f3c64bf281fc13ed3cb8a1c06a5366272c9828a8dL32-R66)
[[2]](diffhunk://#diff-f9bbb0340f504713c99d610f3c64bf281fc13ed3cb8a1c06a5366272c9828a8dR87-R108)
[[3]](diffhunk://#diff-f9bbb0340f504713c99d610f3c64bf281fc13ed3cb8a1c06a5366272c9828a8dL75-R155)

**Workflow improvements:**

* The `test-fma-darwin-pr-only.yml` and `test-fma-windows-pr-only.yml`
workflows are updated to default to "no changes" if the detection step
fails or does not set the expected output, preventing false positives or
workflow failures.
[[1]](diffhunk://#diff-28b30c8601cb7662d59efbfbbcf800cae91455fd3d875627659dced8c1257a24L70-R72)
[[2]](diffhunk://#diff-51641fd1d2cc19348b81fd8310b62ad270ca5082ceddff2d49064e78f126a1eaL76-R78)
2026-01-05 15:01:47 -06:00
..
actions Added fleet-gitops to eng metrics. (#36706) 2025-12-08 16:27:06 -06:00
ISSUE_TEMPLATE Update bug report template for clarity (#35284) 2025-11-20 17:42:39 -06:00
scripts Improve changed app detection in CI (#37838) 2026-01-05 15:01:47 -06:00
workflows Improve changed app detection in CI (#37838) 2026-01-05 15:01:47 -06:00
dependabot.yml Remove daily schedule so it only gets triggered by security alerts (#14871) 2023-11-02 09:53:40 -05:00
pull_request_template.md Remove unclear item from pull_request_template (#34029) 2025-10-09 17:38:41 -03:00