dunglas/mercure

Change to `mercure/caddy` breaks older cached builds

tadasrimkus opened this issue · 1 comments

This is not a big issue, but I think it can happen to more people, so I thought I will write about it here.
Background
I am using API Platform template for my project which I started working on last week. It works great, and it has Github workflows that were building and running tests without no problems.

Problem
Today when I pushed new changes I got this error from the Github workflow:

buildx bake failed with: ERROR: failed to solve: failed to load cache key: Get "https://caddyserver.com/api/download?os=linux&arch=amd64&p=github.com/dunglas/mercure/caddy&p=github.com/dunglas/vulcain/caddy": dial tcp 165.227.20.207:443: i/o timeout

I tried to run old successful build from few days before and to my surprise it failed with same error.
I was confused why this happens, so I did some investigation, and tried to build caddy locally using docker-compose build caddy, but it failed with same error.
After some head scratching I did docker-compose build caddy --no-cache and it passed, and after that regular build worked fine as well.
To fix it for pipeline I had to add the following option no-cache: true to the build step to resolve the error. I assume if I remove this now it will work again with cached version.

Assumption
I think the caching that is done for that step causes the problem when mercure/caddy or vulcain/caddy is updated, at that point each build utilizing old cached version needs to be rebuilt using --no-cache option.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.