From 348e53be1189c7b14bf8b6c7fd49bca5d38bdd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Wed, 22 Jan 2025 20:37:27 +0100 Subject: [PATCH 1/5] Increase tests parallelization Our specs_without_cluster are taking about 37 minutes in worst cases. The goal here is to considerably reduce the time to execute these jobs. --- .gitlab/ci/checks.yml | 2 +- .gitlab/ci/specs-common.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/checks.yml b/.gitlab/ci/checks.yml index cc317e2599..7dd7d81ba6 100644 --- a/.gitlab/ci/checks.yml +++ b/.gitlab/ci/checks.yml @@ -110,7 +110,7 @@ specs_without_cluster: extends: .specs variables: RSPEC_TAGS: ~type:feature - parallel: 6 + parallel: 12 rules: - !reference [.specs, rules] - if: '$PIPELINE_TYPE == "AUTO_DEPLOY_PIPELINE"' diff --git a/.gitlab/ci/specs-common.yml b/.gitlab/ci/specs-common.yml index 3157df2699..7f8692ad21 100644 --- a/.gitlab/ci/specs-common.yml +++ b/.gitlab/ci/specs-common.yml @@ -2,7 +2,7 @@ specs_without_cluster: extends: .specs variables: RSPEC_TAGS: ~type:feature - parallel: 6 + parallel: 12 rules: - !reference [.specs, rules] - if: '$PIPELINE_TYPE == "AUTO_DEPLOY_PIPELINE"' -- GitLab From 9500d4fb1c6c9f38e0b3752bc8920f56646c4ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Wed, 22 Jan 2025 22:34:33 +0100 Subject: [PATCH 2/5] Enable KNAPSACK report This can not only give us more insights on slower tests, but hopefully it should help KNAPSACK to rebalance the tests on subsequent runs. --- .gitlab/ci/checks.yml | 2 ++ .gitlab/ci/specs-common.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.gitlab/ci/checks.yml b/.gitlab/ci/checks.yml index 7dd7d81ba6..727ffe108d 100644 --- a/.gitlab/ci/checks.yml +++ b/.gitlab/ci/checks.yml @@ -110,6 +110,8 @@ specs_without_cluster: extends: .specs variables: RSPEC_TAGS: ~type:feature + KNAPSACK_GENERATE_REPORT: "true" + KNAPSACK_REPORT_PATH: knapsack_rspec_report.json parallel: 12 rules: - !reference [.specs, rules] diff --git a/.gitlab/ci/specs-common.yml b/.gitlab/ci/specs-common.yml index 7f8692ad21..e0fc397f02 100644 --- a/.gitlab/ci/specs-common.yml +++ b/.gitlab/ci/specs-common.yml @@ -2,6 +2,8 @@ specs_without_cluster: extends: .specs variables: RSPEC_TAGS: ~type:feature + KNAPSACK_GENERATE_REPORT: "true" + KNAPSACK_REPORT_PATH: knapsack_rspec_report.json parallel: 12 rules: - !reference [.specs, rules] -- GitLab From 83929e50e673fa8093b9c567b7835a2b160ef6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Wed, 22 Jan 2025 22:47:24 +0100 Subject: [PATCH 3/5] Temporarily run on only one node to generate knapsack report --- .gitlab/ci/checks.yml | 2 +- .gitlab/ci/specs-common.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/checks.yml b/.gitlab/ci/checks.yml index 727ffe108d..a6026be3ae 100644 --- a/.gitlab/ci/checks.yml +++ b/.gitlab/ci/checks.yml @@ -112,7 +112,7 @@ specs_without_cluster: RSPEC_TAGS: ~type:feature KNAPSACK_GENERATE_REPORT: "true" KNAPSACK_REPORT_PATH: knapsack_rspec_report.json - parallel: 12 + parallel: 1 rules: - !reference [.specs, rules] - if: '$PIPELINE_TYPE == "AUTO_DEPLOY_PIPELINE"' diff --git a/.gitlab/ci/specs-common.yml b/.gitlab/ci/specs-common.yml index e0fc397f02..565f0ff3e6 100644 --- a/.gitlab/ci/specs-common.yml +++ b/.gitlab/ci/specs-common.yml @@ -4,7 +4,7 @@ specs_without_cluster: RSPEC_TAGS: ~type:feature KNAPSACK_GENERATE_REPORT: "true" KNAPSACK_REPORT_PATH: knapsack_rspec_report.json - parallel: 12 + parallel: 1 rules: - !reference [.specs, rules] - if: '$PIPELINE_TYPE == "AUTO_DEPLOY_PIPELINE"' -- GitLab From 4d687598f3b473d2e15bf741e6b764a314880267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Thu, 23 Jan 2025 15:51:05 +0100 Subject: [PATCH 4/5] Export knapsack_rspec_report.json artifact --- .gitlab/ci/checks.yml | 4 ++++ .gitlab/ci/specs-common.yml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/checks.yml b/.gitlab/ci/checks.yml index a6026be3ae..92cbf90295 100644 --- a/.gitlab/ci/checks.yml +++ b/.gitlab/ci/checks.yml @@ -118,3 +118,7 @@ specs_without_cluster: - if: '$PIPELINE_TYPE == "AUTO_DEPLOY_PIPELINE"' - if: '$PIPELINE_TYPE == "RELEASE_PIPELINE"' needs: ['lint_package'] + artifacts: + paths: + - knapsack_rspec_report.json + diff --git a/.gitlab/ci/specs-common.yml b/.gitlab/ci/specs-common.yml index 565f0ff3e6..561fceece9 100644 --- a/.gitlab/ci/specs-common.yml +++ b/.gitlab/ci/specs-common.yml @@ -10,4 +10,6 @@ specs_without_cluster: - if: '$PIPELINE_TYPE == "AUTO_DEPLOY_PIPELINE"' - if: '$PIPELINE_TYPE == "RELEASE_PIPELINE"' needs: ['lint_package'] - + artifacts: + paths: + - knapsack_rspec_report.json -- GitLab From 5a3450183d048bd68b904dab202f7d5ba40c7bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Alexandre=20Cunha?= Date: Thu, 23 Jan 2025 20:09:50 +0000 Subject: [PATCH 5/5] Increase nodes to 3 The idea is to generate 3 reports and attempt to consolidate them afterwards. --- .gitlab/ci/checks.yml | 2 +- .gitlab/ci/specs-common.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/checks.yml b/.gitlab/ci/checks.yml index 92cbf90295..b30efed2b0 100644 --- a/.gitlab/ci/checks.yml +++ b/.gitlab/ci/checks.yml @@ -112,7 +112,7 @@ specs_without_cluster: RSPEC_TAGS: ~type:feature KNAPSACK_GENERATE_REPORT: "true" KNAPSACK_REPORT_PATH: knapsack_rspec_report.json - parallel: 1 + parallel: 3 rules: - !reference [.specs, rules] - if: '$PIPELINE_TYPE == "AUTO_DEPLOY_PIPELINE"' diff --git a/.gitlab/ci/specs-common.yml b/.gitlab/ci/specs-common.yml index 561fceece9..bd961af0bf 100644 --- a/.gitlab/ci/specs-common.yml +++ b/.gitlab/ci/specs-common.yml @@ -4,7 +4,7 @@ specs_without_cluster: RSPEC_TAGS: ~type:feature KNAPSACK_GENERATE_REPORT: "true" KNAPSACK_REPORT_PATH: knapsack_rspec_report.json - parallel: 1 + parallel: 3 rules: - !reference [.specs, rules] - if: '$PIPELINE_TYPE == "AUTO_DEPLOY_PIPELINE"' -- GitLab