← Back to issue list

launchpad builder won't clone one of three identical repos

View original Github issue

Metadata

Project
craft-parts
Number
#788
Type
issue
State
open
Author
popey
Labels
Created
Updated
Closed

Current evaluation

Launchpad remote build fails to git clone anchore/grype while identical syft/grant repos succeed. Root cause: grype's .gitmodules uses an SSH URL, which fails in Launchpad's keyless environment. Reporter confirmed. Tarball workaround works.

Suggested action: close not a bug

Reason: Maintainer @dariuszd21 identified the root cause: grype's .gitmodules uses an SSH URL, and `git clone --recursive` fails in Launchpad's keyless environment. The reporter agreed ('this is likely going to be the quick fix') and confirmed a tarball workaround works. The behavior is working as intended — the fix is on the upstream repo/user side, not in craft-parts. The related error-messaging improvement is tracked separately in craft-parts#821 (moved to Jira CRAFT-3273).

Impact: 20 Quick Win: 16.0 Staleness: 75 Complexity: 20 Confidence: 75 Support Request: 45

Issue body

### Bug Description I am making a prototype of three snaps of [syft](https://github.com/anchore/syft), [grype](https://github.com/anchore/grype), and [grant](https://github.com/anchore/grant). They all use the same yaml, and come from the same org on GitHub. Syft and Grant clone and start building fine. Grype is unable to be cloned. ### To Reproduce Use the yaml below, start a remote build. It will fail. ### part yaml ```shell name: grype base: core22 version: 'v0.79.3' summary: Vulnerability scanner description: | CLI vulnerability scanner for container images and filesystems architectures: - build-on: amd64 - build-on: arm64 - build-on: armhf - build-on: s390x - build-on: ppc64el grade: stable confinement: classic parts: grype: plugin: go source: https://github.com/anchore/grype.git source-type: git source-tag: 'v0.79.3' build-snaps: - go apps: grype: command: bin/grype ``` ### Relevant log output ```shell Running pull phase... Initializing parts lifecycle Installing build-packages Installing build-snaps Pulling grype [19/Jul/2024:14:13:48 +0000] "CONNECT github.com:443 HTTP/1.1" 200 5117550 "-" "git/2.34.1" Failed to pull source: command ['git', 'clone', '--recursive', '--branch', 'v0.79.3', 'https://github.com/anchore/grype.git', '/build/snapcraft-grype-4b4eef8795d90369d120d00672377f51/parts/grype/src'] exited with code 1. Make sure sources are correctly specified. Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20240719-141338.341400.log' Build failed Traceback (most recent call last): File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 323, in run self.pull() File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 261, in pull self.run_build_command( File "/usr/lib/python3/dist-packages/lpbuildd/target/operation.py", line 62, in run_build_command return self.backend.run(args, cwd=cwd, env=full_env, **kwargs) File "/usr/lib/python3/dist-packages/lpbuildd/target/lxd.py", line 718, in run subprocess.check_call(cmd, **kwargs) File "/usr/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['lxc', 'exec', 'lp-jammy-ppc64el', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/lpbuildd-git-proxy', '--env', 'SNAPPY_STORE_NO_CDN=1', '--env', 'SNAPCRAFT_LOCAL_SOURCES=1', '--env', 'SNAPCRAFT_SETUP_CORE=1', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-90687766", "build-request-timestamp": "2024-07-19T14:10:46Z", "build_url": "https://launchpad.net/~popey/popey-craft-remote-build/+snap/snapcraft-grype-4b4eef8795d90369d120d00672377f51/+build/2546651"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--', '/bin/sh', '-c', 'cd /build/snapcraft-grype-4b4eef8795d90369d120d00672377f51 && linux64 snapcraft pull']' returned non-zero exit status 1. Revoking proxy token... RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=jammy --arch=ppc64el SNAPBUILD-2546651 Scanning for processes to kill in build SNAPBUILD-2546651 ``` ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 16.0
Staleness: 75
Complexity: 20
Confidence: 75
Support Request: 45
close not a bug Launchpad remote build fails to git clone anchore/grype while identical syft/grant repos succeed. Root cause: grype's .gitmodules uses an SSH URL, which fails in Launchpad's keyless environment. Reporter confirmed. Tarball workaround works.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 15
Confidence: 95
Support Request: 95
close not a bug Launchpad builder fails to recursively clone a repo due to missing SSH keys in the environment. Reporter acknowledged an HTTPS submodule URL workaround. Issue is inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 25
Confidence: 80
Support Request: 10
close stale Launchpad snapcraft build fails to clone grype repo due to git submodule SSH URL mismatch. Root cause identified, workaround suggested, but issue has been inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 20
Confidence: 90
Support Request: 30
close stale Launchpad builder fails to clone the grype repository because a submodule uses an SSH URL, which lacks authentication in the build environment. Root cause identified; switching to HTTPS is the proposed fix. Issue remains open.

Update history

No update history recorded yet.

Related work

  • Related To: craft-parts#821 (confidence 90%)

    Referenced by @lengau in comments as a means to get better git error messaging to isolate this problem. Closed and moved to internal Jira CRAFT-3273; git output logging improvements remain unimplemented.

Related issues

No related issues found above the similarity threshold.