Skip to content

Bundle transport still fails in shallow checkout: git fetch rejects bundle prerequisites #31600

@mrjf

Description

@mrjf

Problem

#31346 fixed the git merge --ff-only "unrelated histories" error by switching to a direct ref update, but the failure now happens earlier — git fetch <bundle> itself rejects the bundle because the depth-1 clone is missing prerequisite commits.

[command]/usr/bin/git fetch /tmp/gh-aw/aw-autoloop-perf-comparison.bundle \
  refs/heads/autoloop/perf-comparison:refs/heads/autoloop/perf-comparison
error: Repository lacks these prerequisite commits:
error: 466842b1f487366ad12921b8b64e8a846c347a34 
error: 3810dc016756c2078e074f888fa39cbdc75d7fa8 
error: e3a6fedc02d2c59e24bd99b5dcc0d25b59209280 
error: e17a9c5ab062a55c816044a50b78197c364221d1 
##[error]Failed to apply bundle: The process '/usr/bin/git' failed with exit code 1

The safe_outputs job checks out with fetch-depth: 1. The bundle contains objects whose parents aren't in the shallow clone, so git refuses to fetch it.

Fix options

  1. git fetch --unshallow before fetching the bundle
  2. Deepen the clone to include the bundle's prerequisites (git fetch --deepen=N)
  3. Generate bundles without prerequisites — use git bundle create --all or include enough basis objects so the bundle is self-contained
  4. Skip the bundle for create_pull_request — use the GitHub API to push the branch directly (the bundle transport was designed for push_to_pull_request_branch, but this failure is happening on create_pull_request too)

Impact

All autoloop programs on githubnext/tsessebe are blocked. v0.74.0 is deployed with #31346 but every run still fails.

Example

Related

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions