CAMEL-24081: ci - Do not run Windows launcher check on unrelated PRs - #24718
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
gnodet
left a comment
There was a problem hiding this comment.
Well-scoped CI optimization that adds paths: filters to avoid running the Windows launcher workflow on unrelated PRs, and fixes a shallow-clone fetch-depth issue causing spurious no merge base errors.
Key observations:
-
The
paths:filter patterns (tooling/camel-exe/**,dsl/camel-jbang/camel-launcher/**,.github/workflows/camel-launcher-windows.yml) are correctly aligned with the grep patterns inside thedetect-changesjob's shell script — the two filtering layers are consistent. -
Changing
fetch-depth: 50tofetch-depth: 0fixes the merge base error. The extra clone cost is negligible since (a) thepaths:filter means this workflow rarely triggers and (b) thedetect-changesrunner is lightweight (just doing a diff). Other workflows in the repo (check-container-versions.yml,sonar-scan.yml) also usefetch-depth: 0. -
Removing the
git fetch origin "${{ github.base_ref }}" --depth=1is correct —fetch-depth: 0already fetches all refs. -
workflow_dispatchcorrectly left withoutpaths:constraints, preserving manual trigger capability.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code review on behalf of @gnodet
oscerd
left a comment
There was a problem hiding this comment.
LGTM, and a useful one: scoping the Windows launcher check to paths: (tooling/camel-exe, dsl/camel-jbang/camel-launcher, and the workflow file) stops it running on unrelated PRs, and switching fetch-depth: 50 → 0 fixes the detect-changes step's fatal: origin/main...HEAD: no merge base error that's currently red on several unrelated PRs (e.g. #24712/#24714/#24715). Good cleanup.
Reviewed with Claude Code on behalf of Andrea Cosentino. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
Summary
Claude Code on behalf of davsclaus
The
camel-launcher-windows.ymlworkflow was triggering on every PR tomain, even when the PR did not touch any Windows/launcher-related files. Thedetect-changesjob then failed withfatal: origin/main...HEAD: no merge basedue to insufficient git history in the shallow clone, causing a spurious red check on unrelated PRs (e.g. PR #24712).Changes:
paths:filters to bothpushandpull_requesttriggers so the workflow only runs whentooling/camel-exe/,dsl/camel-jbang/camel-launcher/, or the workflow file itself are changeddetect-changesby usingfetch-depth: 0so the three-dot diff can find a merge base when the workflow does triggerTest plan
paths:filter prevents it at the GitHub level)workflow_dispatchstill runs both jobs unconditionallytooling/camel-exe/trigger only thecamel-exejobdsl/camel-jbang/camel-launcher/trigger thecamel-launcher-windowsjob🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com