canonical / docker-snap

https://snapcraft.io/docker
MIT License
53 stars 27 forks source link

Upgrade snap base to core20 #65

Closed BenD10 closed 1 year ago

BenD10 commented 2 years ago

Continuing the discussion from the closed issue #15.

It seems the main hesitation remaining is dropping support for i386, however:

There doesn't seem to be much compelling evidence to continue supporting this platform.

core22 will be released at some point this year as well, but likely not a target for this snap for some time.

tianon commented 2 years ago

It's a little confusing that the architecture is called "i386" in Debian and Ubuntu, but it's really i686 (there are some historical reasons for this that aren't really worth detailing here).

There doesn't seem to be much compelling evidence to continue supporting this platform.

The reason I support x86 32bit images everywhere I can is because it's a much easier way to test for basic multi-architecture issues in a way that's natively available to just about everyone (if they're on an amd64 machine). For example, i386 image builds can be tested in GitHub Actions with decent performance, unlike arm64 or other architectures.

Unfortunately, this doesn't hold true for building Snaps, but I think that's not an insurmountable issue (see #29 for where I tried setting up something around that).

tianon commented 2 years ago

I'd also love to start collecting a list of compelling reasons to update -- beyond just "less duplication of bases" what are the benefits, especially while core18 is still actively supported?

tianon commented 2 years ago

On the i386 point, we have a full order of magnitude more (metrics reporting) i386 users than either of ppc64el or s390x (which are both double digits and i386 is triple).

jocado commented 1 year ago

I would be in favour of using a more recent base.

For Ubuntu Core install images, it's safest to include all the required bases [ in case of internet access issues, and to ensure a more predictable install result ]. Having to include more bases makes the UC images larger.

Most other snaps tend to keep with the curve a bit more. In our particular scenario we only require core18 for docker now.

Keeping up with core release is more of a Continual Delivery approach, vs a future "big bang" change.

Worth considering that at some point core18 will be unsupported I presume. 18.04 will be EOL next year I believe. I doubt core18 will be unsupported at that point, but Canonical won't want to support it indefinitely.

jocado commented 1 year ago

Hi @tianon :wave:

Regarding reasons to update the base, I have a use case would seem to require it. I would like to add NVIDIA support. Please see issue, conversation and initial PR here:

I had a go at switching to the core22 base. The actual snapcraft changes changes required seem fairly minimal. Please see this diff for the specifics:

What do you think ?

tianon commented 1 year ago

I'm going to cross my fingers and hope @xnox and/or @zhsj have some opinions/thoughts they're willing to share (probably a lot of overlap with what xnox has already put into the other threads but maybe slightly more specific about switching the base here with some of my concerns above and perhaps better ideas about how to address them or better context about whether they even matter). :bow: :+1:

xnox commented 1 year ago

i feel like creating a track for the current version of the snap, and leave it frozen at current revisions, and effectively remain as is, with base:core18 and all the legacy tooling in place.

The latest track should move on with times, and upgrade to core22 base, drop i386, gain riscv64, and move on with times.

This will include dropping upstream obsolete tooling.

In terms of users, the vast majority are on amd64 and the are roughly split between core20 and core22 users anyway based on other system atributes visible in the store. The snap users on Ubuntu Core 16 and 18 are a minority.

W.r.t. testing multi-arch support, testing arm64 things is trivial for most people (i have arm64 ubuntu thinkpad laptop, whilst general public can access free arm64 instances in oracle cloud, or use arm64 instances in azure / gcp / aws as well). i386 is legacy, arm64 & riscv64 are the future.

And yes, I do not wish to introduce CUDA support on core18 based snaps, like at all.

This will be painful, thus I will need to further consult with people about this.

xnox commented 1 year ago

request for a legacy core18 track https://forum.snapcraft.io/t/new-legacy-track-for-docker-snap-core18/34266

xnox commented 1 year ago

core18 track has current releases out, so we can start to merge upgrades to core22 base, and enabling new things.

jocado commented 1 year ago

Great! This is just to switch bases to start with.

https://github.com/docker-snap/docker-snap/pull/93