perf(agent): a job fetches only the commits its clone doesn't have yet #42
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!42
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Beanstalk:perf/fetch-only-missing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Less load on the forge. The agent already keeps its clone of Longshot between jobs: it's made once and never evicted. But every job still fetched
mainand the PR's head from the forge, even when the clone already had the exact commits the ticket names. That happens on a retry, the same commit's other target, a re-run, or a second PR on the samemain.What changed
JobPipeline: main is fetched only when the ticket's base commit isn't in the clone yet, and the PR only when its head isn't. A commit the clone has, by its id, is that commit, so this is as safe as before: the ticket's signedshaandbase_shaare still checked against the clone (HasCommitAsync) right after.agent/README.mdsays the clone is kept and fetched into only for missing commits.For scale: Longshot's repository is 117 MB packed on the server. A new tester downloads it once. A fetch that is needed moves only the new commits.
Testing