From 536fdef01829b510306bba93bc3dd413c31d4dcc Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Tue, 27 Aug 2024 08:37:09 +0200 Subject: [PATCH] fix(specs): filter run list by type (#3577) --- scripts/ci/githubActions/createMatrix.ts | 6 +++++- specs/ingestion/common/observabilityParameters.yml | 9 +++++++++ specs/ingestion/common/schemas/run.yml | 2 +- specs/ingestion/paths/runs/runs.yml | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/scripts/ci/githubActions/createMatrix.ts b/scripts/ci/githubActions/createMatrix.ts index 235fdf86ca..70b4bc203c 100644 --- a/scripts/ci/githubActions/createMatrix.ts +++ b/scripts/ci/githubActions/createMatrix.ts @@ -68,7 +68,11 @@ async function createClientMatrix(baseBranch: string): Promise { const testsRootFolder = `tests/output/${language}`; const testsOutputBase = `${testsRootFolder}/${getTestOutputFolder(language)}`; // We delete tests to ensure the CI only run tests against what changed. - const testsToDelete = `${testsOutputBase}/client ${testsOutputBase}/requests ${testsOutputBase}/e2e ${testsOutputBase}/benchmark`; + let testsToDelete = `${testsOutputBase}/client ${testsOutputBase}/requests ${testsOutputBase}/e2e`; + if (language !== 'swift') { + // Swift requires the benchmark folder to have files in it + testsToDelete += ` ${testsOutputBase}/benchmark`; + } // We only store tests of clients that ran during this job, the rest stay as is let testsToStore = matrix[language].toRun diff --git a/specs/ingestion/common/observabilityParameters.yml b/specs/ingestion/common/observabilityParameters.yml index 4e62c74870..109892474a 100644 --- a/specs/ingestion/common/observabilityParameters.yml +++ b/specs/ingestion/common/observabilityParameters.yml @@ -25,6 +25,15 @@ runStatus: items: $ref: './schemas/run.yml#/RunStatus' +runType: + name: type + in: query + description: Run type for filtering the list of task runs. + schema: + type: array + items: + $ref: './schemas/run.yml#/RunType' + taskID: name: taskID in: query diff --git a/specs/ingestion/common/schemas/run.yml b/specs/ingestion/common/schemas/run.yml index 6204548ad9..997a2c6665 100644 --- a/specs/ingestion/common/schemas/run.yml +++ b/specs/ingestion/common/schemas/run.yml @@ -87,7 +87,7 @@ RunOutcome: RunType: type: string description: Task run type. - enum: [reindex, update, discover] + enum: [reindex, update, discover, validate, push] RunReasonCode: type: string diff --git a/specs/ingestion/paths/runs/runs.yml b/specs/ingestion/paths/runs/runs.yml index 325eef76b3..0169be3aa3 100644 --- a/specs/ingestion/paths/runs/runs.yml +++ b/specs/ingestion/paths/runs/runs.yml @@ -12,6 +12,7 @@ get: - $ref: '../../common/parameters.yml#/itemsPerPage' - $ref: '../../common/parameters.yml#/page' - $ref: '../../common/observabilityParameters.yml#/runStatus' + - $ref: '../../common/observabilityParameters.yml#/runType' - $ref: '../../common/observabilityParameters.yml#/taskID' - $ref: '../../common/observabilityParameters.yml#/runSort' - $ref: '../../common/parameters.yml#/order'