From 4c69ca59f6af86b3aef082997772cb2f878a6fc3 Mon Sep 17 00:00:00 2001 From: tuutti <771113+tuutti@users.noreply.github.com> Date: Tue, 26 Nov 2024 07:00:10 +0000 Subject: [PATCH] Update configuration --- compose.yaml | 5 +- composer.lock | 154 +++++++++--------- ...form_display.node.landing_page.default.yml | 2 +- ...image_gallery_item.field_gallery_image.yml | 2 +- conf/cmi/search_api.index.news.yml | 15 +- conf/cmi/search_api.index.news_terms.yml | 3 +- docker/openshift/crons/menu-queue.sh | 17 ++ docker/openshift/crons/revision-queue.sh | 11 ++ public/sites/default/settings.php | 34 ++-- 9 files changed, 136 insertions(+), 107 deletions(-) create mode 100644 docker/openshift/crons/menu-queue.sh create mode 100644 docker/openshift/crons/revision-queue.sh diff --git a/compose.yaml b/compose.yaml index c680d449c..8e5cc53e3 100644 --- a/compose.yaml +++ b/compose.yaml @@ -151,13 +151,12 @@ services: - search artemis: container_name: "${COMPOSE_PROJECT_NAME}-artemis" - image: quay.io/artemiscloud/activemq-artemis-broker - environment: - AMQ_EXTRA_ARGS: "--user admin --password admin" + image: apache/activemq-artemis depends_on: - app networks: - internal + - stonehenge-network profiles: - queue chromium: diff --git a/composer.lock b/composer.lock index b86e03098..21e940561 100644 --- a/composer.lock +++ b/composer.lock @@ -2360,16 +2360,16 @@ }, { "name": "drupal/core", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "42a6516491b4793158542a2326dc6ad1fe2aa5bd" + "reference": "3ebb71e9c4ef0c13f683353547551fca49f9a144" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/42a6516491b4793158542a2326dc6ad1fe2aa5bd", - "reference": "42a6516491b4793158542a2326dc6ad1fe2aa5bd", + "url": "https://api.github.com/repos/drupal/core/zipball/3ebb71e9c4ef0c13f683353547551fca49f9a144", + "reference": "3ebb71e9c4ef0c13f683353547551fca49f9a144", "shasum": "" }, "require": { @@ -2518,13 +2518,13 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/10.3.9" + "source": "https://github.com/drupal/core/tree/10.3.10" }, - "time": "2024-11-20T17:59:45+00:00" + "time": "2024-11-22T12:51:33+00:00" }, { "name": "drupal/core-composer-scaffold", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core-composer-scaffold.git", @@ -2568,7 +2568,7 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-composer-scaffold/tree/10.3.9" + "source": "https://github.com/drupal/core-composer-scaffold/tree/10.3.10" }, "time": "2024-08-22T14:31:34+00:00" }, @@ -4255,16 +4255,16 @@ }, { "name": "drupal/hdbt", - "version": "6.8.9", + "version": "6.8.10", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "01dac91a676828e19a6ace8b6e53a9e2a4c26b7a" + "reference": "2427bb6c2988c157285e685308e16f0c66e8d5e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/01dac91a676828e19a6ace8b6e53a9e2a4c26b7a", - "reference": "01dac91a676828e19a6ace8b6e53a9e2a4c26b7a", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/2427bb6c2988c157285e685308e16f0c66e8d5e1", + "reference": "2427bb6c2988c157285e685308e16f0c66e8d5e1", "shasum": "" }, "require": { @@ -4283,10 +4283,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.8.9", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.8.10", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2024-11-20T13:11:33+00:00" + "time": "2024-11-22T12:52:59+00:00" }, { "name": "drupal/hdbt_admin", @@ -4384,16 +4384,16 @@ }, { "name": "drupal/helfi_api_base", - "version": "2.7.15", + "version": "2.7.17", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base.git", - "reference": "bfada1ee33120497e8dde6dbde201320f41e2dfc" + "reference": "d5d46f30b9ec1ccac5b5bac130097454232e35a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/bfada1ee33120497e8dde6dbde201320f41e2dfc", - "reference": "bfada1ee33120497e8dde6dbde201320f41e2dfc", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/d5d46f30b9ec1ccac5b5bac130097454232e35a8", + "reference": "d5d46f30b9ec1ccac5b5bac130097454232e35a8", "shasum": "" }, "require": { @@ -4415,7 +4415,9 @@ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "dg/bypass-finals": "^1.0", "donatj/mock-webserver": "dev-master", - "drupal/coder": "^8.3" + "drupal/coder": "^8.3", + "drupal/elasticsearch_connector": "^8.0@alpha", + "drupal/search_api": "^1.0" }, "type": "drupal-module", "license": [ @@ -4423,10 +4425,10 @@ ], "description": "Helfi - API Base", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.7.15", + "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.7.17", "issues": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/issues" }, - "time": "2024-11-08T08:31:53+00:00" + "time": "2024-11-22T08:27:20+00:00" }, { "name": "drupal/helfi_azure_fs", @@ -4480,17 +4482,20 @@ "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-tools.git", - "reference": "53ad81c4249c6dd38deea3f6014ad0b1be47f2db" + "reference": "3de6f884ac7de9a43fe242f371dcf9416cac47b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/53ad81c4249c6dd38deea3f6014ad0b1be47f2db", - "reference": "53ad81c4249c6dd38deea3f6014ad0b1be47f2db", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/3de6f884ac7de9a43fe242f371dcf9416cac47b2", + "reference": "3de6f884ac7de9a43fe242f371dcf9416cac47b2", "shasum": "" }, "require": { "drupal/helfi_api_base": "*", - "drush/drush": "^11 || ^12 || ^13" + "drush/drush": "^12 || ^13" + }, + "conflict": { + "drush/drush": "< 12.5" }, "require-dev": { "composer/installers": "^2", @@ -4557,7 +4562,7 @@ "source": "https://github.com/City-of-Helsinki/drupal-tools/tree/main", "issues": "https://github.com/City-of-Helsinki/drupal-tools/issues" }, - "time": "2024-10-23T10:28:01+00:00" + "time": "2024-11-26T06:52:09+00:00" }, { "name": "drupal/helfi_navigation", @@ -4595,16 +4600,16 @@ }, { "name": "drupal/helfi_platform_config", - "version": "4.8.0", + "version": "4.8.1", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "d93cdc55e761665a2bb68503f466ab376a745c10" + "reference": "6c57a1041a22c37008822ea642ce63c763081369" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/d93cdc55e761665a2bb68503f466ab376a745c10", - "reference": "d93cdc55e761665a2bb68503f466ab376a745c10", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/6c57a1041a22c37008822ea642ce63c763081369", + "reference": "6c57a1041a22c37008822ea642ce63c763081369", "shasum": "" }, "require": { @@ -4673,7 +4678,7 @@ "ruflin/elastica": "^8.0" }, "conflict": { - "drupal/core": "<10.3", + "drupal/core": "<10.3.10", "drupal/core-composer-scaffold": "<10.3", "drupal/ctools": "<3.11 || ^4.0.1", "drupal/default_content": ">2.0.0-alpha2", @@ -4701,8 +4706,7 @@ "[#UHF-9388] Process configuration translation files for custom modules (https://www.drupal.org/i/2845437)": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/fd68277191b8f8ec290e53b5fbbae699b2260384/patches/drupal-2845437-process-custom-module-translation-config-10.3.x.patch", "[#UHF-9690] Allow updating lists when switching from allowed values to allowed values function (https://www.drupal.org/i/2873353)": "https://www.drupal.org/files/issues/2021-05-18/allow-allowed-values-function-update-D9-2873353_1.patch", "[#UHF-9952, #UHF-9980] Duplicate
tags (https://www.drupal.org/i/3083786)": "https://www.drupal.org/files/issues/2024-08-08/3083786--mr-8066--10-3-backport.patch", - "[#UHF-10716] Ensure consistent ordering when calculating library asset order (https://www.drupal.org/i/3467860)": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/955e2fc9493c6574ab070187b8a5a8634da7daab/patches/drupal-3467860-optimized-js-assets-mismatch.patch", - "[#UHF-10967] Performance Degraded after update to twig 3.14.2 (https://www.drupal.org/project/drupal/issues/3487031)": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/90b44ce5a778d05bbe89f7eaca6412b7bd34efa0/patches/10177.patch" + "[#UHF-10716] Ensure consistent ordering when calculating library asset order (https://www.drupal.org/i/3467860)": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/955e2fc9493c6574ab070187b8a5a8634da7daab/patches/drupal-3467860-optimized-js-assets-mismatch.patch" }, "drupal/default_content": { "https://www.drupal.org/project/default_content/issues/2640734#comment-14638943": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/main/patches/default_content_2.0.0-alpha2-2640734_manual_imports-e164a354.patch" @@ -4731,10 +4735,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.8.0", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.8.1", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2024-11-20T11:35:52+00:00" + "time": "2024-11-25T13:05:33+00:00" }, { "name": "drupal/helfi_proxy", @@ -7348,20 +7352,20 @@ }, { "name": "drupal/search_api", - "version": "1.35.0", + "version": "1.36.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/search_api.git", - "reference": "8.x-1.35" + "reference": "8.x-1.36" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/search_api-8.x-1.35.zip", - "reference": "8.x-1.35", - "shasum": "d119726e870f793c6470d2a4fa9286662c5eb45d" + "url": "https://ftp.drupal.org/files/projects/search_api-8.x-1.36.zip", + "reference": "8.x-1.36", + "shasum": "1464f21cb924746a0df7f4cb080abaf00804e9a7" }, "require": { - "drupal/core": "^10.1 || ^11" + "drupal/core": "^10.2 || ^11" }, "conflict": { "drupal/search_api_solr": "2.* || 3.0 || 3.1" @@ -7379,17 +7383,12 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.35", - "datestamp": "1718551025", + "version": "8.x-1.36", + "datestamp": "1732448767", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" } - }, - "drush": { - "services": { - "drush.services.yml": "^9 || ^10 || ^11" - } } }, "notification-url": "https://packages.drupal.org/8/downloads", @@ -7474,36 +7473,37 @@ }, { "name": "drupal/simple_sitemap", - "version": "4.2.1", + "version": "4.2.2", "source": { "type": "git", "url": "https://git.drupalcode.org/project/simple_sitemap.git", - "reference": "4.2.1" + "reference": "4.2.2" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/simple_sitemap-4.2.1.zip", - "reference": "4.2.1", - "shasum": "d96b481571ca2fecdb305e87d2557f9338116864" + "url": "https://ftp.drupal.org/files/projects/simple_sitemap-4.2.2.zip", + "reference": "4.2.2", + "shasum": "1f9c9197d37450fb347a4fa3f10191f5f4b5ef13" }, "require": { "drupal/core": "^10.2 || ^11", "ext-xmlwriter": "*" }, + "conflict": { + "drush/drush": "<12.5.1" + }, + "require-dev": { + "drupal/paragraphs": "^1.18" + }, "type": "drupal-module", "extra": { "drupal": { - "version": "4.2.1", - "datestamp": "1723802052", + "version": "4.2.2", + "datestamp": "1732485885", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" } - }, - "drush": { - "services": { - "drush.services.yml": ">=9" - } } }, "notification-url": "https://packages.drupal.org/8/downloads", @@ -9245,16 +9245,16 @@ }, { "name": "firebase/php-jwt", - "version": "v6.10.1", + "version": "v6.10.2", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "500501c2ce893c824c801da135d02661199f60c5" + "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/500501c2ce893c824c801da135d02661199f60c5", - "reference": "500501c2ce893c824c801da135d02661199f60c5", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/30c19ed0f3264cb660ea496895cfb6ef7ee3653b", + "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b", "shasum": "" }, "require": { @@ -9302,9 +9302,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.10.1" + "source": "https://github.com/firebase/php-jwt/tree/v6.10.2" }, - "time": "2024-05-18T18:05:11+00:00" + "time": "2024-11-24T11:22:49+00:00" }, { "name": "galbar/jsonpath", @@ -9359,16 +9359,16 @@ }, { "name": "grasmash/expander", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/grasmash/expander.git", - "reference": "bb1c1a2430957945cf08c5a62f5d72a6aa6a2c82" + "reference": "eea11b9afb0c32483b18b9009f4ca07b770e39f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/grasmash/expander/zipball/bb1c1a2430957945cf08c5a62f5d72a6aa6a2c82", - "reference": "bb1c1a2430957945cf08c5a62f5d72a6aa6a2c82", + "url": "https://api.github.com/repos/grasmash/expander/zipball/eea11b9afb0c32483b18b9009f4ca07b770e39f4", + "reference": "eea11b9afb0c32483b18b9009f4ca07b770e39f4", "shasum": "" }, "require": { @@ -9405,9 +9405,9 @@ "description": "Expands internal property references in PHP arrays file.", "support": { "issues": "https://github.com/grasmash/expander/issues", - "source": "https://github.com/grasmash/expander/tree/3.0.0" + "source": "https://github.com/grasmash/expander/tree/3.0.1" }, - "time": "2022-05-10T13:14:49+00:00" + "time": "2024-11-25T23:28:05+00:00" }, { "name": "grasmash/yaml-cli", @@ -11219,16 +11219,16 @@ }, { "name": "pear/pear-core-minimal", - "version": "v1.10.15", + "version": "v1.10.16", "source": { "type": "git", "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "ce0adade8b97561656ace07cdaac4751c271ea8c" + "reference": "c0f51b45f50683bf5bbf558036854ebc9b54d033" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/ce0adade8b97561656ace07cdaac4751c271ea8c", - "reference": "ce0adade8b97561656ace07cdaac4751c271ea8c", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/c0f51b45f50683bf5bbf558036854ebc9b54d033", + "reference": "c0f51b45f50683bf5bbf558036854ebc9b54d033", "shasum": "" }, "require": { @@ -11264,7 +11264,7 @@ "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", "source": "https://github.com/pear/pear-core-minimal" }, - "time": "2024-03-16T18:41:45+00:00" + "time": "2024-11-24T22:27:58+00:00" }, { "name": "pear/pear_exception", diff --git a/conf/cmi/core.entity_form_display.node.landing_page.default.yml b/conf/cmi/core.entity_form_display.node.landing_page.default.yml index 027379657..cff76fd10 100644 --- a/conf/cmi/core.entity_form_display.node.landing_page.default.yml +++ b/conf/cmi/core.entity_form_display.node.landing_page.default.yml @@ -128,9 +128,9 @@ content: third_party_settings: { } simple_sitemap: weight: 10 + region: content settings: { } third_party_settings: { } - region: content status: type: boolean_checkbox weight: 12 diff --git a/conf/cmi/language/sv/field.field.paragraph.image_gallery_item.field_gallery_image.yml b/conf/cmi/language/sv/field.field.paragraph.image_gallery_item.field_gallery_image.yml index b7c0a4502..cef092dc9 100644 --- a/conf/cmi/language/sv/field.field.paragraph.image_gallery_item.field_gallery_image.yml +++ b/conf/cmi/language/sv/field.field.paragraph.image_gallery_item.field_gallery_image.yml @@ -1 +1 @@ -label: Bild +label: 'Bild (stöds på andra språk)' diff --git a/conf/cmi/search_api.index.news.yml b/conf/cmi/search_api.index.news.yml index c2242d3ad..9d78a1f23 100644 --- a/conf/cmi/search_api.index.news.yml +++ b/conf/cmi/search_api.index.news.yml @@ -3,23 +3,22 @@ langcode: en status: true dependencies: config: - - field.storage.node.field_main_image_caption - field.storage.media.field_media_image - - field.storage.node.field_main_image - field.storage.media.field_photographer + - field.storage.node.field_main_image + - field.storage.node.field_main_image_caption - field.storage.node.field_news_groups - - field.storage.node.field_news_neighbourhoods - field.storage.node.field_news_item_tags + - field.storage.node.field_news_neighbourhoods - field.storage.node.field_short_title - search_api.server.news module: - - node - - media - - taxonomy - - publication_date - - search_api - helfi_etusivu - helfi_react_search + - media + - node + - publication_date + - taxonomy id: news name: news description: '' diff --git a/conf/cmi/search_api.index.news_terms.yml b/conf/cmi/search_api.index.news_terms.yml index 7ef5a643a..c3c57d9bd 100644 --- a/conf/cmi/search_api.index.news_terms.yml +++ b/conf/cmi/search_api.index.news_terms.yml @@ -5,10 +5,9 @@ dependencies: config: - search_api.server.news module: - - taxonomy - - search_api - helfi_etusivu - helfi_react_search + - taxonomy id: news_terms name: news-terms description: '' diff --git a/docker/openshift/crons/menu-queue.sh b/docker/openshift/crons/menu-queue.sh new file mode 100644 index 000000000..c4cd99b0b --- /dev/null +++ b/docker/openshift/crons/menu-queue.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +source /init.sh + +if [ -z "$AMQ_BROKERS" ]; then + exit 0 +fi + +if ! is_drupal_module_enabled "helfi_navigation"; then + exit 0 +fi + +while true +do + # Restart process every 12 hours. + drush stomp:worker helfi_navigation_menu_queue --lease-time 43200 +done diff --git a/docker/openshift/crons/revision-queue.sh b/docker/openshift/crons/revision-queue.sh new file mode 100644 index 000000000..130ba3fe9 --- /dev/null +++ b/docker/openshift/crons/revision-queue.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ -z "$AMQ_BROKERS" ]; then + exit 0 +fi + +while true +do + # Restart process every 12 hours. + drush stomp:worker helfi_api_base_revision --lease-time 43200 +done diff --git a/public/sites/default/settings.php b/public/sites/default/settings.php index 2f8d1e8e8..b80276cd8 100644 --- a/public/sites/default/settings.php +++ b/public/sites/default/settings.php @@ -260,24 +260,18 @@ function drupal_get_env(string|array $variables) : mixed { $config['helfi_proxy.settings']['session_suffix'] = $session_suffix; } -if ($robots_header_enabled = getenv('DRUPAL_X_ROBOTS_TAG_HEADER')) { - $config['helfi_proxy.settings']['robots_header_enabled'] = (bool) $robots_header_enabled; -} - -$artemis_destination = drupal_get_env([ - 'ARTEMIS_DESTINATION', +$amq_destination = drupal_get_env([ 'PROJECT_NAME', ]); +$amq_brokers = getenv('AMQ_BROKERS'); -$artemis_brokers = getenv('ARTEMIS_BROKERS'); - -if ($artemis_brokers && $artemis_destination) { +if ($amq_brokers && $amq_destination) { $settings['stomp']['default'] = [ - 'clientId' => getenv('ARTEMIS_CLIENT_ID') ?: 'artemis', - 'login' => getenv('ARTEMIS_LOGIN') ?: NULL, - 'passcode' => getenv('ARTEMIS_PASSCODE') ?: NULL, - 'destination' => sprintf('/queue/%s', $artemis_destination), - 'brokers' => $artemis_brokers, + 'clientId' => getenv('AMQ_CLIENT_ID') ?: 'client_ ' . $amq_destination, + 'login' => getenv('AMQ_USER') ?: NULL, + 'passcode' => getenv('AMQ_PASSWORD') ?: NULL, + 'destination' => sprintf('/queue/%s', $amq_destination), + 'brokers' => $amq_brokers, 'timeout' => ['read' => 12000], 'heartbeat' => [ 'send' => 20000, @@ -289,7 +283,17 @@ function drupal_get_env(string|array $variables) : mixed { ], ], ]; - $settings['queue_default'] = 'queue.stomp.default'; + + $queues = [ + 'helfi_navigation_menu_queue', + 'helfi_api_base_revision', + ]; + foreach ($queues as $queue) { + $settings['queue_service_' . $queue] = 'queue.stomp.default'; + } + // You must configure project specific queues manually in 'all.settings.php' + // file. + // @see https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/documentation/queue.md } $config['filelog.settings']['rotation']['schedule'] = 'never';