From 437716df344e915ccba04171f8c2b2cd5435c0d8 Mon Sep 17 00:00:00 2001 From: Pierre Mauduit Date: Mon, 2 Oct 2023 17:53:58 +0200 Subject: [PATCH 01/10] back to 23.0.3-SNAPSHOT version --- georchestra-integration/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/georchestra-integration/pom.xml b/georchestra-integration/pom.xml index c1d8cd903c..0da15e9254 100644 --- a/georchestra-integration/pom.xml +++ b/georchestra-integration/pom.xml @@ -12,7 +12,7 @@ geOrchestra integration ${basedir}/.. - 23.0.2 + 23.0.3-SNAPSHOT georchestra-utils From bee14ba26973f84ef2995f50d0c29b025cc4bff3 Mon Sep 17 00:00:00 2001 From: christophe mangeat Date: Fri, 31 Mar 2023 17:51:10 +0200 Subject: [PATCH 02/10] Revert "CSW / Fix escapeChar usage" This reverts commit 3756f7ea8894a6b3fca2ab54aadbe00487c2b7c0. --- .../csw/services/getrecords/es/CswFilter2Es.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/es/CswFilter2Es.java b/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/es/CswFilter2Es.java index 77086330f6..46009b9467 100644 --- a/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/es/CswFilter2Es.java +++ b/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/es/CswFilter2Es.java @@ -201,19 +201,17 @@ protected static String escapeLikeLiteral(String text) { protected static String convertLikePattern(PropertyIsLike filter) { String result = filter.getLiteral(); if (!filter.getWildCard().equals("*")) { - final String wildcardRe = - StringUtils.isNotEmpty(filter.getEscape()) - ? Pattern.quote(filter.getEscape() + filter.getWildCard()) - : filter.getWildCard(); + final String wildcardRe = "(? Date: Mon, 3 Apr 2023 14:43:16 +0200 Subject: [PATCH 03/10] heroic fix so to let mapstore query using '/' in equals --- .../kernel/csw/services/getrecords/es/CswFilter2Es.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/es/CswFilter2Es.java b/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/es/CswFilter2Es.java index 46009b9467..7cb7034cbe 100644 --- a/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/es/CswFilter2Es.java +++ b/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/es/CswFilter2Es.java @@ -363,7 +363,7 @@ public Object visit(PropertyIsEqualTo filter, Object extraData) { String dataPropertyValue = stack.pop(); String dataPropertyName = stack.pop(); - final String filterEqualTo = String.format(templateMatch, dataPropertyName, dataPropertyValue); + final String filterEqualTo = String.format(templateMatch, dataPropertyName, dataPropertyValue.replaceAll("\\/", "\\\\\\\\/")); stack.push(filterEqualTo); return this; @@ -463,7 +463,7 @@ public Object visit(PropertyIsNil filter, Object extraData) { /** * Fills out the templateSpatial. - * + * * @param shapeType For example "bbox" or "polygon". * @param coords The coordinates in the form needed by shapeType. * @param relation Spatial operation, like "intersects". From 461ca487ec49111eeebde7cf8d3b4fb523e418c9 Mon Sep 17 00:00:00 2001 From: Pierre Mauduit Date: Thu, 5 Oct 2023 17:06:37 +0200 Subject: [PATCH 04/10] gha - adding several ways of triggering the CI --- .github/workflows/georchestra-gn4.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/georchestra-gn4.yml b/.github/workflows/georchestra-gn4.yml index 23d338ef97..2aa7a701c1 100644 --- a/.github/workflows/georchestra-gn4.yml +++ b/.github/workflows/georchestra-gn4.yml @@ -4,6 +4,8 @@ on: push: branches: - georchestra-gn4.2.x + pull_request: + workflow_dispatch: env: DOCKER_TAG: 4.2.x @@ -60,22 +62,26 @@ jobs: -DdockerImageName=georchestra/geonetwork:${DOCKER_TAG} -DskipTests - name: "publish the webapp as artifact" + if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request' uses: actions/upload-artifact@v1 with: name: geonetwork.war path: web/target/geonetwork.war - name: "Login onto docker-hub" + if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request' uses: docker/login-action@v1 with: username: '${{ secrets.DOCKER_HUB_USERNAME }}' password: '${{ secrets.DOCKER_HUB_PASSWORD }}' - name: "Pushing branch image to docker-hub" + if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request' run: | docker push georchestra/geonetwork:${DOCKER_TAG} - name: "Pushing latest image to docker-hub" + if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request' run: | docker tag georchestra/geonetwork:${DOCKER_TAG} georchestra/geonetwork:latest docker push georchestra/geonetwork:latest From 8298f95d91201bc00c49b51f66624b97c6dcf33a Mon Sep 17 00:00:00 2001 From: Pierre Mauduit Date: Mon, 9 Oct 2023 11:13:42 +0200 Subject: [PATCH 05/10] github-actions - adapting GHA to 23.0.x serie --- .github/workflows/georchestra-gn4.yml | 17 ++++++----------- .gitignore | 3 ++- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/georchestra-gn4.yml b/.github/workflows/georchestra-gn4.yml index 2aa7a701c1..60f178dec5 100644 --- a/.github/workflows/georchestra-gn4.yml +++ b/.github/workflows/georchestra-gn4.yml @@ -3,12 +3,12 @@ name: Building georchestra-geonetwork4 artifacts on: push: branches: - - georchestra-gn4.2.x + - georchestra-gn4.2.x-23.0.x pull_request: workflow_dispatch: env: - DOCKER_TAG: 4.2.x + DOCKER_TAG: 23.0.x jobs: build: @@ -25,6 +25,7 @@ jobs: with: repository: "georchestra/georchestra" path: "georchestra" + ref: "23.0.x" - name: "Setting up Java" uses: actions/setup-java@v2 @@ -62,26 +63,20 @@ jobs: -DdockerImageName=georchestra/geonetwork:${DOCKER_TAG} -DskipTests - name: "publish the webapp as artifact" - if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request' + if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x-23.0.x' && github.event_name != 'pull_request' uses: actions/upload-artifact@v1 with: name: geonetwork.war path: web/target/geonetwork.war - name: "Login onto docker-hub" - if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request' + if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x-23.0.x' && github.event_name != 'pull_request' uses: docker/login-action@v1 with: username: '${{ secrets.DOCKER_HUB_USERNAME }}' password: '${{ secrets.DOCKER_HUB_PASSWORD }}' - name: "Pushing branch image to docker-hub" - if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request' + if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x-23.0.x' && github.event_name != 'pull_request' run: | docker push georchestra/geonetwork:${DOCKER_TAG} - - - name: "Pushing latest image to docker-hub" - if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request' - run: | - docker tag georchestra/geonetwork:${DOCKER_TAG} georchestra/geonetwork:latest - docker push georchestra/geonetwork:latest diff --git a/.gitignore b/.gitignore index 5a40ff33a1..778a727c9b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,8 @@ git*.properties */*/.* */*/target/ */target/ -.*/ +**/.idea +**/.settings GeoNetwork* /geonetwork* camel-harvesters/wfsfeature-harvester/logs From d30599e28fefd1ebd09b62db417653067637cfbc Mon Sep 17 00:00:00 2001 From: Pierre Mauduit Date: Tue, 3 Oct 2023 12:06:58 +0200 Subject: [PATCH 06/10] geor-integration - attempt to fix testsuite defining rabbitMq properties on the console to have a chance that it boots up. --- .../resources/data_directory/console/console.properties | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/georchestra-integration/georchestra-authnz/src/test/resources/data_directory/console/console.properties b/georchestra-integration/georchestra-authnz/src/test/resources/data_directory/console/console.properties index df94ae8f6b..a52d20acb0 100644 --- a/georchestra-integration/georchestra-authnz/src/test/resources/data_directory/console/console.properties +++ b/georchestra-integration/georchestra-authnz/src/test/resources/data_directory/console/console.properties @@ -1,5 +1,5 @@ # set by GeorchestraDatabaseContainer as a System property, -# so bad it looks like console doesn't resolve ${} placeholders +# so bad it looks like console doesn't resolve ${} placeholders #pgsqlHost=${jdbc.host} # set by GeorchestraDatabaseContainer as a System property #pgsqlPort=${jdbc.port} @@ -184,3 +184,9 @@ AreasGroup=INSEE_DEP # Activates or disable GDPR-related endpoints # default: true #gdpr.allowAccountDeletion=true + + +rabbitmqHost=localhost +rabbitmqUser= +rabbitmqPassword= +rabbitmqPort=5672 From 86840528e1378c494864bd02545a1678e6557893 Mon Sep 17 00:00:00 2001 From: Pierre Mauduit Date: Mon, 9 Oct 2023 12:07:45 +0200 Subject: [PATCH 07/10] adding logback configuration for tests, avoids huge output --- .../src/test/resources/logback.xml | 17 +++++++++++++++++ .../src/test/resources/logback.xml | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 georchestra-integration/externalized-accounts/src/test/resources/logback.xml create mode 100644 georchestra-integration/georchestra-authnz/src/test/resources/logback.xml diff --git a/georchestra-integration/externalized-accounts/src/test/resources/logback.xml b/georchestra-integration/externalized-accounts/src/test/resources/logback.xml new file mode 100644 index 0000000000..40ee1ab076 --- /dev/null +++ b/georchestra-integration/externalized-accounts/src/test/resources/logback.xml @@ -0,0 +1,17 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n + + + + + + + + + + + + + diff --git a/georchestra-integration/georchestra-authnz/src/test/resources/logback.xml b/georchestra-integration/georchestra-authnz/src/test/resources/logback.xml new file mode 100644 index 0000000000..40ee1ab076 --- /dev/null +++ b/georchestra-integration/georchestra-authnz/src/test/resources/logback.xml @@ -0,0 +1,17 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n + + + + + + + + + + + + + From aace248461f43f206d48a9984787b4c2fc04a22b Mon Sep 17 00:00:00 2001 From: Pierre Mauduit Date: Mon, 9 Oct 2023 12:30:21 +0200 Subject: [PATCH 08/10] geor-authnz - fixing fixtures --- .../geonetwork/security/integration/defaultOrganizations.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/georchestra-integration/georchestra-authnz/src/test/resources/org/georchestra/geonetwork/security/integration/defaultOrganizations.json b/georchestra-integration/georchestra-authnz/src/test/resources/org/georchestra/geonetwork/security/integration/defaultOrganizations.json index 8c708e6d0f..23cc872d44 100644 --- a/georchestra-integration/georchestra-authnz/src/test/resources/org/georchestra/geonetwork/security/integration/defaultOrganizations.json +++ b/georchestra-integration/georchestra-authnz/src/test/resources/org/georchestra/geonetwork/security/integration/defaultOrganizations.json @@ -8,7 +8,7 @@ "category": "Company", "description": "Camptocamp SAS France", "notes": "Internal CRM notes on Camptocamp", - "lastUpdated": "24166fee9b20a69a1ca402f1b84b80c77ad0fc263542d4de06ad86ec205e5555", + "lastUpdated": "2f42c3f432c75d6fc2b38b03048d3fed6f9a02bd303d5531efbcead0300c83b2", "members": [ "testeditor" ] @@ -22,7 +22,7 @@ "category": "Association", "description": "Association PSC geOrchestra", "notes": "Internal CRM notes on PSC", - "lastUpdated": "b9142a69098fecfb1b639d6a8e9ac091284a23f6cc103dc3f5ca71688e42d9c3", + "lastUpdated": "b7a295e9654cc4d3bdd8201feb1ac74dd23cc9ea2c9947f2b05b4118ac3bbe41", "members": [ "testadmin", "testuser" From 5313f03e02ac2f5da0afe8a10cbcec2ab578a2e7 Mon Sep 17 00:00:00 2001 From: Pierre Mauduit Date: Mon, 9 Oct 2023 15:08:36 +0200 Subject: [PATCH 09/10] Revert "geor-authnz - fixing fixtures" This reverts commit aace248461f43f206d48a9984787b4c2fc04a22b. --- .../geonetwork/security/integration/defaultOrganizations.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/georchestra-integration/georchestra-authnz/src/test/resources/org/georchestra/geonetwork/security/integration/defaultOrganizations.json b/georchestra-integration/georchestra-authnz/src/test/resources/org/georchestra/geonetwork/security/integration/defaultOrganizations.json index 23cc872d44..8c708e6d0f 100644 --- a/georchestra-integration/georchestra-authnz/src/test/resources/org/georchestra/geonetwork/security/integration/defaultOrganizations.json +++ b/georchestra-integration/georchestra-authnz/src/test/resources/org/georchestra/geonetwork/security/integration/defaultOrganizations.json @@ -8,7 +8,7 @@ "category": "Company", "description": "Camptocamp SAS France", "notes": "Internal CRM notes on Camptocamp", - "lastUpdated": "2f42c3f432c75d6fc2b38b03048d3fed6f9a02bd303d5531efbcead0300c83b2", + "lastUpdated": "24166fee9b20a69a1ca402f1b84b80c77ad0fc263542d4de06ad86ec205e5555", "members": [ "testeditor" ] @@ -22,7 +22,7 @@ "category": "Association", "description": "Association PSC geOrchestra", "notes": "Internal CRM notes on PSC", - "lastUpdated": "b7a295e9654cc4d3bdd8201feb1ac74dd23cc9ea2c9947f2b05b4118ac3bbe41", + "lastUpdated": "b9142a69098fecfb1b639d6a8e9ac091284a23f6cc103dc3f5ca71688e42d9c3", "members": [ "testadmin", "testuser" From 2ab75cd832066d8a2ffb82b9cdaacfddfa977dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Van=20Der=20Biest?= Date: Sun, 12 Nov 2023 16:46:59 +0100 Subject: [PATCH 10/10] backport default UI settings to 23.0.x --- .../classes/setup/sql/data/data-db-default.sql | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql b/web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql index 6257d9d1a1..bebf24236d 100644 --- a/web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql +++ b/web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql @@ -913,7 +913,7 @@ INSERT INTO settings_ui VALUES ('srv', '{ }, "footer": { "enabled": false, - "showSocialBarInFooter": true + "showSocialBarInFooter": false }, "geocoder": { "appUrl": "https://secure.geonames.org/searchJSON", @@ -953,6 +953,7 @@ INSERT INTO settings_ui VALUES ('srv', '{ "home": { "appUrl": "../../{{node}}/{{lang}}/catalog.search#/home", "enabled": true, + "showMosaic": false, "facetConfig": { "cl_hierarchyLevel.key": { "terms": { @@ -965,12 +966,6 @@ INSERT INTO settings_ui VALUES ('srv', '{ "field": "cl_topic.key", "size": 20 } - }, - "inspireThemeUri": { - "terms": { - "field": "inspireThemeUri", - "size": 34 - } } }, "fluidLayout": true, @@ -1071,7 +1066,7 @@ INSERT INTO settings_ui VALUES ('srv', '{ }, "recordview": { "enabled": true, - "isSocialbarEnabled": true + "isSocialbarEnabled": false }, "search": { "appUrl": "../../{{node}}/{{lang}}/catalog.search#/search", @@ -1262,7 +1257,7 @@ INSERT INTO settings_ui VALUES ('srv', '{ 60, 120 ], - "isFilterTagsDisplayedInSearch": true, + "isFilterTagsDisplayedInSearch": false, "isVegaEnabled": true, "linkTypes": { "downloads": [