You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make rockcraft automatically detect when parts need different versions of the same build-snaps and either snap refresh said snaps between the parts, or at the very least give the user a clear warning it's not going to work as expected.
Why it needs to get done
Having two separate parts needing differing versions of the same build-snaps during the build stage is very reasonable.
The canonical/trivy-adapter ROCK for example builds both trivy and a separate trivy-adapter-photon binary with different Go versions.
You can reproduce the issue using this sample file:
# cat rockcraft.yaml name: go-snap-parts-version-testsummary: Test image to showcase snap parts issue.description: Test image to showcase snap parts issue.version: v1.0.0license: Apache-2.0base: [email protected]build-base: [email protected]platforms:
amd64:
# arm64:services:
sleep:
command: sleep infoverride: replacestartup: enabledparts:
go118:
plugin: gobuild-snaps:
- go/1.18/stablesource: https://github.com/canonical/rockcraftsource-type: gitsource-tag: 1.5.3source-depth: 1override-build: | go versiongo121:
plugin: gobuild-snaps:
- go/1.21/stablesource: https://github.com/canonical/rockcraftsource-type: gitsource-tag: 1.5.3source-depth: 1override-build: | go version
Running rockcraft pack yields the following:
$ rockcraft pack --verbose --debug
Starting rockcraft, version 1.5.3
[...]
Building go118
:: + go version
:: go version go1.18.10 linux/amd64
Building go121
:: + go version
:: go version go1.18.10 linux/amd64
[...]
What needs to get done
Make
rockcraft
automatically detect when parts need different versions of the samebuild-snaps
and eithersnap refresh
said snaps between the parts, or at the very least give the user a clear warning it's not going to work as expected.Why it needs to get done
Having two separate parts needing differing versions of the same
build-snaps
during the build stage is very reasonable.The
canonical/trivy-adapter
ROCK for example builds bothtrivy
and a separatetrivy-adapter-photon
binary with different Go versions.You can reproduce the issue using this sample file:
Running
rockcraft pack
yields the following:The only current solution available is manually
snap refresh
-ing the packages inoverride-build
, which is not ideal...The text was updated successfully, but these errors were encountered: