← Back to issue list

godeps using seemingly invalid commit hash

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1922150
Type
issue
State
closed
Author
~kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged snapcore/snapcraft#3475 (commit a6dfe1cd2), which defaulted the unmaintained godeps plugin to Go 1.15/stable; the reporter confirmed the workaround restored CI.

Resolution: closed resolved

Reason: PR #3475 was merged as a6dfe1cd2 and changed the plugin's default Go channel to 1.15/stable, avoiding the Go 1.16 go get behavior that caused the dependency checkout failure. The reporter confirmed that this resolved the failure.

Evaluated by: mr-cal-bot

No scores available.

Issue body

My CI has been failing for a while with a confusing error when building a godeps part: Pulling mdns-publisher + snapcraftctl pull Cloning into '/home/circleci/nextcloud-snap/parts/mdns-publisher/src'... remote: Enumerating objects: 163, done. remote: Total 163 (delta 0), reused 0 (delta 0), pack-reused 163 Receiving objects: 100% (163/163), 44.12 KiB | 2.10 MiB/s, done. Resolving deltas: 100% (82/82), done. Fetching godeps... go get -d github.com/rogpeppe/godeps go: downloading github.com/rogpeppe/godeps v0.0.0-20180524172459-404a7e748cd3 go: downloading github.com/kisielk/gotool v1.0.0 go: downloading github.com/pelletier/go-toml v1.8.1 go: downloading golang.org/x/tools v0.1.0 go: downloading golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 git checkout 4e9e0ee19b60b13eb79915933f44d8ed5f268bdd fatal: reference is not a tree: 4e9e0ee19b60b13eb79915933f44d8ed5f268bdd Failed to run 'git checkout 4e9e0ee19b60b13eb79915933f44d8ed5f268bdd' for 'mdns-publisher': Exited with code 128. Verify that the part is using the correct parameters and try again. Exited with code exit status 2 Huh. That commit isn't anywhere in my project or my dependencies. Turns out it's actually in the godeps plugin itself, when it's trying to checkout go-toml:     https://github.com/snapcore/snapcraft/blob/a6dfe1cd2c0457ea48940cbec84762e91bce4edb/snapcraft/plugins/v1/godeps.py#L134 It looks like that commit hash may no longer exist. This seems like a rather fragile way to do things, but we must have done it for a reason I don't understand. Is it something we can improve upon?

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged snapcore/snapcraft#3475 (commit a6dfe1cd2), which defaulted the unmaintained godeps plugin to Go 1.15/stable; the reporter confirmed the workaround restored CI.
stealth/space-bunny-alpha — closed resolved Launchpad CI failures were resolved by PR #3475 (commit a6dfe1cd2), which defaulted the legacy godeps plugin to Go 1.15 because Go 1.16 changed go get behavior.
stealth/space-bunny-alpha — closed resolved Addressed by defaulting the v1 godeps plugin to Go 1.15/stable in merged PR #3475 (a6dfe1cd2), avoiding newer Go module-mode fetches that omitted the pinned go-toml commit's history.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The hardcoded commit hash in the godeps plugin causing checkout failures was not addressed, likely abandoned or superseded by newer plugin versions.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Reports a failing git checkout due to an invalid commit hash in the snapcraft godeps plugin. Unlabeled, no maintainer response, and over five years old.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 30
Confidence: 85
Support Request: 5
close stale CI failure in snapcraft's godeps plugin due to an invalid commit hash for go-toml. Unlabeled, no maintainer response, inactive for over 5 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 50
Confidence: 85
Support Request: 10
needs triage The snapcraft godeps plugin uses a hardcoded, likely invalid commit hash for go-toml, causing git checkout failures. Untriaged with no maintainer response after over five years.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#3475 (confidence 99%)

    Merged commit a6dfe1cd2 defaulted the godeps plugin to Go 1.15/stable for compatibility with its pinned dependencies.

Related issues

Issue Project State Summary Similarity
#691 Add godeps plugin. snapcraft merged Godeps plugin merged into snapcraft via commit a073503c0 (PR #691), adding Go godeps dependency support and resolving LP bug #1595981; later enhanced by follow-up PRs.
78%
#1595981 Need a godeps plugin snapcraft (launchpad) closed Godeps plugin support was merged in snapcore/snapcraft#691 via commit a073503c0.
76%
#1671546 godeps plugin does not installing the git package by itself snapcraft (launchpad) closed Fixed in snapcore/snapcraft#1179, merged as commit 10c46b8ad; the godeps plugin now adds git to build-packages.
75%
#1748202 go plugin doesn't honor godeps file snapcraft (launchpad) closed Closed after a maintainer explained that Snapcraft's dedicated godeps plugin must be used; the go plugin does not consume versions from a Godeps file.
75%
#1794784 Update the godeps plugin to be base aware snapcraft (launchpad) closed Godeps gained base support through snapcore/snapcraft PR #2328, implemented by commit e1393815d.
73%
#1179 godeps plugin: add git to build-packages snapcraft merged Merged in canonical/snapcraft#1179 via commit 10c46b8ad, adding git to the godeps plugin’s build-packages so its go get invocation can complete.
72%
#3475 godeps: set default channel to 1.15/stable snapcraft merged Merged #3475 as a6dfe1cd2, defaulting the unmaintained godeps plugin to Go 1.15/stable to avoid incompatibility with Go 1.16.
72%
#1650624 Update godeps plugin to use get_pull_properties snapcraft (launchpad) closed Godeps was refactored to use get_pull_properties() with updated tests; merged via snapcore/snapcraft#1000 at commit 9b8303005.
72%
#3431 godeps spread test: use latest/stable go snap snapcraft merged Merged PR #3431 as commit f21a0132a, updating godeps spread tests to use the latest/stable Go snap instead of Xenial's Go 1.6.
71%
#1657212 Godeps plugin support to build only needed binaries snapcraft (launchpad) closed Godeps gained go-packages support to build selected binaries via snapcore/snapcraft PR #1057, merged as commit 81f56fd13.
71%