From a455ae5daf4a4de2afba01aa160ffe3f5694ef53 Mon Sep 17 00:00:00 2001 From: Aga Dufrat Date: Wed, 16 Oct 2024 12:33:07 +0100 Subject: [PATCH 1/9] Add `landing_page` to the list of schema types It was added in https://github.com/alphagov/publishing-api/pull/2895 It'll resolves the following error: Etl::Edition::Content::Parser::InvalidSchemaError Schema does not exist: landing_page (Etl::Edition::Content::Parser::InvalidSchemaError) https://govuk.sentry.io/issues/5990615040/events/0c7c5380338f49b29b5fe0fb1a168a25/ --- app/domain/etl/edition/content/parsers/no_content.rb | 1 + spec/domain/etl/edition/content/no_content_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/domain/etl/edition/content/parsers/no_content.rb b/app/domain/etl/edition/content/parsers/no_content.rb index b47808bef..cbee9f943 100644 --- a/app/domain/etl/edition/content/parsers/no_content.rb +++ b/app/domain/etl/edition/content/parsers/no_content.rb @@ -18,6 +18,7 @@ def schemas homepage how_government_works knowledge_alpha + landing_page ministers_index organisations_homepage person diff --git a/spec/domain/etl/edition/content/no_content_spec.rb b/spec/domain/etl/edition/content/no_content_spec.rb index 218a1be8c..61eed5b0f 100644 --- a/spec/domain/etl/edition/content/no_content_spec.rb +++ b/spec/domain/etl/edition/content/no_content_spec.rb @@ -19,6 +19,7 @@ homepage how_government_works knowledge_alpha + landing_page ministers_index organisations_homepage person From fbfc17715f0d00422e5ef95bd477711657b706ed Mon Sep 17 00:00:00 2001 From: Aga Dufrat Date: Wed, 16 Oct 2024 14:52:38 +0100 Subject: [PATCH 2/9] Add missing test for `government` no content schema --- spec/domain/etl/edition/content/no_content_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/domain/etl/edition/content/no_content_spec.rb b/spec/domain/etl/edition/content/no_content_spec.rb index 61eed5b0f..d8eda95a9 100644 --- a/spec/domain/etl/edition/content/no_content_spec.rb +++ b/spec/domain/etl/edition/content/no_content_spec.rb @@ -16,6 +16,7 @@ facet_group facet_value generic + government homepage how_government_works knowledge_alpha From 34bef5ea0cc9a141149d600c0736169dbf442de8 Mon Sep 17 00:00:00 2001 From: Aga Dufrat Date: Wed, 16 Oct 2024 14:53:59 +0100 Subject: [PATCH 3/9] Sort no_content_schemas alphabetically --- app/domain/etl/edition/content/parsers/no_content.rb | 8 ++++---- spec/domain/etl/edition/content/no_content_spec.rb | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/domain/etl/edition/content/parsers/no_content.rb b/app/domain/etl/edition/content/parsers/no_content.rb index cbee9f943..e02615214 100644 --- a/app/domain/etl/edition/content/parsers/no_content.rb +++ b/app/domain/etl/edition/content/parsers/no_content.rb @@ -5,9 +5,9 @@ def parse(_json) def schemas %w[ - coronavirus_landing_page coming_soon completed_transaction + coronavirus_landing_page embassies_index external_content facet @@ -22,23 +22,23 @@ def schemas ministers_index organisations_homepage person + placeholder placeholder_corporate_information_page placeholder_ministerial_role placeholder_organisation + placeholder_person placeholder_policy_area placeholder_topical_event placeholder_world_location placeholder_worldwide_organisation - placeholder_person - placeholder policy redirect role role_appointment special_route topic - world_location vanish + world_location ] end end diff --git a/spec/domain/etl/edition/content/no_content_spec.rb b/spec/domain/etl/edition/content/no_content_spec.rb index d8eda95a9..07e185de2 100644 --- a/spec/domain/etl/edition/content/no_content_spec.rb +++ b/spec/domain/etl/edition/content/no_content_spec.rb @@ -24,23 +24,23 @@ ministers_index organisations_homepage person + placeholder placeholder_corporate_information_page placeholder_ministerial_role placeholder_organisation + placeholder_person placeholder_policy_area placeholder_topical_event placeholder_world_location placeholder_worldwide_organisation - placeholder_person - placeholder policy redirect role role_appointment special_route topic - world_location vanish + world_location ] no_content_schemas.each do |schema| json = build_raw_json(schema_name: schema, body: "

Body for #{schema}

