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

Dev to main #315

Merged
merged 35 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4380712
UHF-8946: if user tries to access job listing with wrong language, re…
rpnykanen Sep 13, 2023
b64c100
UHF-8946: change redirectresponse to trustedredirectresponse
rpnykanen Sep 13, 2023
70b20a4
UHF-8946: add cacheable dependecy
rpnykanen Sep 13, 2023
5a38830
UHF-8946: inject entitytypemanager, code fixes
rpnykanen Sep 13, 2023
1c0ca91
UHF-8946: added all of the job listing pages to the redirect logic
rpnykanen Sep 14, 2023
4ee5d43
UHF-8946: code fixes
rpnykanen Sep 14, 2023
76ce231
UHF-8946: updated comments
rpnykanen Sep 14, 2023
aaff2c6
UHF-8946: code fixes
rpnykanen Sep 14, 2023
13e0bcf
UHF-8946: redirect test
rpnykanen Sep 14, 2023
0cc7bb1
UHF-8946: code fixes
rpnykanen Sep 14, 2023
3002cae
UHF-8946: update & fix dtt test
rpnykanen Sep 14, 2023
62c439d
UHF-8946: updated api base to have working tests in this pr
rpnykanen Sep 14, 2023
3357612
Merge branch 'dev' into UHF-8946_job_redirect
rpnykanen Sep 14, 2023
bb823de
UHF-8946: conflict merge fix
rpnykanen Sep 14, 2023
b122035
UHF-8946: code fixes
rpnykanen Sep 14, 2023
ea17936
Merge pull request #313 from City-of-Helsinki/UHF-8946_job_redirect
rpnykanen Sep 14, 2023
7307a5a
UHF-8527: Start PubSub cron
tuutti Sep 18, 2023
a633d90
Merge pull request #316 from City-of-Helsinki/UHF-8527
tuutti Sep 18, 2023
ce03ce2
UHF-8948: Remove tokenizer and field boost processors from job_listin…
Jussiles Sep 20, 2023
d074241
Update configuration
actions-bot Sep 25, 2023
5f7c8bb
Merge pull request #314 from City-of-Helsinki/update-configuration
Jussiles Sep 25, 2023
0e55585
Merge branch 'dev' into UHF-8948-fix-and-clean-job-search
Jussiles Sep 25, 2023
d3d973d
Merge pull request #317 from City-of-Helsinki/UHF-8948-fix-and-clean-…
Jussiles Sep 25, 2023
76cfa13
Update configuration
actions-bot Sep 25, 2023
4dc46f1
Merge pull request #318 from City-of-Helsinki/update-configuration
Jussiles Sep 25, 2023
ff47aa8
UHF-8702: Switched the code to 410 on unpublished job listings.
dire Sep 26, 2023
8bfd2ef
Merge pull request #319 from City-of-Helsinki/UHF-8702_410-redirect
dire Sep 26, 2023
c724faf
Update configuration
actions-bot Sep 26, 2023
dc3081e
Merge pull request #320 from City-of-Helsinki/update-configuration
teroelonen Sep 26, 2023
f6d816f
UHF-8921: added deployment cron prevention script in cron base.sh
rpnykanen Sep 27, 2023
1ed719a
Merge pull request #321 from City-of-Helsinki/UHF-8921
rpnykanen Sep 27, 2023
21b0a0f
UHF-9060: Update helfi_tunnistamo to 3.0.0 version
teroelonen Sep 27, 2023
886458d
Update configuration
actions-bot Sep 27, 2023
79275c4
Merge pull request #323 from City-of-Helsinki/update-configuration
rpnykanen Sep 27, 2023
090dfa6
Merge pull request #322 from City-of-Helsinki/UHF-9060
khalima Sep 27, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ jobs:
- name: Run PHPUnit tests
run: |
composer test-php public/modules/custom
[ -d "tests/" ] && composer test-php tests/ || echo "No DTT tests found. Ignoring..."
if [ -d "tests/" ]; then composer test-php tests/; else echo "No DTT tests found. Ignoring..."; fi
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"drupal/helfi_platform_config": "^3.0",
"drupal/helfi_proxy": "^3.0",
"drupal/helfi_tpr": "^2.0",
"drupal/helfi_tunnistamo": "^2.0",
"drupal/helfi_tunnistamo": "^3.0",
"drupal/migrate_plus": "^6.0",
"drupal/raven": "^4.0",
"drupal/redis": "^1.5",
Expand Down
136 changes: 68 additions & 68 deletions composer.lock

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions conf/cmi/core.base_field_override.node.announcement.title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: f73a43d3-1103-44c8-9cfd-42b87fbed589
langcode: en
status: true
dependencies:
config:
- node.type.announcement
_core:
default_config_hash: v0rg9ztfYRnKz2PXAcGD_Q52rTcPbwqaZLw3tXWd4rM
id: node.announcement.title
field_name: title
entity_type: node
bundle: announcement
label: 'Administrative title'
description: ''
required: true
translatable: true
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
27 changes: 18 additions & 9 deletions conf/cmi/core.entity_form_display.node.announcement.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- field.field.node.announcement.field_announcement_all_pages
- field.field.node.announcement.field_announcement_content_pages
- field.field.node.announcement.field_announcement_link
- field.field.node.announcement.field_announcement_title
- field.field.node.announcement.field_announcement_type
- node.type.announcement
module:
Expand All @@ -18,15 +19,15 @@ dependencies:
- select2
- text
_core:
default_config_hash: le2Wzlas0qZ9Bj-o6WlJbHDeisFrucs9F4B3VOK8t_w
default_config_hash: 0ewsu2ZhpNhAo4t7wkUgEa9ABQAkcsF7IXtR-kFeDUg
id: node.announcement.default
targetEntityType: node
bundle: announcement
mode: default
content:
body:
type: text_textarea_with_summary
weight: 15
weight: 18
region: content
settings:
rows: 9
Expand All @@ -42,14 +43,14 @@ content:
third_party_settings: { }
field_announcement_all_pages:
type: boolean_checkbox
weight: 11
weight: 13
region: content
settings:
display_label: true
third_party_settings: { }
field_announcement_content_pages:
type: select2_entity_reference
weight: 12
weight: 14
region: content
settings:
width: 100%
Expand All @@ -59,32 +60,40 @@ content:
third_party_settings: { }
field_announcement_link:
type: link_default
weight: 16
weight: 19
region: content
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
field_announcement_service_pages:
type: select2_entity_reference
weight: 14
weight: 16
region: content
settings:
width: 100%
autocomplete: true
match_operator: CONTAINS
match_limit: 20
third_party_settings: { }
field_announcement_title:
type: string_textfield
weight: 17
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
field_announcement_type:
type: select2
weight: 10
weight: 11
region: content
settings:
width: 100%
third_party_settings: { }
field_announcement_unit_pages:
type: select2_entity_reference
weight: 13
weight: 15
region: content
settings:
width: 100%
Expand Down Expand Up @@ -123,7 +132,7 @@ content:
settings: { }
third_party_settings: { }
simple_sitemap:
weight: 10
weight: 12
region: content
settings: { }
third_party_settings: { }
Expand Down
11 changes: 10 additions & 1 deletion conf/cmi/core.entity_view_display.node.announcement.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- field.field.node.announcement.field_announcement_all_pages
- field.field.node.announcement.field_announcement_content_pages
- field.field.node.announcement.field_announcement_link
- field.field.node.announcement.field_announcement_title
- field.field.node.announcement.field_announcement_type
- node.type.announcement
module:
Expand All @@ -15,7 +16,7 @@ dependencies:
- text
- user
_core:
default_config_hash: IHF-sP4Gq6tdTyWDxQDDEdLbHz3-QzklMNE1QA2mQU0
default_config_hash: LQ9K_wCbd758UCcNEORQvFUQ7gNJddkukiwwYHrZv4c
id: node.announcement.default
targetEntityType: node
bundle: announcement
Expand All @@ -40,6 +41,14 @@ content:
third_party_settings: { }
weight: 3
region: content
field_announcement_title:
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
weight: 4
region: content
field_announcement_type:
type: list_default
label: hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ dependencies:
- field.field.node.announcement.field_announcement_all_pages
- field.field.node.announcement.field_announcement_content_pages
- field.field.node.announcement.field_announcement_link
- field.field.node.announcement.field_announcement_title
- field.field.node.announcement.field_announcement_type
- node.type.announcement
module:
- text
- user
_core:
default_config_hash: FhIJpRvY90w782EYtR2V2Yfppyglwp191xkVdXEEbbM
default_config_hash: OwH532HYBVjDOUW0iJnoDWc2yFGZwwGJnAZEmZPjLCA
id: node.announcement.teaser
targetEntityType: node
bundle: announcement
Expand All @@ -38,6 +39,7 @@ hidden:
field_announcement_content_pages: true
field_announcement_link: true
field_announcement_service_pages: true
field_announcement_title: true
field_announcement_type: true
field_announcement_unit_pages: true
langcode: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ langcode: en
status: true
dependencies: { }
_core:
default_config_hash: XBOd0Lfy5FpXJkeuZi75vBaT7ffFCENINrui5kCVygo
default_config_hash: ZjzZvHTvsEfBX_dhlTXEZmLbS_ELM5uV7xbXTaR7D7g
id: helfi_announcements
label: 'Helfi: Announcements'
label_plural: 'Helfi: Announcements'
description: ''
read_only: true
generate_aliases: null
read_only: true
field_mapper_id: jsonpath
field_mapper_config:
field_mappings:
Expand Down Expand Up @@ -37,6 +37,8 @@ field_mapper_config:
value: '$.attributes["field_announcement_link"]["title"]'
announcement_link_url:
value: '$.attributes["field_announcement_link"]["uri"]'
announcement_assistive_technology_close_button_title:
value: '$.attributes["field_announcement_title"]'
storage_client_id: helfi_announcements
storage_client_config: { }
persistent_cache_max_age: 600
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
uuid: 70edd643-ebf7-474f-93e5-99c463aacce4
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_announcement_title
- node.type.announcement
_core:
default_config_hash: f0piVjyoLRnZfc5fbRP6BdQ6_iMw7az35Req0V6Z4mg
id: node.announcement.field_announcement_title
field_name: field_announcement_title
entity_type: node
bundle: announcement
label: 'Announcement title'
description: 'This title is only available to users of assistive technology. '
required: true
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
23 changes: 23 additions & 0 deletions conf/cmi/field.storage.node.field_announcement_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
uuid: ee7fae45-f338-46d1-a471-1fda1930f9c9
langcode: en
status: true
dependencies:
module:
- node
_core:
default_config_hash: dDVMTZxf5aD5P9HjLJX_6ThWFSclPORpZMThR3dd_XY
id: node.field_announcement_title
field_name: field_announcement_title
entity_type: node
type: string
settings:
max_length: 255
case_sensitive: false
is_ascii: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
6 changes: 6 additions & 0 deletions conf/cmi/helfi_api_base.delete_revisions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
entity_types:
- node
- paragraph
- tpr_unit
- tpr_service
- tpr_errand_service
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: 'Poikkeusilmoituksen otsikko'
description: 'Tämä otsikko on avustavan teknologian käyttäjiä varten.'
13 changes: 0 additions & 13 deletions conf/cmi/search_api.index.job_listings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ field_settings:
datasource_id: 'entity:node'
property_path: title
type: text
boost: !!float 2
dependencies:
module:
- node
Expand Down Expand Up @@ -335,24 +334,12 @@ processor_settings:
- field_recruitment_id
- field_search_id
- langcode
- title
language_with_fallback: { }
number_field_boost:
weights:
preprocess_index: 0
boosts: { }
project_execution_schedule: { }
project_image_absolute_url: { }
project_plan_schedule: { }
rendered_item: { }
reverse_entity_references: { }
tokenizer:
all_fields: false
fields: { }
spaces: ''
ignored: ._-
overlap_cjk: 1
minimum_word_size: '3'
tracker_settings:
default:
indexing_order: fifo
Expand Down
16 changes: 0 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,6 @@ services:
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-varnish.tls=true"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}-varnish.loadbalancer.server.port=6081"
- "traefik.docker.network=stonehenge-network"
robo:
image: ghcr.io/city-of-helsinki/drupal-robo:latest
shm_size: '2gb'
tty: true
volumes:
- .:/app:delegated
networks:
- internal
- stonehenge-network
depends_on:
- app
profiles:
- testing
extra_hosts:
- "${DRUPAL_HOSTNAME}:host-gateway"
- "varnish-${DRUPAL_HOSTNAME}:host-gateway"
networks:
internal:
external: false
Expand Down
19 changes: 19 additions & 0 deletions docker/openshift/crons/base.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
#!/bin/bash

