GNS3 / gns3-registry

GNS3 devices registry
GNU General Public License v3.0
323 stars 387 forks source link

Retry on communication errors for docker build tool #814

Closed b-ehlers closed 9 months ago

b-ehlers commented 9 months ago

There were a few communication errors between the Actions VM and the GitHub container registry ghcr.io when the Docker build tool was launched. docker buildx build tries to recover them by retrying the operation, for example see the log https://github.com/GNS3/gns3-registry/actions/runs/5640774106/job/15277861234. Of course retrying works only on short outages, longer ones result in a failure, for example https://github.com/GNS3/gns3-registry/actions/runs/5463988019/job/14792430012. But every successful recovery reduces the need for manual intervention.

The build tool itself has no retry mechanism, so https://github.com/GNS3/gns3-registry/actions/runs/5819569855/job/15778227464 failed. Therefore I added a retry mechanism to the docker build tool and tested it locally and on GitHub Actions. While locally it works as expected, my tests with Actions VMs showed no result as no communication error occurred.

So I'm not sure, if this retry mechanism should be added to the docker build tool. On the pro side it should reduce the number of manual actions needed. On the con side, it is currently not needed and will only increase the complexity of the tool.

Anyway here is the patch file, it can be added by git am: 0001-Docker-build-Retry-on-communication-errors.patch.txt Alternatively I can create a PR.

grossmj commented 9 months ago

Looks good, yes please create a PR. Thanks 🙏

b-ehlers commented 9 months ago

Closed by PR #817