diff --git a/CHANGES.md b/CHANGES.md index b0050708..bcf3fd1d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,7 +15,18 @@ [Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest) ------------------------------------------------------------------------------------------------------------------ -[//]: # (list changes here, using '-' for each new entry, remove this when items are added) +## Changes + +- Weaver: bump version to 5.1.1 + + - See changes in the [Weaver changes + file](https://github.com/crim-ca/weaver/blob/ec5f403958de21e1af27ff86da391d0d53ded5d9/CHANGES.rst?plain=1#L23-L249) + +- Weaver: WPS retry logic on post-compose step. + - Apply `--network birdhouse_default` to the Docker `curl` image to allow HTTP requests to properly resolve + against the running services (WPS bird providers, Weave and Magpie). In some cases, this network would not + be automatically resolved. + - Fix the index used during HTTP request retry to avoid going one step over the intended retry attempts. [2.3.3](https://github.com/bird-house/birdhouse-deploy/tree/2.3.3) (2024-05-29) ------------------------------------------------------------------------------------------------------------------ diff --git a/birdhouse/components/weaver/default.env b/birdhouse/components/weaver/default.env index ca94f178..eaae6e77 100644 --- a/birdhouse/components/weaver/default.env +++ b/birdhouse/components/weaver/default.env @@ -53,7 +53,7 @@ OPTIONAL_VARS=" export WEAVER_CONFIG=HYBRID # default release version that will be used to fetch docker images (API mananger & celery workers services) -export WEAVER_VERSION=4.32.0 +export WEAVER_VERSION=5.1.1 export WEAVER_DOCKER=pavics/weaver export WEAVER_IMAGE='${WEAVER_DOCKER}:${WEAVER_VERSION}' export WEAVER_MANAGER_IMAGE='${WEAVER_IMAGE}-manager' diff --git a/birdhouse/components/weaver/post-docker-compose-up b/birdhouse/components/weaver/post-docker-compose-up index 29e90c1d..be366928 100755 --- a/birdhouse/components/weaver/post-docker-compose-up +++ b/birdhouse/components/weaver/post-docker-compose-up @@ -120,7 +120,7 @@ RANDOM_NUMBER=${RANDOM:-$(tr -dc 0-9 < /dev/urandom 2>/dev/null | head -c 5)} # To know when a docker run was started in case it hangs. DOCKER_RUN_TAG="weaver_post_curl_$(date -Isecond | sed 's/:/_/g' | sed 's/+/p/g')_${RANDOM_NUMBER}" curl_cmd() { - docker run --rm --name "${DOCKER_RUN_TAG}" "${WEAVER_CURL_IMAGE}" "$@" + docker run --network birdhouse_default --rm --name "${DOCKER_RUN_TAG}" "${WEAVER_CURL_IMAGE}" "$@" } # pull image if missing to avoid mangling output messages on first call @@ -317,7 +317,7 @@ for prov in ${WEAVER_WPS_PROVIDERS}; do if [ ${ret} -ne 0 ] || [ "${code}" -ne 201 ]; then printf "\n%s\n" "${WARN}Failed registration of remote WPS provider [${prov}] on [${prov_url}]${retry_msg}." printf "Error:\n%s\n" "${body}" - if [ ${retry} -gt ${total} ]; then + if [ ${retry} -ge ${total} ]; then echo "${ERROR}Maximum retry attempts ${total} reached for WPS provider [${prov}]. Aborting." reset_state exit 23