Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: parameterize gadget snap channel #3117

Merged
merged 7 commits into from Apr 24, 2017

Conversation

fgimenez
Copy link
Contributor

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.

@pedronis
Copy link
Collaborator

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 :/

@pedronis
Copy link
Collaborator

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
Copy link
Contributor Author

@pedronis thanks, please take a look

Copy link
Contributor

@chipaca chipaca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks alright, with one nitpicky request, and a question

# download pc-kernel snap for the specified channel
snap download --channel="$KERNEL_CHANNEL" pc-kernel

EXTRA_FUNDAMENTAL='--extra-snaps '"$PWD"'/pc-kernel_*.snap'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

snap download --channel="$KERNEL_CHANNEL" pc-kernel

EXTRA_FUNDAMENTAL='--extra-snaps '"$PWD"'/pc-kernel_*.snap'
elif [ "$GADGET_CHANNEL" != edge ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants