bk: run faster builds#7029
Merged
Merged
Conversation
swiatekm
approved these changes
May 14, 2026
Member
|
I'm seeing failures on release branches with these changes. 8.19: https://buildkite.com/elastic/fleet-server/builds/14673#019e2730-cdad-4a6d-ac05-4d6f0be82c9f Do we need to backport to the other active branches? |
1 task
Member
Author
|
We can revert this change, I tested on main manually and it worked fine: In theory those changes are only for the initial pipeline. Don't need to be backported at all, the catalog info file is honoured only for the main branch. Maybe I missed something else to test this out. So worthy to revert it in my opinion |
Member
|
@ycombinator has a fix here: #7037 |
ycombinator
added a commit
that referenced
this pull request
May 14, 2026
* fix(ci): unshallow repo before merge in post-checkout hook The sparse-checkout Buildkite plugin (added in #7029) creates a shallow clone with only a few hundred objects — enough for the pipeline files but without the full commit-ancestry chain. When the post-checkout hook then fetches the target branch and calls `git merge "${BUILDKITE_COMMIT}"`, git cannot walk back to a common ancestor and fails with "refusing to merge unrelated histories". Unshallow the repository before the merge so that git can resolve the merge base correctly. The `--depth=2147483647` fallback handles agents where the clone was not recorded as shallow by git. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * drop unnecessary depth fallback in post-checkout unshallow If --unshallow fails the clone is not shallow, meaning full history is already present and the fallback fetch would be a no-op anyway. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
4 tasks
ycombinator
added a commit
that referenced
this pull request
May 15, 2026
…7039) The fleet-server-tests and perf-tests pipelines are triggered by external systems (quality gate, performance testing) that supply a short commit SHA as BUILDKITE_COMMIT. The sparse-checkout plugin tries to fetch that SHA via `git fetch origin <sha>`, but GitHub's git protocol only accepts full 40-char SHAs, causing the fetch to fail with "couldn't find remote ref". Neither pipeline uses fleet-server source code (fleet-server-tests runs quality gate tests against cloud deployments; perf-tests triggers performance benchmarks), so sparse checkout provides no benefit. Remove it from both. Follow-up to #7029. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
ebeahan
added a commit
that referenced
this pull request
May 20, 2026
* Revert "bk: run faster builds (#7029)" This reverts commit ded8d0a. * Revert "fix(ci): unshallow repo before merge in post-checkout hook (#7037)" This reverts commit 76e5002. --------- Co-authored-by: ebeahan <eric.beahan@elastic.co> Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com>
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.
What is the problem this PR solves?
Checkout faster when running the loading bk pipeline defined in the catalog-info
How does this PR solve the problem?
Using the spare checkout for the .buildkite folder and the .go-version file
How to test this PR locally
CI
Design Checklist
Checklist
./changelog/fragmentsusing the changelog toolRelated issues