-
Notifications
You must be signed in to change notification settings - Fork 19
Avoid pushing Docker images when they haven't changed #183
Comments
I was talking to @ellismg just now about https://github.com/pulumi/pulumi-service/issues/979, and Docker The idea is that we'd simply automatically tack on |
(Note that we have no way of retrieving this information currently inside of a Pulumi program, but I am envisioning some sort of |
Yes, that's my plan for https://github.com/pulumi/pulumi-service/issues/979. @lukehoban and I discussed it and agreed we'd want to prototype it in our own deployment first and tweak the details before we add more complexity to the already-complex Docker build capability here. |
As opposed to checking old state, we can also do something like pushing the image with an additional tag of This allows us to force an occasional Docker rebuild so that, e.g., users don't end up pinned to old dependency versions. |
That seems quite reasonable. I do think the cache use policy is something that ought to be kept as "policy" that we can layer atop whatever mechanism we choose here. The nice thing is I can actually envision us weaning our customer off the current private clouds model in favor of the new managed stacks plus this capability, if it is truly achievable. Given that, we may actually want to pull this in sooner, if it helps us stay sane with respect to supporting legacy clouds. Pulling back to M14 at least to have a conversation around this. Exciting! |
I don't believe so, no. I think we're still pushing images even if they haven't changed. |
We are. Pat had the idea to just check the digest that we get back from the pull when cacheFrom is set. I had assumed we'd just diff old outputs, but I think this would work also when cacheFrom is enabled). Note that this has ABA issues, but that may be okay since in general concurrent pushes are already racey. |
This issue was moved to pulumi/pulumi-docker#32 |
It would be nice if we could use the digest to avoid re-pushing Docker images that didn't actually change. This gets cached by the server and we avoid pushing, but it takes many seconds of watching
Waiting
andLayer already exists
messages printed to the console.This is conceptually similar to what we do with assets, but I'm guessing we'll need to implement it all in the cloud framework JavaScript; for example, check to see if the image was built before building it, and if the digest doesn't change, we can skip the push (provided we know one succeeded before, which may require hitting the registry to ask, which may be more work than it's worth).
The text was updated successfully, but these errors were encountered: