Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade failed #1524

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .UPGRADE_INSTRUCTIONS
Original file line number Diff line number Diff line change
@@ -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/<file>` on your project's `<file>`.
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/<file> <file>`).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
67 changes: 67 additions & 0 deletions .upgrade.yaml
Original file line number Diff line number Diff line change
@@ -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:
# - <one file or directory>
# Move a file:
# - action: move
# from: <src file>
# to: <dst file>
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
2 changes: 2 additions & 0 deletions CONST_create_template/docker-compose-lib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CONST_create_template/env.default
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion CONST_create_template/geoportal/webpack.apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}',
},
})
Expand Down
39 changes: 37 additions & 2 deletions CONST_create_template/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose-lib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion env.default
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion env.project
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion geoportal/webpack.apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}',
},
})
Expand Down
1 change: 1 addition & 0 deletions mapserver/mapserver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CONFIG
# Map aliases
#
MAPS
MainPNG "/etc/mapserver/mapserver.map"
END

END
59 changes: 56 additions & 3 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,70 @@
("https://front/c2c/health_check", {}, 2),
("https://front/c2c/health_check", {"max_level": "1"}, 2),
("https://front/c2c/health_check", {"checker": "check_collector"}, 2),
("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,
),
(
"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": "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,
# ),
# (
# "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:
Expand Down
Loading