Current cache-from configuration format doesn't allow for cache types
Orb version
Current
What happened
When using cache-from: type=registry,ref=<registry>/<repo>:<tag>, I see
Pulling type=registry
invalid reference format
Pulling ref=ref=<registry>/<repo>:<tag>
invalid reference format
and essentially no caching behavior is observed.
Expected behavior
The entire argument should be taken as a single cache-from argument, instead of being split on the comma with each part assumed to be a different cache source. I'd suggest accepting a list. This behavior is extremely unexpected while trying to use this orb, and is a sufficient enough blocker to not use it at all.
Am I missing anything with how to use this config? I read through the code as well.
The cache_from here is designed to work directly with type=registry, which is the default, so you would only need to specify the registry not the type, for example cache-from: mydockerimage:cache.
I like the idea of having this parameter as a list, to allow the use of the other cache types, but for now that is a low priority functionality as most people uses only the registry type.
For your example I suppose you are also using type registry, if you are using other type let me know, and we can prioritize this higher.
Gotcha, yeah we're using registry caches, but this still prevents using other parameters like mode, image-manifest, oci-mediatypes, which are pretty critical (especially for multi-stage builds).
We resolved our issues by inlining our docker build instead, since we didn't want to rely layers of updates and abstractions, but if this arg is going to be useful, I think adhering to standard syntax is a must.
(Or, the limitations should be documented)