-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Labels
Description
todo
- add
regionandarchitecturefields in cache entries (theregioncache is for later, just create the field for now) - populate
architecturefield in cache entries when possible - update the cache helpers to take an optional architecture argument, if the argument is present, skip the other architectures
- when matching a bootscript with another object context (
scw run(image context),scw tag --architecture(architecture argument)), pass the architecture argument to the cache resolver - Bonus: related with Reduce resolver matching conflicts on 'create' and 'run' #212, if you feel the courage, also add a
ownerfield, so we can filter byuser/XXX=titlematchingXXXandowner= my organization id,community/XXX= community meta organization,public/XXXorXXX= entity with public=True (official images/bootscripts)
Note: do not create a commercial-type->architecture mapping nor an architecture aliases mapping, for now we need to write the exactly same architecture
example
scw run
scw run --bootscript=stable my-arm-image: bootscript matchingstablefor the architecturearmv7lscw run --bootscript=stable my-arm64-image: bootscript matchingstablefor the architectureaarch64scw run --bootscript=stable my-amd64-image: bootscript matchingstablefor the architecturex86_64
scw tag
scw tag --arch=arm --bootscript=latest my-snapshot: bootscript matchinglatestfor architecture armv7lscw tag --arch=x86_64 --bootscript=latest my-snapshot: bootscript matchinglatestfor architecture x86_64scw tag --arch=arm64 --bootscript=latest my-snapshot: bootscript matchinglatestfor architecture aarch64
live example
Actually we have this error when trying to tag with a bad bootscript
FATA[0001] cannot execute 'tag': cannot create image: Image and Bootscript architecture should be the same