diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a3ad6daf9..95d6841af 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.0.3 +current_version = 2.0.6 commit = True tag = False tag_name = {new_version} @@ -30,11 +30,11 @@ search = {current_version} replace = {new_version} [bumpversion:file:RELEASE.txt] -search = {current_version} 2024-01-16T21:24:38Z +search = {current_version} 2024-02-15T16:29:01Z replace = {new_version} {utcnow:%Y-%m-%dT%H:%M:%SZ} [bumpversion:part:releaseTime] -values = 2024-01-16T21:24:38Z +values = 2024-02-15T16:29:01Z [bumpversion:file(version):birdhouse/components/canarie-api/docker_configuration.py.template] search = 'version': '{current_version}' diff --git a/CHANGES.md b/CHANGES.md index 7f997866b..101f290d2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,35 @@ Unidata has dropped support for TDS versions < 5.x. This updates Thredds to version 5.4. +[2.0.6](https://github.com/bird-house/birdhouse-deploy/tree/2.0.6) (2024-02-15) +------------------------------------------------------------------------------------------------------------------ + +## Changes + +- Weaver: add option to automatically unregister old providers + + Introduces the `WEAVER_UNREGISTER_DROPPED_PROVIDERS` variable. If set to "True", Weaver providers that are no longer + working (not responding when deployed) and are not named in `WEAVER_WPS_PROVIDERS` will be unregistered. This is + useful when deploying Weaver with fewer providers than a previous deployment. + + For example, if the stack is deployed with the Weaver, Finch, and Raven components. Then later deployed with just + Weaver and Raven, the Finch provider will be unregistered from weaver. + + Previously, the Finch provider would have remained as a Weaver provider despite the fact that it has been removed from + the stack. + +[2.0.5](https://github.com/bird-house/birdhouse-deploy/tree/2.0.5) (2024-01-22) +------------------------------------------------------------------------------------------------------------------ + +## Changes +- Jupyter env: new incremental build for compatibility with upcoming Thredds v5 + + See https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/pull/134 for more info. + + +[2.0.4](https://github.com/bird-house/birdhouse-deploy/tree/2.0.4) (2024-01-18) +------------------------------------------------------------------------------------------------------------------ + ## Fixes - Allow users to log in to Jupyterhub with their email address diff --git a/Makefile b/Makefile index 0c29a0b60..c21836bfa 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Generic variables override SHELL := bash override APP_NAME := birdhouse-deploy -override APP_VERSION := 2.0.3 +override APP_VERSION := 2.0.6 # utility to remove comments after value of an option variable override clean_opt = $(shell echo "$(1)" | $(_SED) -r -e "s/[ '$'\t'']+$$//g") diff --git a/README.rst b/README.rst index cd1c2ef7b..82436e237 100644 --- a/README.rst +++ b/README.rst @@ -14,13 +14,13 @@ for a full-fledged production platform. * - releases - | |latest-version| |commits-since| -.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.0.3.svg +.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.0.6.svg :alt: Commits since latest release - :target: https://github.com/bird-house/birdhouse-deploy/compare/2.0.3...master + :target: https://github.com/bird-house/birdhouse-deploy/compare/2.0.6...master -.. |latest-version| image:: https://img.shields.io/badge/tag-2.0.3-blue.svg?style=flat +.. |latest-version| image:: https://img.shields.io/badge/tag-2.0.6-blue.svg?style=flat :alt: Latest Tag - :target: https://github.com/bird-house/birdhouse-deploy/tree/2.0.3 + :target: https://github.com/bird-house/birdhouse-deploy/tree/2.0.6 .. |readthedocs| image:: https://readthedocs.org/projects/birdhouse-deploy/badge/?version=latest :alt: ReadTheDocs Build Status (latest version) diff --git a/RELEASE.txt b/RELEASE.txt index 4a740c13c..652e5ffbe 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1 +1 @@ -2.0.3 2024-01-16T21:24:38Z +2.0.6 2024-02-15T16:29:01Z diff --git a/birdhouse/components/canarie-api/docker_configuration.py.template b/birdhouse/components/canarie-api/docker_configuration.py.template index 8e8cd645e..2a3aed472 100644 --- a/birdhouse/components/canarie-api/docker_configuration.py.template +++ b/birdhouse/components/canarie-api/docker_configuration.py.template @@ -109,8 +109,8 @@ SERVICES = { # NOTE: # Below version and release time auto-managed by 'make VERSION=x.y.z bump'. # Do NOT modify it manually. See 'Tagging policy' in 'birdhouse/README.rst'. - 'version': '2.0.3', - 'releaseTime': '2024-01-16T21:24:38Z', + 'version': '2.0.6', + 'releaseTime': '2024-02-15T16:29:01Z', 'institution': 'Ouranos', 'researchSubject': 'Climatology', 'supportEmail': '${SUPPORT_EMAIL}', @@ -142,8 +142,8 @@ PLATFORMS = { # NOTE: # Below version and release time auto-managed by 'make VERSION=x.y.z bump'. # Do NOT modify it manually. See 'Tagging policy' in 'birdhouse/README.rst'. - 'version': '2.0.3', - 'releaseTime': '2024-01-16T21:24:38Z', + 'version': '2.0.6', + 'releaseTime': '2024-02-15T16:29:01Z', 'institution': 'Ouranos', 'researchSubject': 'Climatology', 'supportEmail': '${SUPPORT_EMAIL}', diff --git a/birdhouse/components/jupyterhub/default.env b/birdhouse/components/jupyterhub/default.env index 9eb8fbd9e..c7013f931 100644 --- a/birdhouse/components/jupyterhub/default.env +++ b/birdhouse/components/jupyterhub/default.env @@ -8,7 +8,7 @@ export JUPYTERHUB_DOCKER=pavics/jupyterhub export JUPYTERHUB_VERSION=4.0.2-20240117 # Jupyter single-user server images, can be overriden in env.local to have a space separated list of multiple images -export DOCKER_NOTEBOOK_IMAGES="pavics/workflow-tests:py39-230601-1-update231122" +export DOCKER_NOTEBOOK_IMAGES="pavics/workflow-tests:py39-230601-1-update240116" # Name of the image displayed on the JupyterHub image selection page # Can be overriden in env.local to have a space separated list of multiple images, the name order must correspond diff --git a/birdhouse/components/weaver/default.env b/birdhouse/components/weaver/default.env index 9b27a8831..6dccc8370 100644 --- a/birdhouse/components/weaver/default.env +++ b/birdhouse/components/weaver/default.env @@ -98,6 +98,10 @@ export WEAVER_WPS_PROVIDERS_RETRY_AFTER=5 export WEAVER_MONGODB_DATA_DIR='${DATA_PERSIST_ROOT}/mongodb_weaver_persist' +# If "True", Weaver providers that are no longer working (not responding when deployed) and are not named in +# WEAVER_WPS_PROVIDERS will be unregistered. This is useful when deploying Weaver with fewer providers than a previous +# deployment. +export WEAVER_UNREGISTER_DROPPED_PROVIDERS="False" export DELAYED_EVAL=" $DELAYED_EVAL diff --git a/birdhouse/components/weaver/post-docker-compose-up b/birdhouse/components/weaver/post-docker-compose-up index 10de53a85..29e90c1d3 100755 --- a/birdhouse/components/weaver/post-docker-compose-up +++ b/birdhouse/components/weaver/post-docker-compose-up @@ -333,6 +333,37 @@ for prov in ${WEAVER_WPS_PROVIDERS}; do done echo "${PREFIX}All Weaver remote WPS providers registered successfully!" +if [ x"${WEAVER_UNREGISTER_DROPPED_PROVIDERS}" = x"True" ]; then + # Get all registered providers whether they are working or not + all_providers_resp=$( \ + curl_cmd --insecure --silent --location \ + -m ${REQUEST_TIMEOUT} \ + -b "${cookie}" \ + "${WEAVER_URL}/providers?check=false&detail=false" \ + ) + # Get all registered working providers + working_providers_resp=$( \ + curl_cmd --insecure --silent --location \ + -m ${REQUEST_TIMEOUT} \ + -b "${cookie}" \ + "${WEAVER_URL}/providers?check=true&detail=false" \ + ) + working_providers=$(echo "$working_providers_resp" | tr '\n' ' ' | \ + sed -e 's/.*"providers":\[//' -e 's/\].*//' -e 's/[",]/ /g') + for prov in $(echo "$all_providers_resp" | sed -e 's/.*"providers":\[//' -e 's/\].*//' -e 's/[",]/ /g'); do + # Note: both WEAVER_WPS_PROVIDERS and working_providers are whitespace delimited with no newlines + if echo " ${WEAVER_WPS_PROVIDERS} " | grep -qv "[[:space:]]${prov}[[:space:]]" && \ + echo " ${working_providers} " | grep -qv "[[:space:]]${prov}[[:space:]]"; then + # unregister provider that is no longer specified in WEAVER_WPS_PROVIDERS and is no longer working + echo "${PREFIX}Unregistering the remote WPS provider matching [${prov}] not in WEAVER_WPS_PROVIDERS." + curl_cmd --insecure --silent --location \ + -m ${REQUEST_TIMEOUT} \ + -b "${cookie}" \ + -X DELETE \ + "${WEAVER_URL}/providers/${prov}" + fi + done +fi echo "${PREFIX}Starting Weaver WebApp/Worker Celery tasks validation..." CUR_SCRIPT_DIR="$(dirname "$(realpath "$0")")" diff --git a/birdhouse/env.local.example b/birdhouse/env.local.example index 02b4a5c7f..871d9bef7 100644 --- a/birdhouse/env.local.example +++ b/birdhouse/env.local.example @@ -542,6 +542,11 @@ export THREDDS_ADDITIONAL_CATALOG="" # (note: if using 'DATA_PERSIST_ROOT', it must be defined earlier, either in this file or from 'default.env') #export WEAVER_MONGODB_DATA_DIR='${DATA_PERSIST_ROOT}/mongodb_weaver_persist' +# If "True", Weaver providers that are no longer working (not responding when deployed) and are not named in +# WEAVER_WPS_PROVIDERS will be unregistered. This is useful when deploying Weaver with fewer providers than a previous +# deployment. +#export WEAVER_UNREGISTER_DROPPED_PROVIDERS="True" + # If "True", requests to the geoserver endpoint will not be authorized through twitcher/magpie # (note: this is NOT recommended but will slightly improve performance when accessing geoserver endpoints) #export GEOSERVER_SKIP_AUTH=True diff --git a/docs/source/conf.py b/docs/source/conf.py index dd79187a0..a92ab3649 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,9 +69,9 @@ # built documents. # # The short X.Y version. -version = '2.0.3' +version = '2.0.6' # The full version, including alpha/beta/rc tags. -release = '2.0.3' +release = '2.0.6' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.