From af2fa9c0a5cdabf34fa46717779958ddb9304ab2 Mon Sep 17 00:00:00 2001 From: Alex Prudhomme <78121423+alexprudhomme@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:37:50 -0400 Subject: [PATCH] log allocated shards https://coveord.atlassian.net/browse/KIT-3684 --- .../headless/src/controllers/facets/facet/headless-facet.ts | 1 + scripts/ci/determine-shard.mjs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/packages/headless/src/controllers/facets/facet/headless-facet.ts b/packages/headless/src/controllers/facets/facet/headless-facet.ts index c9da4013941..bee8edc0bc0 100644 --- a/packages/headless/src/controllers/facets/facet/headless-facet.ts +++ b/packages/headless/src/controllers/facets/facet/headless-facet.ts @@ -93,6 +93,7 @@ export function buildFacet(engine: SearchEngine, props: FacetProps): Facet { } const {dispatch} = engine; + console.log('alex'); const coreController = buildCoreFacet( engine, { diff --git a/scripts/ci/determine-shard.mjs b/scripts/ci/determine-shard.mjs index 402ef56775f..d673af93526 100644 --- a/scripts/ci/determine-shard.mjs +++ b/scripts/ci/determine-shard.mjs @@ -8,18 +8,24 @@ function getOutputName() { function allocateShards(testCount, maximumShards) { const shardTotal = testCount === 0 ? maximumShards : Math.min(testCount, maximumShards); + console.log('shardTotal:', shardTotal); const shardIndex = Array.from({length: shardTotal}, (_, i) => i + 1); + console.log('shardIndex:', shardIndex); return [shardIndex, [shardTotal]]; } const testsToRun = process.env.testsToRun.split(' '); +console.log('testsToRun:', testsToRun); const maximumShards = parseInt(process.env.maximumShards, 10); +console.log('maximumShards:', maximumShards); const [shardIndexOutputName, shardTotalOutputName] = getOutputName(); +console.log('shardIndexOutputName:', shardIndexOutputName); const [shardIndex, shardTotal] = allocateShards( testsToRun.length, maximumShards ); +console.log('shardIndex:', shardIndex); setOutput(shardIndexOutputName, shardIndex); setOutput(shardTotalOutputName, shardTotal);