You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "apupier (via GitHub)" <gi...@apache.org> on 2026/09/03 12:41:03 UTC
[PR] [DO NOT MERGE] Reduce git fetch time for scalpel in GitHub actions [camel]
apupier opened a new pull request, #26088:
URL: https://github.com/apache/camel/pull/26088
currently it takes almost 5 minutes. it seems that the `git fetch --deepen=50` is fetching last 50 commits of all tags and branches. We only need from the base branch.
Locally, it goes from around 5 minutes to few seconds.
# Description
<!--
- Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
-->
# Target
- [ ] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch)
# Tracking
- [ ] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).
<!--
# *Note*: trivial changes like, typos, minor documentation fixes and other small items do not require a JIRA issue. In this case your pull request should address just this issue, without pulling in other changes.
-->
# Apache Camel coding standards and style
- [ ] I checked that each commit in the pull request has a meaningful subject line and body.
<!--
If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
-->
- [ ] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes.
<!--
You can run the aforementioned command in your module so that the build auto-formats your code. This will also be verified as part of the checks and your PR may be rejected if if there are uncommited changes after running `mvn clean install -DskipTests`.
You can learn more about the contribution guidelines at https://github.com/apache/camel/blob/main/CONTRIBUTING.md
-->
# AI-assisted contributions
- [ ] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [DO NOT MERGE] Reduce git fetch time for scalpel in GitHub actions [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26088:
URL: https://github.com/apache/camel/pull/26088#issuecomment-5525935679
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: 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](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [DO NOT MERGE] Reduce git fetch time for scalpel in GitHub actions [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #26088:
URL: https://github.com/apache/camel/pull/26088#discussion_r3925335439
##########
.github/workflows/pr-build-main.yml:
##########
@@ -92,7 +93,7 @@ jobs:
# Scalpel is observational — fetch failures must not break the build.
BASE_REF="${GITHUB_BASE_REF:-main}"
for depth in 50 200 1000; do
- git fetch --deepen=$depth 2>/dev/null || true
+ git fetch --no-tags --deepen=$depth origin ${BASE_REF} 2>/dev/null || true
Review Comment:
Is it the base_ref or the target pull_request branch that we would like to compare?
@gnodet ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [DO NOT MERGE] Reduce git fetch time for scalpel in GitHub actions [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #26088:
URL: https://github.com/apache/camel/pull/26088#discussion_r3925370225
##########
.github/workflows/pr-build-main.yml:
##########
@@ -92,7 +93,7 @@ jobs:
# Scalpel is observational — fetch failures must not break the build.
BASE_REF="${GITHUB_BASE_REF:-main}"
for depth in 50 200 1000; do
- git fetch --deepen=$depth 2>/dev/null || true
+ git fetch --no-tags --deepen=$depth origin ${BASE_REF} 2>/dev/null || true
Review Comment:
(note that ${BASE_REF} is not working)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Reduce git fetch time for scalpel in GitHub actions [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #26088:
URL: https://github.com/apache/camel/pull/26088#issuecomment-5760270974
> One observation while checking this, not caused by the PR but worth a follow-up: on a current fork PR to `main` (#26628, run 35526400154, `build (25)`), the existing step takes ~7 minutes (4:48 for the first `--deepen=50` alone), goes through 50 → 200 → 1000 → full history, never finds a merge base, and Scalpel silently does not run. So for fork PRs - most contributor PRs - this step is currently pure cost. This change makes that path much cheaper but does not fix it; my guess is that the PR head commits (`refs/pull/N/head`) are never fetched, so `merge-base` on the merge commit cannot resolve. Fetching `refs/pull/${{ github.event.pull_request.number }}/head` at the same depth next to the base fetch would likely make Scalpel work for fork PRs too.
effectively something to look more closely.
Sounds when it is both on a fork and not upt to date with main branch because the next build of it also on same fork found it in 50 iteration https://github.com/apache/camel/actions/runs/35579824514/job/106270040485#step:3:23
reported https://issues.apache.org/jira/browse/CAMEL-24876 to handle it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [DO NOT MERGE] Reduce git fetch time for scalpel in GitHub actions [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #26088:
URL: https://github.com/apache/camel/pull/26088#discussion_r3925335439
##########
.github/workflows/pr-build-main.yml:
##########
@@ -92,7 +93,7 @@ jobs:
# Scalpel is observational — fetch failures must not break the build.
BASE_REF="${GITHUB_BASE_REF:-main}"
for depth in 50 200 1000; do
- git fetch --deepen=$depth 2>/dev/null || true
+ git fetch --no-tags --deepen=$depth origin ${BASE_REF} 2>/dev/null || true
Review Comment:
Is it the base_ref or the target pull_request branch (so here main) that we would like to compare?
@gnodet ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [DO NOT MERGE] Reduce git fetch time for scalpel in GitHub actions [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #26088:
URL: https://github.com/apache/camel/pull/26088#discussion_r4047310753
##########
.github/workflows/pr-build-main.yml:
##########
@@ -92,7 +93,7 @@ jobs:
# Scalpel is observational — fetch failures must not break the build.
BASE_REF="${GITHUB_BASE_REF:-main}"
for depth in 50 200 1000; do
- git fetch --deepen=$depth 2>/dev/null || true
+ git fetch --no-tags --deepen=$depth origin ${BASE_REF} 2>/dev/null || true
Review Comment:
after a rebase on latest and a closer look, it is working, at least for the tested configuration https://github.com/apache/camel/actions/runs/35351592438/job/105620780193?pr=26092#step:3:23
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [DO NOT MERGE] Reduce git fetch time for scalpel in GitHub actions [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #26088:
URL: https://github.com/apache/camel/pull/26088#issuecomment-5731470537
seems to be working fine https://github.com/apache/camel/pull/26092
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [DO NOT MERGE] Reduce git fetch time for scalpel in GitHub actions [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #26088:
URL: https://github.com/apache/camel/pull/26088#issuecomment-5525917712
need to validate on CI with the variables that it works fine
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Reduce git fetch time for scalpel in GitHub actions [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier merged PR #26088:
URL: https://github.com/apache/camel/pull/26088
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org