← Back to issue list

The `go` build-snap doesn't install the requested go version

View original Github issue

Metadata

Project
rockcraft
Number
#128
Type
issue
State
closed
Author
gruyaume
Labels
—
Created
Updated
Closed

Current evaluation

Reported that the `go` build-snap always installed Go 1.19 from the implicit `pebble` part, ignoring the requested version. Fixed by PR #144 (commit 54f5c2b1), which builds Pebble with an isolated Go.

Resolution: closed resolved

Reason: Root cause was the implicit `pebble` part pulling go/1.19 alongside user build-snaps. PR #144 "project: use isolated go to build pebble" was merged in commit 54f5c2b1, so requested go build-snap versions are now honoured, and maintainer sergiusens closed the issue citing #144.

Evaluated by: mr-cal-bot

No scores available.

Issue body

**Description** Using the `go` build-snap doesn't allow for using the specified go version. The go version installed is always 1.19. **Example** rockcraft.yaml: ```yaml golang: plugin: nil build-snaps: - go/1.13/stable override-build: | set -x go version craftctl default go version ``` Execution output: ``` guillaume@thinkpad:~/PycharmProjects/magma-controller-rock$ rockcraft pack -v Starting Rockcraft 0.0.1.dev1 Logging execution to '/home/guillaume/.cache/rockcraft/log/rockcraft-20221013-170003.209576.log' Launching instance... Starting Rockcraft 0.0.1.dev1 Logging execution to '/tmp/rockcraft.log' Retrieving base ubuntu:18.04 Retrieved base ubuntu:18.04 for amd64 Extracting ubuntu:18.04 Extracted ubuntu:18.04 Initializing parts lifecycle Executing parts lifecycle Executing parts lifecycle: pull golang Executing action Executed: pull golang Executing parts lifecycle: skip pull pebble (already ran) Executing action Executed: skip pull pebble (already ran) Executing parts lifecycle: overlay golang Executing action Executed: overlay golang Executing parts lifecycle: reapply pebble (previous layer changed) Executing action Executed: reapply pebble (previous layer changed) Executing parts lifecycle: build golang Executing action :: + set -x :: + go version :: go version go1.19 linux/amd64 :: + craftctl default :: + go version :: go version go1.19 linux/amd64 ``` **Workaround** Add snap commands as an override-build that will switch the go version ``` snap switch go --channel=1.12/stable snap refresh go ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Reported that the `go` build-snap always installed Go 1.19 from the implicit `pebble` part, ignoring the requested version. Fixed by PR #144 (commit 54f5c2b1), which builds Pebble with an isolated Go.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #144 (54f5c2b1): Rockcraft now builds Pebble with isolated Go, so requested Go build-snap versions are honored instead of always using 1.19.
stealth/space-bunny-alpha — closed resolved Fixed in canonical/rockcraft#144 (commit 54f5c2b1), which built Pebble with isolated Go so the requested Go build-snap version was honored.
qwen/qwen3.6-35b-a3b — — Fixed in PR #144. The go build-snap version was incorrectly overridden by the pebble implicit part forcing go 1.19. The update resolves the build-snap installation logic to correctly apply the requested Go version.
qwen/qwen3.6-35b-a3b — — Fixed a bug where the pebble implicit part overrode custom go build-snap versions. The issue was closed after PR #144 implemented a fix to correctly isolate build-snap installations per part.
qwen/qwen3.6-35b-a3b — — User-specified Go versions in build-snaps were overridden by the pebble implicit part. The issue was closed after being fixed in pull request #144, which corrected the snap installation logic to properly respect requested channel versions.
qwen3.6-35b-a3b-mtp-q6 — — The pebble implicit part overriding specified go build-snap channels was resolved. The issue was closed after the fix was merged in pull request #144.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/rockcraft#144 (confidence 97%)

    Merged PR that switched pebble to an isolated Go build, referenced by the closing maintainer comment.

Related issues

Issue Project State Summary Similarity
#144 project: use isolated go to build pebble rockcraft merged Merged PR #144 in commit 54f5c2b1, switching Pebble builds to isolated Go so requested Go build-snap versions are honored; fixed rockcraft#128.
76%