Skip to content

Commit

Permalink
Merge pull request #1690 from girder/retry-ci
Browse files Browse the repository at this point in the history
Retry some url fetches during CI
  • Loading branch information
manthey authored Oct 16, 2024
2 parents c893b6c + 3bc4c25 commit 45ef1e6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ commands:
docker-compose -f ./.circleci/dcm4chee/auth-docker-compose.yml up -d
export DICOMWEB_TEST_URL=http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs
echo "export DICOMWEB_TEST_URL=$DICOMWEB_TEST_URL" >> $BASH_ENV
pip install dicomweb_client 'python-keycloak<4.1'
pip install dicomweb_client tenacity 'python-keycloak<4.1'
# Wait up to 60 seconds for keycloak to be ready
echo 'Waiting for keycloak to start...'
Expand Down
6 changes: 3 additions & 3 deletions .circleci/dcm4chee/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ volumes:
ldap_config: {}
services:
ldap:
image: dcm4che/slapd-dcm4chee:2.6.6-33.0
image: dcm4che/slapd-dcm4chee:2.6.5-31.2
logging:
driver: json-file
options:
Expand All @@ -20,7 +20,7 @@ services:
- ldap_data:/var/lib/openldap/openldap-data
- ldap_config:/etc/openldap/slapd.d
db:
image: dcm4che/postgres-dcm4chee:16.4-33
image: dcm4che/postgres-dcm4chee:15.4-31
logging:
driver: json-file
options:
Expand All @@ -34,7 +34,7 @@ services:
volumes:
- db_data:/var/lib/postgresql/data
arc:
image: dcm4che/dcm4chee-arc-psql:5.33.0
image: dcm4che/dcm4chee-arc-psql:5.31.2
logging:
driver: json-file
options:
Expand Down
8 changes: 6 additions & 2 deletions .circleci/dcm4chee/upload_example_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from dicomweb_client import DICOMwebClient
from pydicom import dcmread
from requests import Session
from tenacity import Retrying, stop_after_attempt, wait_exponential


def upload_example_data(server_url, token=None):
Expand All @@ -22,8 +23,11 @@ def upload_example_data(server_url, token=None):

datasets = []
for url in download_urls:
resp = urllib.request.urlopen(url)
data = resp.read()
for attempt in Retrying(stop=stop_after_attempt(5),
wait=wait_exponential(multiplier=1, min=0.5, max=5)):
with attempt:
resp = urllib.request.urlopen(url)
data = resp.read()
dataset = dcmread(BytesIO(data))
datasets.append(dataset)

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Don't use a default for yaml config files except .large_image_config.yaml ([#1685](../../pull/1685))
- Some checks for repeated values in the item lists were wrong ([#1686](../../pull/1686))
- Better support creating zarr sinks from multiple processes ([#1687](../../pull/1687))

## 1.30.0

Expand Down

0 comments on commit 45ef1e6

Please sign in to comment.