") From c854e36fd54c11e256830de24d432b699e373482 Mon Sep 17 00:00:00 2001 From: Aga Dufrat Date: Wed, 16 Oct 2024 16:02:06 +0100 Subject: [PATCH 4/9] Add `field_of_operation` to the list of schema types It was added in https://github.com/alphagov/publishing-api/pull/2306 It'll resolves the following error: Etl::Edition::Content::Parser::InvalidSchemaError Schema does not exist: field_of_operation (Etl::Edition::Content::Parser::InvalidSchemaError) https://govuk.sentry.io/issues/4027454939/events/0edd2fd53fb548508b273b0868451629/ --- app/domain/etl/edition/content/parsers/no_content.rb | 1 + spec/domain/etl/edition/content/no_content_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/domain/etl/edition/content/parsers/no_content.rb b/app/domain/etl/edition/content/parsers/no_content.rb index e02615214..92cf02d66 100644 --- a/app/domain/etl/edition/content/parsers/no_content.rb +++ b/app/domain/etl/edition/content/parsers/no_content.rb @@ -13,6 +13,7 @@ def schemas facet facet_group facet_value + field_of_operation generic government homepage diff --git a/spec/domain/etl/edition/content/no_content_spec.rb b/spec/domain/etl/edition/content/no_content_spec.rb index 07e185de2..e2ac8c8a4 100644 --- a/spec/domain/etl/edition/content/no_content_spec.rb +++ b/spec/domain/etl/edition/content/no_content_spec.rb @@ -15,6 +15,7 @@ facet facet_group facet_value + field_of_operation generic government homepage From dae6659d8f7260cc850e7cf647062b18031ea73e Mon Sep 17 00:00:00 2001 From: Aga Dufrat Date: Wed, 16 Oct 2024 16:09:25 +0100 Subject: [PATCH 5/9] Add `historic_appointments` to the list of schema types It was added in https://github.com/alphagov/publishing-api/pull/2306 It'll resolve the following error: Etl::Edition::Content::Parser::InvalidSchemaError Schema does not exist: historic_appointments (Etl::Edition::Content::Parser::InvalidSchemaError) https://govuk.sentry.io/issues/4004616404/events/432eba9312604145b33b27a108297351/ --- app/domain/etl/edition/content/parsers/no_content.rb | 1 + spec/domain/etl/edition/content/no_content_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/domain/etl/edition/content/parsers/no_content.rb b/app/domain/etl/edition/content/parsers/no_content.rb index 92cf02d66..51301de30 100644 --- a/app/domain/etl/edition/content/parsers/no_content.rb +++ b/app/domain/etl/edition/content/parsers/no_content.rb @@ -16,6 +16,7 @@ def schemas field_of_operation generic government + historic_appointments homepage how_government_works knowledge_alpha diff --git a/spec/domain/etl/edition/content/no_content_spec.rb b/spec/domain/etl/edition/content/no_content_spec.rb index e2ac8c8a4..5d8fb4821 100644 --- a/spec/domain/etl/edition/content/no_content_spec.rb +++ b/spec/domain/etl/edition/content/no_content_spec.rb @@ -18,6 +18,7 @@ field_of_operation generic government + historic_appointments homepage how_government_works knowledge_alpha From 393c4a97c22c8a3d808282d5ad9ad98707310a01 Mon Sep 17 00:00:00 2001 From: Aga Dufrat Date: Wed, 16 Oct 2024 16:12:28 +0100 Subject: [PATCH 6/9] Add `historic_appointment` to the list of schema types It was added in https://github.com/alphagov/publishing-api/pull/2260 It'll resolve the following error: Etl::Edition::Content::Parser::InvalidSchemaError Schema does not exist: historic_appointment (Etl::Edition::Content::Parser::InvalidSchemaError) https://govuk.sentry.io/issues/5419623794/events/1d64a46997ec4b11a8b255dd02dfb600/ --- app/domain/etl/edition/content/parsers/no_content.rb | 1 + spec/domain/etl/edition/content/no_content_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/domain/etl/edition/content/parsers/no_content.rb b/app/domain/etl/edition/content/parsers/no_content.rb index 51301de30..55230703c 100644 --- a/app/domain/etl/edition/content/parsers/no_content.rb +++ b/app/domain/etl/edition/content/parsers/no_content.rb @@ -17,6 +17,7 @@ def schemas generic government historic_appointments + historic_appointment homepage how_government_works knowledge_alpha diff --git a/spec/domain/etl/edition/content/no_content_spec.rb b/spec/domain/etl/edition/content/no_content_spec.rb index 5d8fb4821..35e1ed89d 100644 --- a/spec/domain/etl/edition/content/no_content_spec.rb +++ b/spec/domain/etl/edition/content/no_content_spec.rb @@ -19,6 +19,7 @@ generic government historic_appointments + historic_appointment homepage how_government_works knowledge_alpha From 7f8f22d3ad0a7c52487dec06bb48e90ad51bbdad Mon Sep 17 00:00:00 2001 From: Aga Dufrat Date: Wed, 16 Oct 2024 16:34:04 +0100 Subject: [PATCH 7/9] Add `smart_answer` to the list of schema types It'll resolve the following error: Etl::Edition::Content::Parser::InvalidSchemaError Schema does not exist: smart_answer (Etl::Edition::Content::Parser::InvalidSchemaError) https://govuk.sentry.io/issues/4004260010/events/cd348c0dadbe460287e3ac17678fa55d/ --- app/domain/etl/edition/content/parsers/no_content.rb | 1 + spec/domain/etl/edition/content/no_content_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/domain/etl/edition/content/parsers/no_content.rb b/app/domain/etl/edition/content/parsers/no_content.rb index 55230703c..3d9e56b1d 100644 --- a/app/domain/etl/edition/content/parsers/no_content.rb +++ b/app/domain/etl/edition/content/parsers/no_content.rb @@ -38,6 +38,7 @@ def schemas redirect role role_appointment + smart_answer special_route topic vanish diff --git a/spec/domain/etl/edition/content/no_content_spec.rb b/spec/domain/etl/edition/content/no_content_spec.rb index 35e1ed89d..0fd7c21a1 100644 --- a/spec/domain/etl/edition/content/no_content_spec.rb +++ b/spec/domain/etl/edition/content/no_content_spec.rb @@ -40,6 +40,7 @@ redirect role role_appointment + smart_answer special_route topic vanish From 5850461ef079d21298c8e9d5487551bf0f58f8d5 Mon Sep 17 00:00:00 2001 From: Aga Dufrat Date: Wed, 16 Oct 2024 16:37:18 +0100 Subject: [PATCH 8/9] Add `substitute` to the list of schema types It was added in https://github.com/alphagov/publishing-api/pull/2664 It'll resolves the following error: Etl::Edition::Content::Parser::InvalidSchemaError Schema does not exist: substitute (Etl::Edition::Content::Parser::InvalidSchemaError) https://govuk.sentry.io/issues/5176804130/events/7fb1eb6bf44a4e44a88a8008d5dccee9/ --- app/domain/etl/edition/content/parsers/no_content.rb | 1 + spec/domain/etl/edition/content/no_content_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/domain/etl/edition/content/parsers/no_content.rb b/app/domain/etl/edition/content/parsers/no_content.rb index 3d9e56b1d..8db95f126 100644 --- a/app/domain/etl/edition/content/parsers/no_content.rb +++ b/app/domain/etl/edition/content/parsers/no_content.rb @@ -40,6 +40,7 @@ def schemas role_appointment smart_answer special_route + substitute topic vanish world_location diff --git a/spec/domain/etl/edition/content/no_content_spec.rb b/spec/domain/etl/edition/content/no_content_spec.rb index 0fd7c21a1..1e52ce052 100644 --- a/spec/domain/etl/edition/content/no_content_spec.rb +++ b/spec/domain/etl/edition/content/no_content_spec.rb @@ -42,6 +42,7 @@ role_appointment smart_answer special_route + substitute topic vanish world_location From 1f1e2da705d90d5dcf61654d2e0bd74bc6b1f069 Mon Sep 17 00:00:00 2001 From: Aga Dufrat Date: Wed, 16 Oct 2024 16:46:37 +0100 Subject: [PATCH 9/9] Add `world_index` to the list of schema types It was added in https://github.com/alphagov/publishing-api/pull/2328 It'll resolves the following error: Etl::Edition::Content::Parser::InvalidSchemaError Schema does not exist: world_index (Etl::Edition::Content::Parser::InvalidSchemaError) https://govuk.sentry.io/issues/4030491953/events/f18dab751c2c480bab9dae21e08d739c/ --- app/domain/etl/edition/content/parsers/no_content.rb | 1 + spec/domain/etl/edition/content/no_content_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/domain/etl/edition/content/parsers/no_content.rb b/app/domain/etl/edition/content/parsers/no_content.rb index 8db95f126..e74a576a1 100644 --- a/app/domain/etl/edition/content/parsers/no_content.rb +++ b/app/domain/etl/edition/content/parsers/no_content.rb @@ -43,6 +43,7 @@ def schemas substitute topic vanish + world_index world_location ] end diff --git a/spec/domain/etl/edition/content/no_content_spec.rb b/spec/domain/etl/edition/content/no_content_spec.rb index 1e52ce052..b96b25ff4 100644 --- a/spec/domain/etl/edition/content/no_content_spec.rb +++ b/spec/domain/etl/edition/content/no_content_spec.rb @@ -45,6 +45,7 @@ substitute topic vanish + world_index world_location ] no_content_schemas.each do |schema|