Skip to content

CAMEL-24081: ci - Do not run Windows launcher check on unrelated PRs - #24718

Merged
davsclaus merged 1 commit into
mainfrom
fix/CAMEL-24081
Jul 15, 2026
Merged

CAMEL-24081: ci - Do not run Windows launcher check on unrelated PRs#24718
davsclaus merged 1 commit into
mainfrom
fix/CAMEL-24081

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

Summary

Claude Code on behalf of davsclaus

The camel-launcher-windows.yml workflow was triggering on every PR to main, even when the PR did not touch any Windows/launcher-related files. The detect-changes job then failed with fatal: origin/main...HEAD: no merge base due to insufficient git history in the shallow clone, causing a spurious red check on unrelated PRs (e.g. PR #24712).

Changes:

  • Add paths: filters to both push and pull_request triggers so the workflow only runs when tooling/camel-exe/, dsl/camel-jbang/camel-launcher/, or the workflow file itself are changed
  • Fix the shallow clone issue in detect-changes by using fetch-depth: 0 so the three-dot diff can find a merge base when the workflow does trigger

Test plan

  • Verify unrelated PRs no longer trigger the Windows workflow (the paths: filter prevents it at the GitHub level)
  • Verify workflow_dispatch still runs both jobs unconditionally
  • Verify PRs touching only tooling/camel-exe/ trigger only the camel-exe job
  • Verify PRs touching dsl/camel-jbang/camel-launcher/ trigger the camel-launcher-windows job

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

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

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 the detect-changes job's shell script — the two filtering layers are consistent.

  • Changing fetch-depth: 50 to fetch-depth: 0 fixes the merge base error. The extra clone cost is negligible since (a) the paths: filter means this workflow rarely triggers and (b) the detect-changes runner is lightweight (just doing a diff). Other workflows in the repo (check-container-versions.yml, sonar-scan.yml) also use fetch-depth: 0.

  • Removing the git fetch origin "${{ github.base_ref }}" --depth=1 is correct — fetch-depth: 0 already fetches all refs.

  • workflow_dispatch correctly left without paths: 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 oscerd 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.

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: 500 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants