Skip to content

Commit

Permalink
Merge pull request #71 from shanejbrown/main
Browse files Browse the repository at this point in the history
Add retries on multi-platform image builds
  • Loading branch information
shanejbrown authored Sep 9, 2023
2 parents c965e6b + 9648e6b commit bc91f34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions buildrunner/docker/multiplatform_image_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import python_on_whales
from python_on_whales import docker
from retry import retry

from buildrunner.docker import get_dockerfile

Expand Down Expand Up @@ -212,6 +213,7 @@ def _stop_local_registry(self):
LOGGER.warning("Local registry is not running when attempting to stop it")

# pylint: disable=too-many-arguments
@retry(python_on_whales.exceptions.DockerException, tries=5, delay=1)
def _build_single_image(self,
name: str,
platform: str,
Expand Down
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ timeout-decorator>=0.5.0
python-on-whales>=0.61.0
# python-on-whales requires pydantic 1.10.11 08/2023
pydantic>=1.10.11
retry2>=0.9.5
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ decorator==5.1.1
# via
# -r requirements.in
# fabric
# retry2
docker==6.1.3
# via -r requirements.in
docutils==0.20.1
Expand Down Expand Up @@ -97,6 +98,8 @@ requests==2.31.0
# twine
requests-toolbelt==1.0.0
# via twine
retry2==0.9.5
# via -r requirements.in
rfc3986==2.0.0
# via twine
rich==13.4.1
Expand Down

0 comments on commit bc91f34

Please sign in to comment.