tests: parameterize gadget snap channel #3117

Merged
merged 7 commits into from Apr 24, 2017

Conversation

Projects
None yet
5 participants
Contributor

fgimenez commented Mar 31, 2017

This will allow us to create spread-cron branches to watch the promotions of the gadget snap and trigger spread executions when changes are detected.

Contributor

pedronis commented Mar 31, 2017

I find this problematic because at this point we aren't using the asserted firstboot installation path for anything, we should really fix ubuntu-image to support per snap channels :/

Contributor

pedronis commented Mar 31, 2017

as I proposed in standup what we could do is use ubuntu-image --channel=...
directly and not "snap download"
if all CHANNEL env var are the same

fgimenez added some commits Mar 31, 2017

Contributor

fgimenez commented Mar 31, 2017

@pedronis thanks, please take a look

zyga added some commits Apr 4, 2017

Looks alright, with one nitpicky request, and a question

tests/lib/prepare.sh
+ # download pc-kernel snap for the specified channel
+ snap download --channel="$KERNEL_CHANNEL" pc-kernel
+
+ EXTRA_FUNDAMENTAL='--extra-snaps '"$PWD"'/pc-kernel_*.snap'
@chipaca

chipaca Apr 24, 2017

Member

the quoting shenanigans going on here are valid, but best reserved for when they're needed. Here they're not: can you rewrite these like

EXTRA_FUNDAMENTAL="--extra-snaps $PWD/pc-kernel_*.snap"

?

@fgimenez

fgimenez Apr 24, 2017

Contributor

Done, thanks!

tests/lib/prepare.sh
+ snap download --channel="$KERNEL_CHANNEL" pc-kernel
+
+ EXTRA_FUNDAMENTAL='--extra-snaps '"$PWD"'/pc-kernel_*.snap'
+ elif [ "$GADGET_CHANNEL" != edge ]; then
@chipaca

chipaca Apr 24, 2017

Member

am I wrong in understanding that this means you can't have both gadget and kernel set to non-edge unless they're both set to the same thing, otherwise the gadget gets forced to edge? Is that intended?

@fgimenez

fgimenez Apr 24, 2017

Contributor

Yes, this is meant to be used from spread-cron after detecting a new fundamental snap has been promoted to any of the channels, only one of them should be different from the default image channel (currently edge).

fgimenez added some commits Apr 24, 2017

Contributor

fgimenez commented Apr 24, 2017

@chipaca pls take another look, with the same premises i've updated the case(s) when kernel and gadget have different channels so that the gadget channel is not forced, also the gadget snap is never downloaded (aiming to address @pedronis concerns).

@niemeyer niemeyer merged commit 40fa690 into snapcore:master Apr 24, 2017

1 of 6 checks passed

xenial-amd64 autopkgtest finished (failure)
Details
xenial-i386 autopkgtest finished (failure)
Details
xenial-ppc64el autopkgtest finished (failure)
Details
yakkety-amd64 autopkgtest finished (failure)
Details
zesty-amd64 autopkgtest finished (failure)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment