From 0d9e90ab6c03f635c69081e51a128452388dcb20 Mon Sep 17 00:00:00 2001 From: Continuous integration Date: Wed, 27 Nov 2024 12:19:30 +0000 Subject: [PATCH 1/4] Interrupted upgrade to 2.9.rc.12 --- .UPGRADE_INSTRUCTIONS | 6 + .upgrade.yaml | 67 ++++++++ CONST_create_template/docker-compose-lib.yaml | 2 + CONST_create_template/env.default | 2 +- .../geoportal/webpack.apps.js | 2 +- CONST_create_template/tests/test_app.py | 39 ++++- create.diff | 54 +++++++ docker-compose-lib.yaml | 2 + env.default | 2 +- geoportal/webpack.apps.js | 2 +- tests/test_app.py | 44 ++++++ upgrade | 143 ++++++++++++++++++ 12 files changed, 359 insertions(+), 6 deletions(-) create mode 100644 .UPGRADE_INSTRUCTIONS create mode 100644 .upgrade.yaml create mode 100644 create.diff create mode 100755 upgrade diff --git a/.UPGRADE_INSTRUCTIONS b/.UPGRADE_INSTRUCTIONS new file mode 100644 index 000000000..9ccfa6317 --- /dev/null +++ b/.UPGRADE_INSTRUCTIONS @@ -0,0 +1,6 @@ +The `create.diff` file is a recommendation of the changes that you should apply to your project. +You should apply the changes shown in the diff file on `CONST_create_template/` on your project's ``. +Some advice to be more efficient: if the changes on a file concern a file that you never customize, you can simply copy the new file from `CONST_create_template` (`cp CONST_create_template/ `).You can furthermore add this file to the `unmanaged_files` section of the `project.yaml` file, to avoid its contents appearing in the diff file for the next upgrade. +Note that you can also apply them using: git apply --3way create.diff +To continue, type: +./upgrade 2.9.rc.12 11 diff --git a/.upgrade.yaml b/.upgrade.yaml new file mode 100644 index 000000000..2620cdf4d --- /dev/null +++ b/.upgrade.yaml @@ -0,0 +1,67 @@ +--- +# The list (by include, exclude) of default files that will not be overwritten by the upgrade. +# That that can be extended with managed_files or reduced with unmanaged_files from the +# project.yaml file in the project root directory. +default_project_file: + include: + - geoportal/setup\.py + - geoportal/vars\.yaml + - geoportal/Makefile + - geoportal/geomapfish_geoportal/__init__\.py + - geoportal/geomapfish_geoportal/templates/.* + - geoportal/geomapfish_geoportal/locale/.* + - geoportal/geomapfish_geoportal/static/.* + - geoportal/geomapfish_geoportal/static-ngeo/.* + - print/print-apps/.* + - mapserver/.* + - tilegeneration/config\.yaml\.tmpl + - project\.yaml + - docker-compose\.yaml + - env\.project + - README\.rst + - \.github/workflows/main\.yaml + - \.github/workflows/rebuild\.yaml + exclude: + - mapserver/demo\.map\.tmpl + - geoportal/geomapfish_geoportal/static-ngeo/js/apps/image/favicon\.ico + +# Files ignored when creating the diff files => will just be left untouched. +no_diff: + - .*\.po + - CONST_.+ + - .*/CONST_.+ + +# Files that will be present in the CONST_create_template but will not be considered in the upgrade. +# Used to provide the alt applications => does not disturb the user during upgrade. +extra: + - geoportal/geomapfish_geoportal/static-ngeo/js/apps/mobile_alt\.html\.ejs + - geoportal/geomapfish_geoportal/static-ngeo/js/apps/oeedit\.html\.ejs + - geoportal/geomapfish_geoportal/static-ngeo/js/apps/Controllermobile_alt\.js + - geoportal/geomapfish_geoportal/static-ngeo/js/apps/Controlleroeedit\.js + - geoportal/geomapfish_geoportal/static-ngeo/js/apps/sass/mobile_alt\.scss + - geoportal/geomapfish_geoportal/static-ngeo/js/apps/sass/vars_mobile_alt\.scss + - geoportal/geomapfish_geoportal/static-ngeo/js/apps/sass/oeedit\.scss + - geoportal/geomapfish_geoportal/static-ngeo/js/apps/sass/vars_oeedit\.scss + - geoportal/interfaces/desktop_alt\.html\.mako + - geoportal/geomapfish_geoportal/static/images/background-layer-button\.png + - tests/test_testapp.py + +# Automated file system operations: +# Remove some files or directories: +# - action: remove +# paths: +# - +# Move a file: +# - action: move +# from: +# to: +upgrade_files: + - action: remove + paths: + - geoportal/tools/extract-messages.js + - action: move + from: geoportal/lingua-server.cfg + to: geoportal/lingva-server.cfg + - action: move + from: geoportal/lingua-client.cfg + to: geoportal/lingva-client.cfg diff --git a/CONST_create_template/docker-compose-lib.yaml b/CONST_create_template/docker-compose-lib.yaml index f6710db74..9210b816e 100644 --- a/CONST_create_template/docker-compose-lib.yaml +++ b/CONST_create_template/docker-compose-lib.yaml @@ -82,6 +82,8 @@ services: environment: - PGOPTIONS - MAPSERVER_CONFIG_FILE=/etc/mapserver/mapserver.conf + - MAPSERVER_BASE_PATH=/mapserv_proxy + - OGCAPI_HTML_TEMPLATE_DIRECTORY=/usr/local/share/mapserver/ogcapi/templates/html-bootstrap4/ - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION diff --git a/CONST_create_template/env.default b/CONST_create_template/env.default index f2032062c..a8706b155 100644 --- a/CONST_create_template/env.default +++ b/CONST_create_template/env.default @@ -1,5 +1,5 @@ # Default values for c2cgeoportal -GEOMAPFISH_VERSION=2.9.rc.10 +GEOMAPFISH_VERSION=2.9.rc.12 GEOMAPFISH_MAIN_VERSION=2.9 GEOMAPFISH_MAIN_MINOR_VERSION=2.9.0 COMPOSE_PROJECT_NAME=geomapfish diff --git a/CONST_create_template/geoportal/webpack.apps.js b/CONST_create_template/geoportal/webpack.apps.js index 9d0a3b5e6..f9971f054 100644 --- a/CONST_create_template/geoportal/webpack.apps.js +++ b/CONST_create_template/geoportal/webpack.apps.js @@ -23,7 +23,7 @@ for (const filename of ls( chunks: [name], vars: { entry_point: '${VISIBLE_ENTRY_POINT}', - version: '2.9.rc.10', + version: '2.9.rc.12', cache_version: '${CACHE_VERSION}', }, }) diff --git a/CONST_create_template/tests/test_app.py b/CONST_create_template/tests/test_app.py index c60a3ed45..012b3baf3 100644 --- a/CONST_create_template/tests/test_app.py +++ b/CONST_create_template/tests/test_app.py @@ -17,12 +17,47 @@ ("https://front/c2c/health_check", {"checker": "check_collector"}, 2), ("https://front/admin/layertree", {}, 10), ("https://front/admin/layertree/children", {}, 10), - ("http://mapserver:8080/mapserv_proxy", {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60), + ( + "http://mapserver:8080/mapserv_proxy/mapserver", + {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + 60, + ), ( "https://front/mapserv_proxy", - {"ogcserver": "source for image/png", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + {"ogcserver": "mapserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60, ), + # ( + # "http://qgisserver:8080/mapserv_proxy/", + # {"SERVICE": "WMS", "REQUEST": "GetCapabilities", "MAP": "/etc/qgisserver/project.qgs"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy", + # {"ogcserver": "qgisserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + # 60, + # ), + # OGC API - Features + # ( + # "http://mapserver:8080/mapserv_proxy/mapserver/ogcapi/collections/osm_protected/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy/mapserver/mapserver/ogcapi/collections/osm_open/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "http://qgisserver:8080/mapserv_proxy/qgisserver/wfs3/collections/points/items", + # {"map": "/etc/qgisserver/project.qgs", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy/qgisserver/wfs3/collections/points/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), ], ) def test_url(url: str, params: dict[str, str], timeout: int) -> None: diff --git a/create.diff b/create.diff new file mode 100644 index 000000000..294679c8a --- /dev/null +++ b/create.diff @@ -0,0 +1,54 @@ +diff --git a/tests/test_app.py b/tests/test_app.py +index c60a3ed..012b3ba 100644 +--- a/tests/test_app.py ++++ b/tests/test_app.py +@@ -17,12 +17,47 @@ import requests + ("https://front/c2c/health_check", {"checker": "check_collector"}, 2), + ("https://front/admin/layertree", {}, 10), + ("https://front/admin/layertree/children", {}, 10), +- ("http://mapserver:8080/mapserv_proxy", {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60), ++ ( ++ "http://mapserver:8080/mapserv_proxy/mapserver", ++ {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, ++ 60, ++ ), + ( + "https://front/mapserv_proxy", +- {"ogcserver": "source for image/png", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, ++ {"ogcserver": "mapserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + 60, + ), ++ # ( ++ # "http://qgisserver:8080/mapserv_proxy/", ++ # {"SERVICE": "WMS", "REQUEST": "GetCapabilities", "MAP": "/etc/qgisserver/project.qgs"}, ++ # 60, ++ # ), ++ # ( ++ # "https://front/mapserv_proxy", ++ # {"ogcserver": "qgisserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, ++ # 60, ++ # ), ++ # OGC API - Features ++ # ( ++ # "http://mapserver:8080/mapserv_proxy/mapserver/ogcapi/collections/osm_protected/items", ++ # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, ++ # 60, ++ # ), ++ # ( ++ # "https://front/mapserv_proxy/mapserver/mapserver/ogcapi/collections/osm_open/items", ++ # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, ++ # 60, ++ # ), ++ # ( ++ # "http://qgisserver:8080/mapserv_proxy/qgisserver/wfs3/collections/points/items", ++ # {"map": "/etc/qgisserver/project.qgs", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, ++ # 60, ++ # ), ++ # ( ++ # "https://front/mapserv_proxy/qgisserver/wfs3/collections/points/items", ++ # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, ++ # 60, ++ # ), + ], + ) + def test_url(url: str, params: dict[str, str], timeout: int) -> None: diff --git a/docker-compose-lib.yaml b/docker-compose-lib.yaml index f6710db74..9210b816e 100644 --- a/docker-compose-lib.yaml +++ b/docker-compose-lib.yaml @@ -82,6 +82,8 @@ services: environment: - PGOPTIONS - MAPSERVER_CONFIG_FILE=/etc/mapserver/mapserver.conf + - MAPSERVER_BASE_PATH=/mapserv_proxy + - OGCAPI_HTML_TEMPLATE_DIRECTORY=/usr/local/share/mapserver/ogcapi/templates/html-bootstrap4/ - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION diff --git a/env.default b/env.default index f2032062c..a8706b155 100644 --- a/env.default +++ b/env.default @@ -1,5 +1,5 @@ # Default values for c2cgeoportal -GEOMAPFISH_VERSION=2.9.rc.10 +GEOMAPFISH_VERSION=2.9.rc.12 GEOMAPFISH_MAIN_VERSION=2.9 GEOMAPFISH_MAIN_MINOR_VERSION=2.9.0 COMPOSE_PROJECT_NAME=geomapfish diff --git a/geoportal/webpack.apps.js b/geoportal/webpack.apps.js index 9d0a3b5e6..f9971f054 100644 --- a/geoportal/webpack.apps.js +++ b/geoportal/webpack.apps.js @@ -23,7 +23,7 @@ for (const filename of ls( chunks: [name], vars: { entry_point: '${VISIBLE_ENTRY_POINT}', - version: '2.9.rc.10', + version: '2.9.rc.12', cache_version: '${CACHE_VERSION}', }, }) diff --git a/tests/test_app.py b/tests/test_app.py index fa124e97f..50698c767 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -15,6 +15,7 @@ ("https://front/c2c/health_check", {}, 2), ("https://front/c2c/health_check", {"max_level": "1"}, 2), ("https://front/c2c/health_check", {"checker": "check_collector"}, 2), +<<<<<<< ours ("http://mapserver:8080/mapserv_proxy", {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60), ( "https://front/mapserv_proxy", @@ -24,8 +25,51 @@ ( "https://front/mapserv_proxy", {"ogcserver": "QGIS server", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, +======= + ("https://front/admin/layertree", {}, 10), + ("https://front/admin/layertree/children", {}, 10), + ( + "http://mapserver:8080/mapserv_proxy/mapserver", + {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + 60, + ), + ( + "https://front/mapserv_proxy", + {"ogcserver": "mapserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, +>>>>>>> theirs 60, ), + # ( + # "http://qgisserver:8080/mapserv_proxy/", + # {"SERVICE": "WMS", "REQUEST": "GetCapabilities", "MAP": "/etc/qgisserver/project.qgs"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy", + # {"ogcserver": "qgisserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + # 60, + # ), + # OGC API - Features + # ( + # "http://mapserver:8080/mapserv_proxy/mapserver/ogcapi/collections/osm_protected/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy/mapserver/mapserver/ogcapi/collections/osm_open/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "http://qgisserver:8080/mapserv_proxy/qgisserver/wfs3/collections/points/items", + # {"map": "/etc/qgisserver/project.qgs", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy/qgisserver/wfs3/collections/points/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), ], ) def test_url(url: str, params: dict[str, str], timeout: int) -> None: diff --git a/upgrade b/upgrade new file mode 100755 index 000000000..c52341095 --- /dev/null +++ b/upgrade @@ -0,0 +1,143 @@ +#!/usr/bin/env python3 + +# Copyright (c) 2019-2023, Camptocamp SA +# All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: + +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# The views and conclusions contained in the software and documentation are those +# of the authors and should not be interpreted as representing official policies, +# either expressed or implied, of the FreeBSD Project. + + +import argparse +import os +import platform +import re +import subprocess +import sys + +parser = argparse.ArgumentParser(description="Upgrade the project") +parser.add_argument( + "--debug", help="Path to c2cgeoportal source folder to be able to debug the upgrade procedure" +) +parser.add_argument("version", help="the version to upgrade to (master or x.y.z)") +parser.add_argument("step", nargs="?", help="the step to run") +parser_finalize = argparse.ArgumentParser(description="Upgrade the project", add_help=False) +parser_finalize.add_argument("--finalize", action="store_true", help="finalize the upgrade") +parser_finalize.add_argument("--help", action="help", help="show this help message and exit") +parser_finalize.add_argument("build_arg", nargs="*", help="build arguments") + +if len(sys.argv) >= 2 and sys.argv[1] == "--finalize": + args = parser_finalize.parse_args() + + if platform.system() == "Windows": + code = subprocess.call(["python", "build"] + args.build_arg) + else: + code = subprocess.call(["./build"] + args.build_arg) + if code != 0: + sys.exit(code) + + subprocess.call(["docker", "compose", "down", "--remove-orphans"]) + subprocess.call( + ["docker", "compose", "pull", "--ignore-pull-failures"], + env={**os.environ, "DOCKER_TAG": "unexisting"}, + ) + subprocess.check_call(["docker", "compose", "up", "-d"]) + subprocess.check_call( + [ + "docker", + "compose", + "exec", + "geoportal", + "alembic", + "--name=main", + "--config=alembic.ini", + "upgrade", + "head", + ] + ) + +else: + args = parser.parse_args() + + c2cupgrade_args = ["--step", args.step] if args.step is not None else [] + + if os.environ.get("CI") != "true" and args.step is None: + major_version = args.version + match = re.match(r"^([0-9]+\.[0-9]+)\.[0-9]+$", args.version) + if match is not None: + major_version = match.group(1) + match = re.match(r"^([0-9]+\.[0-9]+)\.[0-9a-z]+\.[0-9]+$", args.version) + if match is not None: + major_version = match.group(1) + if not args.debug: + subprocess.check_call( + [ + "docker", + "pull", + f"camptocamp/geomapfish:{major_version}", + ] + ) + subprocess.check_call(["docker", "pull", f"camptocamp/geomapfish-tools:{args.version}"]) + subprocess.check_call( + [ + "docker", + "pull", + f"camptocamp/geomapfish-config:{major_version}", + ] + ) + + debug_volumes = ( + [ + "--volume={debug}/geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py:".format( + debug=args.debug + ), + "/opt/c2cgeoportal/geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py", + ] + if args.debug + else [] + ) + + win = platform.system() == "Windows" + sys.exit( + subprocess.call( + [ + "docker", + "run", + "--rm", + "--env=CI", + f"--volume={os.getcwd()}:/src", + ] + + debug_volumes + + [ + f"camptocamp/geomapfish-tools:{args.version}", + "run-git", + subprocess.check_output(["git", "config", "--get", "user.name"]).decode().strip(), + subprocess.check_output(["git", "config", "--get", "user.email"]).decode().strip(), + "" if win else subprocess.check_output(["id", "-u"]).decode().strip(), + "" if win else subprocess.check_output(["id", "-g"]).decode().strip(), + "/src", + "c2cupgrade", + ] + + c2cupgrade_args + ) + ) From d957ce6b3094959d7d16550bc73c4c2d829f7399 Mon Sep 17 00:00:00 2001 From: "geo-ghci-int[bot]" <146321879+geo-ghci-int[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:20:21 +0000 Subject: [PATCH 2/4] Update from base branch From the artifact of the previous workflow run --- create.diff | 54 ---------------------------------------- env.default | 2 +- env.project | 2 +- mapserver/mapserver.conf | 1 + tests/test_app.py | 37 ++++++++++++++++----------- 5 files changed, 26 insertions(+), 70 deletions(-) delete mode 100644 create.diff diff --git a/create.diff b/create.diff deleted file mode 100644 index 294679c8a..000000000 --- a/create.diff +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/tests/test_app.py b/tests/test_app.py -index c60a3ed..012b3ba 100644 ---- a/tests/test_app.py -+++ b/tests/test_app.py -@@ -17,12 +17,47 @@ import requests - ("https://front/c2c/health_check", {"checker": "check_collector"}, 2), - ("https://front/admin/layertree", {}, 10), - ("https://front/admin/layertree/children", {}, 10), -- ("http://mapserver:8080/mapserv_proxy", {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60), -+ ( -+ "http://mapserver:8080/mapserv_proxy/mapserver", -+ {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, -+ 60, -+ ), - ( - "https://front/mapserv_proxy", -- {"ogcserver": "source for image/png", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, -+ {"ogcserver": "mapserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, - 60, - ), -+ # ( -+ # "http://qgisserver:8080/mapserv_proxy/", -+ # {"SERVICE": "WMS", "REQUEST": "GetCapabilities", "MAP": "/etc/qgisserver/project.qgs"}, -+ # 60, -+ # ), -+ # ( -+ # "https://front/mapserv_proxy", -+ # {"ogcserver": "qgisserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, -+ # 60, -+ # ), -+ # OGC API - Features -+ # ( -+ # "http://mapserver:8080/mapserv_proxy/mapserver/ogcapi/collections/osm_protected/items", -+ # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, -+ # 60, -+ # ), -+ # ( -+ # "https://front/mapserv_proxy/mapserver/mapserver/ogcapi/collections/osm_open/items", -+ # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, -+ # 60, -+ # ), -+ # ( -+ # "http://qgisserver:8080/mapserv_proxy/qgisserver/wfs3/collections/points/items", -+ # {"map": "/etc/qgisserver/project.qgs", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, -+ # 60, -+ # ), -+ # ( -+ # "https://front/mapserv_proxy/qgisserver/wfs3/collections/points/items", -+ # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, -+ # 60, -+ # ), - ], - ) - def test_url(url: str, params: dict[str, str], timeout: int) -> None: diff --git a/env.default b/env.default index a8706b155..afe386e55 100644 --- a/env.default +++ b/env.default @@ -1,5 +1,5 @@ # Default values for c2cgeoportal -GEOMAPFISH_VERSION=2.9.rc.12 +GEOMAPFISH_VERSION=2.9.rc.11 GEOMAPFISH_MAIN_VERSION=2.9 GEOMAPFISH_MAIN_MINOR_VERSION=2.9.0 COMPOSE_PROJECT_NAME=geomapfish diff --git a/env.project b/env.project index 8b89d15bb..dfbeb4151 100644 --- a/env.project +++ b/env.project @@ -63,7 +63,7 @@ AWS_DEFAULT_REGION=ch-dk-2 AWS_S3_ENDPOINT=sos-ch-dk-2.exo.io # Set a strong password here for authentication on technical interfaces behind path /c2c -C2C_SECRET= +C2C_SECRET=1234 # Or use connection via GitHub, see: https://camptocamp.github.io/c2cgeoportal/2.8/integrator/c2cwsgiutils.html#authentication C2C_AUTH_GITHUB_REPOSITORY=camptocamp/demo_geomapfish C2C_AUTH_GITHUB_ACCESS_TYPE=admin diff --git a/mapserver/mapserver.conf b/mapserver/mapserver.conf index 61302736f..26bec65e1 100644 --- a/mapserver/mapserver.conf +++ b/mapserver/mapserver.conf @@ -10,6 +10,7 @@ CONFIG # Map aliases # MAPS + MainPNG "/etc/mapserver/mapserver.map" END END diff --git a/tests/test_app.py b/tests/test_app.py index 50698c767..24461c253 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -15,31 +15,40 @@ ("https://front/c2c/health_check", {}, 2), ("https://front/c2c/health_check", {"max_level": "1"}, 2), ("https://front/c2c/health_check", {"checker": "check_collector"}, 2), -<<<<<<< ours - ("http://mapserver:8080/mapserv_proxy", {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60), + # ("https://front/admin/layertree", {}, 10), + # ("https://front/admin/layertree/children", {}, 10), ( - "https://front/mapserv_proxy", - {"ogcserver": "Main PNG", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + "http://mapserver:8080/mapserv_proxy/MainPNG", + {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60, ), ( - "https://front/mapserv_proxy", - {"ogcserver": "QGIS server", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, -======= - ("https://front/admin/layertree", {}, 10), - ("https://front/admin/layertree/children", {}, 10), - ( - "http://mapserver:8080/mapserv_proxy/mapserver", - {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + "http://mapserver:8080/mapserv_proxy/", + {"MAP": "MainPNG", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60, ), + # ( + # "https://front/mapserv_proxy", + # {"ogcserver": "Main PNG", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy/Main+PNG", + # {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + # 60, + # ), + # QGIS Server ( "https://front/mapserv_proxy", - {"ogcserver": "mapserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, ->>>>>>> theirs + {"ogcserver": "QGIS server", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60, ), # ( + # "https://front/mapserv_proxy/QGIS+server", + # {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + # 60, + # ), + # ( # "http://qgisserver:8080/mapserv_proxy/", # {"SERVICE": "WMS", "REQUEST": "GetCapabilities", "MAP": "/etc/qgisserver/project.qgs"}, # 60, From ef4d869b1f8ec010015aaa8c0b7805f95f1433f6 Mon Sep 17 00:00:00 2001 From: "geo-ghci-int[bot]" <146321879+geo-ghci-int[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:21:31 +0000 Subject: [PATCH 3/4] Update from base branch From the artifact of the previous workflow run --- env.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env.default b/env.default index afe386e55..a8706b155 100644 --- a/env.default +++ b/env.default @@ -1,5 +1,5 @@ # Default values for c2cgeoportal -GEOMAPFISH_VERSION=2.9.rc.11 +GEOMAPFISH_VERSION=2.9.rc.12 GEOMAPFISH_MAIN_VERSION=2.9 GEOMAPFISH_MAIN_MINOR_VERSION=2.9.0 COMPOSE_PROJECT_NAME=geomapfish From a68434d91b421b25ccdfe237d572017c9b4e7b2a Mon Sep 17 00:00:00 2001 From: "geo-ghci-int[bot]" <146321879+geo-ghci-int[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:21:41 +0000 Subject: [PATCH 4/4] Apply pre-commit fix From the artifact of the previous workflow run --- upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade b/upgrade index c52341095..eb846c313 100755 --- a/upgrade +++ b/upgrade @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2023, Camptocamp SA +# Copyright (c) 2019-2024, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without