bug: remote-build broke in snapcraft 8.0
Metadata
Current evaluation
Fixed by PR #4482, merged as commit 6300e0ee2: remote-build pushes now use the Git CLI instead of libgit2, avoiding SSL broken-pipe failures.
Resolution: closed resolved
Reason: PR #4482 replaced libgit2-based remote pushes with the Git CLI and was merged into main as commit 6300e0ee2, resolving the large-repository push failures reported in #4478.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
Remote build doesn't push.
Reverting back to 7.x fixes it.
### To Reproduce
```
git clone https://github.com/telegramdesktop/tdesktop
cd tdesktop
snapcraft remote-build
```
I expect it to push to launchpad and build. But this happens.
```
snapcraft remote-build
snapcraft remote-build is experimental and is subject to change - use with caution.
All data sent to remote builders will be publicly available. Are you sure you want to continue? [y/N]: y
No existing build found
If interrupted, resume with: 'snapcraft remote-build --recover --build-id snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587'
remote-build error: Git operation failed.aunchpad: https://popey:<token>@git.launchpad.net/~popey/+git/snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587/
Could not push 'HEAD' to 'https://popey:<token>@git.launchpad.net/~popey/+git/snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587/' with refspec 'refs/heads/dev:refs/heads/main' for the git repository in '/home/alan/.cache/snapcraft/remote-build/snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587/repo': SSL error: syscall failure: Broken pipe
Full execution log: '/home/alan/.local/state/snapcraft/log/snapcraft-20231205-101855.575700.log'
```
### Environment
snapcraft 8.0.0 on Ubuntu 23.10.
### snapcraft.yaml
```shell
https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml
```
### Relevant log output
```shell
Full log
2023-12-05 10:18:55.576 Starting Snapcraft 8.0.0
2023-12-05 10:18:55.577 snapcraft remote-build is experimental and is subject to change - use with caution.
2023-12-05 10:18:55.577 Emitter: Pausing control of the terminal
2023-12-05 10:18:57.021 Emitter: Resuming control of the terminal
2023-12-05 10:18:57.050 Got base 'core22' from 'snap/snapcraft.yaml'
2023-12-05 10:18:57.051 Running new remote-build because project is in a git repository
2023-12-05 10:18:57.051 Setting up launchpad environment
2023-12-05 10:18:57.083 Using project name 'telegram-desktop' from 'snap/snapcraft.yaml'
2023-12-05 10:18:57.625 Setting up launchpad environment.
2023-12-05 10:18:58.131 Looking for existing build
2023-12-05 10:18:58.183 No existing build found
2023-12-05 10:18:58.183 If interrupted, resume with: 'snapcraft remote-build --recover --build-id snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587'
2023-12-05 10:18:58.184 Starting build
2023-12-05 10:18:59.464 Cached project at /home/alan/.cache/snapcraft/remote-build/snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587/repo
2023-12-05 10:18:59.531 creating git repo: name=snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587, owner=/~popey, target=/~popey
2023-12-05 10:19:01.275 Sending build data to Launchpad: https://popey:<token>@git.launchpad.net/~popey/+git/snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587/
2023-12-05 10:19:01.276 Resolved reference 'refs/heads/dev' for name 'HEAD'
2023-12-05 10:19:01.276 Pushing 'HEAD' to remote 'https://popey:<token>@git.launchpad.net/~popey/+git/snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587/' with refspec 'refs/heads/dev:refs/heads/main'.
2023-12-05 10:21:13.897 remote-build error: Git operation failed.
Could not push 'HEAD' to 'https://popey:<token>@git.launchpad.net/~popey/+git/snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587/' with refspec 'refs/heads/dev:refs/heads/main' for the git repository in '/home/alan/.cache/snapcraft/remote-build/snapcraft-telegram-desktop-e070194130e7a78db0be5f0185c57587/repo': SSL error: syscall failure: Broken pipe
2023-12-05 10:21:13.898 Full execution log: '/home/alan/.local/state/snapcraft/log/snapcraft-20231205-101855.575700.log'
```
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by PR #4482, merged as commit 6300e0ee2: remote-build pushes now use the Git CLI instead of libgit2, avoiding SSL broken-pipe failures. | |
| stealth/space-bunny-alpha | — | closed resolved | Remote-build pushes were fixed in canonical/snapcraft#4482 (6300e0ee2), replacing libgit2 with the git CLI to avoid SSL broken-pipe failures. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned after investigation identified a libgit2 issue with large repositories causing SSL/broken pipe errors during remote builds. No fix was implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a documented fix after investigation into a libgit2 SSL error causing broken pipes during large repository pushes to Launchpad. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a fix. Investigation identified large repository size triggering libgit2 SSL errors during Launchpad pushes. No resolution was provided. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without a fix. Developers investigated the Git SSL broken pipe error and suspected it stemmed from large repository size and libgit2 limitations. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#4482
(confidence 100%)
Merged fix replacing libgit2 with git push; explicitly resolves snapcraft#4478.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4479 remote-build broken with shallow clones | snapcraft | closed | Fixed in Snapcraft 8.0.1 by PR #4498 (commit 1e285148e), which falls back to the legacy remote builder for shallow Git clones on core20/core22. | |
| #1973199 Temporary repo for snapcraft remote-build has no git tags | snapcraft (launchpad) | closed | Fixed in Snapcraft 8.0.0's new remote builder; PR #4482 added tag pushing in commit 21f6ad788, preserving Git-tag-based versioning. | |
| #5080 `snapcraft remote-build` succeeds even if the build fails | snapcraft | closed | Fixed in Snapcraft 8 by PR #4826 (commit 552897340), which makes remote-build fail when Launchpad produces no artifacts. | |
| #299 fix(remote-build): minor edge cases found with snapcraft | craft-application | merged | Merged PR #299 fixed Snapcraft-related remote-build edge cases in three files, landing as commit 15087962 after two approvals. | |
| #3648 cli: reintroduce remote-build and promote to snapcraft help | snapcraft | merged | Merged PR #3648 (commit 8dc1ac016), restoring remote-build and promote in Snapcraft's main CLI help for Launchpad bug #1943244. | |
| #5293 docs(release-notes): update remote-build notes | snapcraft | merged | Docs PR #5293 (commit 0c4335d6e) merged and removed the remote-build note from the 8.7 release notes, since #5265 was re-targeted to Snapcraft 8.8; 8.7.0/8.7.1 tags were unaffected. | |
| #5676 remote build: remove legacy remote builder | snapcraft | closed | Fixed in merged PR #5994 (commit b08f1a66e) for Snapcraft 9.0 by removing the legacy remote builder, selection logic, strategy env var, and legacy credential support. | |
| #4393 fix: add part in snapcraft.yaml to build libgit2 | snapcraft | merged | Merged PR #4393 (commit 5fbaab144) added a snapcraft.yaml part to build libgit2 from source and block wheel downloads, fixing #4379. | |
| #1663605 Local build fails due to missing build-dependency on git | snapcraft (launchpad) | closed | Fixed by PR snapcore/snapcraft#1137 (commit 8b3cb387d), adding git as a Debian build dependency so Git source tests run in sbuild. | |
| #3076 remote-build: fix case where build log url is None | snapcraft | merged | Merged in snapcraft#3076 (commit 2c1dfe63c), fixing remote-build handling when the build log URL is absent and adding unit coverage. |