From 19f24b31d9dec5ec6d6c97a9bcbcd26657f181e8 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Mon, 23 Dec 2024 15:17:44 +0100 Subject: [PATCH] SKA: Relocate script 6.1 (#205086) ## Summary * Exclude example modules from relocation. * Add an extra path transform to simplify packages folders. --- packages/kbn-relocate/relocate.ts | 6 ++++-- packages/kbn-relocate/utils/transforms.ts | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/kbn-relocate/relocate.ts b/packages/kbn-relocate/relocate.ts index a96c58629bab7..f9ead5f815736 100644 --- a/packages/kbn-relocate/relocate.ts +++ b/packages/kbn-relocate/relocate.ts @@ -110,11 +110,13 @@ const findModules = ({ teams, paths, included, excluded }: FindModulesParams, lo .filter(({ manifest }) => !manifest.devOnly) // explicit exclusions .filter(({ id }) => !EXCLUDED_MODULES.includes(id) && !excluded.includes(id)) - // we don't want to move test modules (just yet) + // we don't want to move test and example modules (just yet) .filter( ({ directory }) => !directory.includes(`/${KIBANA_FOLDER}/test/`) && - !directory.includes(`/${KIBANA_FOLDER}/x-pack/test/`) + !directory.includes(`/${KIBANA_FOLDER}/x-pack/test/`) && + !directory.includes(`/${KIBANA_FOLDER}/examples/`) && + !directory.includes(`/${KIBANA_FOLDER}/x-pack/examples/`) ) // the module is under the umbrella specified by the user .filter( diff --git a/packages/kbn-relocate/utils/transforms.ts b/packages/kbn-relocate/utils/transforms.ts index ed584abeb55ab..267d570169d67 100644 --- a/packages/kbn-relocate/utils/transforms.ts +++ b/packages/kbn-relocate/utils/transforms.ts @@ -14,6 +14,8 @@ const TRANSFORMS: Record = { 'x-pack/solutions/security/packages/security-solution/': 'x-pack/solutions/security/packages/', 'x-pack/solutions/observability/plugins/observability_solution/': 'x-pack/solutions/observability/plugins/', + 'x-pack/solutions/observability/packages/observability/observability_utils/observability_': + 'x-pack/solutions/observability/packages/', 'x-pack/solutions/observability/packages/observability/': 'x-pack/solutions/observability/packages/', 'src/core/packages/core/': (path: string) => {