fix(ci): pull --rebase before push in benchmark workflows#35
Open
fix(ci): pull --rebase before push in benchmark workflows#35
Conversation
…rejected pushes When multiple commits land on main in quick succession, both benchmark jobs check out at different points and then try to push new history files. The second push is rejected with "fetch first". Adding `git pull --rebase origin main` before `git push` lets the history JSON files (all uniquely named by timestamp+SHA) merge cleanly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates CI benchmark workflows to reduce git push rejections when multiple main-branch benchmark runs try to commit benchmark history around the same time.
Changes:
- Add
git pull --rebase origin mainbeforegit pushin the existing Benchmark workflow. - Add a new Android benchmark workflow that runs instrumented benchmarks, writes a JSON summary to
benchmarks/android-history/, and commits it onmain. - Post PR comments comparing current benchmark results to a baseline history entry.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/benchmark.yml | Pull/rebase before pushing benchmark history to reduce push rejections. |
| .github/workflows/android-benchmark.yml | New workflow to run Android benchmarks, generate/commit history, and comment results on PRs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
101
to
103
| git diff --cached --quiet || git commit -m "chore(bench): benchmark summary ${{ github.sha }}" | ||
| git pull --rebase origin main | ||
| git push |
| android-benchmark: | ||
| name: Android Instrumented Benchmark | ||
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.draft == false |
Comment on lines
+117
to
+119
| git pull --rebase origin main | ||
| git push | ||
|
|
Adds a realistic large-library benchmark config matching ~10,000-page personal knowledge graphs: - XLARGE preset: 10,000 pages, 730 journals, 30% link density - Hub pages (5% of all pages): 15× more likely to be linked to, contain 3× more blocks with 2.5× higher outgoing link density — models heavily-referenced index/MOC pages that accumulate hundreds of backlinks in real libraries - Pre-built weighted link pool replaces per-block allPages.shuffled() call (O(1) vs O(n) sampling — critical at 10k-page scale) - jvmTestProfile task now defaults to XLARGE via benchConfig project property; override locally with -PbenchConfig=SMALL for quick runs - CI benchmark job timeout raised to 30 min to accommodate larger load Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Target is 2× an actual ~10k-page / 6-year personal library so benchmarks stay ahead of current reality: - Pages: 10k → 20k - Journals: 730 → 4380 (6 years of daily entries × 2) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
Summary
benchmark.ymlandandroid-benchmark.ymlfailed on main-branch pushes witherror: failed to push some refs— the push was rejected because another commit landed onmainbetween checkout and pushgit pull --rebase origin mainbeforegit pushin both workflows<timestamp>_<sha>.json), so the rebase never conflictsRoot cause
The two benchmark workflows both run on every push to
mainand commit a new JSON file tobenchmarks/history/orbenchmarks/android-history/. When commits land close together, the second push is rejected because the remote already has work the runner hasn't seen yet.Test plan