godeps using seemingly invalid commit hash

Bug #1922150 reported by Kyle Fazzari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Triaged
Medium
Chris Patterson

Bug Description

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?

Kyle Fazzari (kyrofa)
description: updated
description: updated
description: updated
description: updated
description: updated
Kyle Fazzari (kyrofa)
description: updated
Changed in snapcraft:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Chris Patterson (cjp256)
Revision history for this message
Chris Patterson (cjp256) wrote :

Hey Kyle, can you try pinning the go-channel to 1.15/stable (or earlier)? IIRC go get's behavior changed in 1.16 - and the plugin was updated to default to 1.15/stable.

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Hey Chris, spot on, that worked for my CI anyway. Looks like Launchpad was fixed with https://github.com/snapcore/snapcraft/pull/3475 .

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.