Skip to content

Commit

Permalink
🔧 add retries docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgafni committed Oct 22, 2024
1 parent 3b9d9fb commit bb83f37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ARG NODE_HOME=/opt/$NODE_PACKAGE
ENV NODE_PATH $NODE_HOME/lib/node_modules
ENV PATH $NODE_HOME/bin:$PATH
RUN --mount=type=cache,target=/cache/downloads \
curl https://nodejs.org/dist/v$NODE_VERSION/$NODE_PACKAGE.tar.gz -o /cache/downloads/$NODE_PACKAGE.tar.gz \
curl --retry 3 https://nodejs.org/dist/v$NODE_VERSION/$NODE_PACKAGE.tar.gz -o /cache/downloads/$NODE_PACKAGE.tar.gz \
&& tar -xzC /opt/ -f /cache/downloads/$NODE_PACKAGE.tar.gz

RUN --mount=type=cache,target=/root/.cache/uv \
Expand Down
5 changes: 5 additions & 0 deletions tests/kuberay/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import pytest_cases
from pytest_kubernetes.options import ClusterOptions
from pytest_kubernetes.providers import AClusterManager, select_provider_manager
from tenacity import retry, stop_after_attempt, wait_random_exponential

from tests import ROOT_DIR

Expand All @@ -30,6 +31,10 @@ def kuberay_helm_repo():


@pytest.fixture(scope="session")
@retry(
stop=stop_after_attempt(3),
wait=wait_random_exponential(multiplier=1, max=10),
)
def dagster_ray_image():
"""
Either returns the image name from the environment variable PYTEST_DAGSTER_RAY_IMAGE
Expand Down

0 comments on commit bb83f37

Please sign in to comment.