# Checking if a new deployment is in progress, as we should not run cron while deploying.
if [ ! -n "$OPENSHIFT_BUILD_NAME" ]; then
echo "OPENSHIFT_BUILD_NAME is not defined. Exiting early."
exit 1
fi

while [ "$(drush state:get deploy_id)" != "$OPENSHIFT_BUILD_NAME" ]
do
echo "Current deploy_id $OPENSHIFT_BUILD_NAME not found in state. Probably a deployment is in progress - waiting for completion..."
sleep 60
done

while [ "$(drush state:get system.maintenance_mode)" = "1" ]
do
echo "Maintenance mode on. Probably a deployment is in progress - waiting for completion..."
sleep 60
done

echo "Starting cron: $(date)"

# You can add any additional cron "daemons" here:
Expand Down Expand Up @@ -27,6 +45,7 @@ exec "/crons/content-scheduler.sh" &
# Job listing migration cron
exec "/crons/migrate-job-listings.sh" &
exec "/crons/migrate-changed-job-listings.sh" &
exec "/crons/pubsub.sh" &

while true
do
Expand Down
6 changes: 5 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<env name="DTT_MINK_DRIVER_ARGS" value='["chrome", {"chromeOptions":{"w3c": false }}, "http://127.0.0.1:4444"]'/>
<env name="DTT_API_OPTIONS" value='{"socketTimeout": 360, "domWaitTimeout": 3600000}' />
<env name="DTT_API_URL" value="http://127.0.0.1:9222"/>
<env name="DTT_BASE_URL" value="http://127.0.0.1:8080"/>
<env name="DTT_BASE_URL" value="http://127.0.0.1:8888"/>
</php>
<testsuites>
<testsuite name="unit">
Expand All @@ -41,9 +41,13 @@
</testsuite>
<testsuite name="existing-site">
<directory>./tests/dtt/src/ExistingSite</directory>
<directory>./public/modules/custom/*/tests/src/ExistingSite</directory>
<directory>./public/modules/contrib/*/tests/src/ExistingSite</directory>
</testsuite>
<testsuite name="existing-site-javascript">
<directory>./tests/dtt/src/ExistingSiteJavascript</directory>
<directory>./public/modules/custom/*/tests/src/ExistingSiteJavascript</directory>
<directory>./public/modules/contrib/*/tests/src/ExistingSiteJavascript</directory>
</testsuite>
</testsuites>
<listeners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- { name: 'event_subscriber' }
helfi_rekry_content.job_listing_redirect_subscriber:
class: Drupal\helfi_rekry_content\EventSubscriber\JobListingRedirectSubscriber
arguments: ['@config.factory', '@current_user']
arguments: ['@config.factory', '@current_user', '@entity_type.manager']
tags:
- { name: 'event_subscriber' }
logger.channel.helfi_rekry_content:
Expand Down
Loading