From 2fad6067bbc1b8c0b7d4569dc6d2aa13624dcfbe Mon Sep 17 00:00:00 2001 From: Mohamed Oussama BOUGUEDDACH Date: Thu, 18 Apr 2024 16:15:34 +0100 Subject: [PATCH 1/5] Refactor tags into tag groups. --- ci/ci_common/bench-common.libsonnet | 4 +++- ci/common.jsonnet | 2 +- compiler/ci/ci_common/compiler-common.libsonnet | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ci/ci_common/bench-common.libsonnet b/ci/ci_common/bench-common.libsonnet index 36b24b8dd114..92078017ae23 100644 --- a/ci/ci_common/bench-common.libsonnet +++ b/ci/ci_common/bench-common.libsonnet @@ -134,7 +134,9 @@ local batch_str = if suite_obj.forks_batches > 1 then "batch"+i else null, "job_prefix":: "bench-forks-" + subdir, "job_suffix":: batch_str, - tags: if std.objectHasAll(suite_obj, "tags") then [tag +"-many-forks" for tag in suite_obj.tags] else [], + tags: if std.objectHasAll(suite_obj, "tags") && std.objectHasAll(suite_obj.tags, "opt_post_merge") then + {opt_post_merge: [tag +"-many-forks" for tag in suite_obj.tags.opt_post_merge]} + else {opt_post_merge: []}, "timelimit": suite_obj.forks_timelimit, local base_name = if forks_file_base_name != null then forks_file_base_name else suite_obj.suite, "environment" +: { diff --git a/ci/common.jsonnet b/ci/common.jsonnet index 49d2b5e963f7..321c977e83a7 100644 --- a/ci/common.jsonnet +++ b/ci/common.jsonnet @@ -329,7 +329,7 @@ local common_json = import "../common.json"; }, opt_post_merge: { targets+: ["opt-post-merge"], - tags+: [] + tags: {opt_post_merge +: []}, }, daily: { targets+: ["daily"], diff --git a/compiler/ci/ci_common/compiler-common.libsonnet b/compiler/ci/ci_common/compiler-common.libsonnet index a3578a6ccafc..407c444d03c4 100644 --- a/compiler/ci/ci_common/compiler-common.libsonnet +++ b/compiler/ci/ci_common/compiler-common.libsonnet @@ -55,7 +55,7 @@ local use_libgraal_profile = libgraal_profiling_only(config.compiler.use_libgraal_profile), job_prefix:: "bench-compiler", - tags+: ["bench-compiler"], + tags+: {opt_post_merge+: ["bench-compiler"]}, python_version : "3", packages+: common.deps.svm.packages, environment+: { From 4afecab2e247c83c5197149ce1af84c9806f5b88 Mon Sep 17 00:00:00 2001 From: Mohamed Oussama BOUGUEDDACH Date: Thu, 2 May 2024 11:10:46 +0100 Subject: [PATCH 2/5] Redefine generation of tags for fork builds. --- ci/ci_common/bench-common.libsonnet | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ci/ci_common/bench-common.libsonnet b/ci/ci_common/bench-common.libsonnet index 92078017ae23..9c577bc554c4 100644 --- a/ci/ci_common/bench-common.libsonnet +++ b/ci/ci_common/bench-common.libsonnet @@ -120,6 +120,10 @@ ] }, + generate_fork_tags(suite_obj):: if std.objectHasAll(suite_obj, "tags") && std.objectHasAll(suite_obj.tags, "opt_post_merge") then { + tags: {opt_post_merge: [tag +"-many-forks" for tag in suite_obj.tags.opt_post_merge]}, + } else {}, + generate_fork_builds(suite_obj, subdir='compiler', forks_file_base_name=null):: /* based on a benchmark suite definition, generates the many forks version based on the hidden fields * 'forks_batches' that specifies the number of batches this job should be split into and the corresponding @@ -134,15 +138,12 @@ local batch_str = if suite_obj.forks_batches > 1 then "batch"+i else null, "job_prefix":: "bench-forks-" + subdir, "job_suffix":: batch_str, - tags: if std.objectHasAll(suite_obj, "tags") && std.objectHasAll(suite_obj.tags, "opt_post_merge") then - {opt_post_merge: [tag +"-many-forks" for tag in suite_obj.tags.opt_post_merge]} - else {opt_post_merge: []}, "timelimit": suite_obj.forks_timelimit, local base_name = if forks_file_base_name != null then forks_file_base_name else suite_obj.suite, "environment" +: { FORK_COUNT_FILE: "${FORK_COUNTS_DIRECTORY}/" + subdir + "/" + base_name + "_forks" + (if batch_str != null then "_"+batch_str else "") + ".json" } - } + } + $.generate_fork_tags(suite_obj) for i in std.range(0, suite_obj.forks_batches - 1)] else [], From 87f3a904cc28e0652cbc817d96f14895b6bc5967 Mon Sep 17 00:00:00 2001 From: Mohamed Oussama BOUGUEDDACH Date: Thu, 2 May 2024 11:16:18 +0100 Subject: [PATCH 3/5] Bump spec version. --- ci.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.jsonnet b/ci.jsonnet index 3b5bb6baedc2..641bc5db7221 100644 --- a/ci.jsonnet +++ b/ci.jsonnet @@ -45,7 +45,7 @@ local verify_ci = (import 'ci/ci_common/ci-check.libsonnet').verify_ci; assert std.length(std.toString(import 'ci/ci_common/common.jsonnet')) > 0, ci_resources:: (import 'ci/ci_common/ci-resources.libsonnet'), overlay: graal_common.ci.overlay, - specVersion: "3", + specVersion: "4", builds: [common.add_excludes_guard(b) for b in ( common.with_components(compiler.builds, ["compiler"]) + common.with_components(wasm.builds, ["wasm"]) + From b0fea298b1ef2a95ceddca7731e0a99389d1291e Mon Sep 17 00:00:00 2001 From: Danilo Ansaloni Date: Thu, 9 May 2024 08:52:41 +0000 Subject: [PATCH 4/5] Use safer concatenation of tags. --- ci/common.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/common.jsonnet b/ci/common.jsonnet index 321c977e83a7..b0a948700bee 100644 --- a/ci/common.jsonnet +++ b/ci/common.jsonnet @@ -329,7 +329,7 @@ local common_json = import "../common.json"; }, opt_post_merge: { targets+: ["opt-post-merge"], - tags: {opt_post_merge +: []}, + tags+: {opt_post_merge +: []}, }, daily: { targets+: ["daily"], From 6a1f001b50705929672d957a9800d4d0846889d8 Mon Sep 17 00:00:00 2001 From: Danilo Ansaloni Date: Thu, 9 May 2024 08:54:06 +0000 Subject: [PATCH 5/5] Fix missing tags when generating fork tags. --- ci/ci_common/bench-common.libsonnet | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/ci_common/bench-common.libsonnet b/ci/ci_common/bench-common.libsonnet index 9c577bc554c4..9658628144df 100644 --- a/ci/ci_common/bench-common.libsonnet +++ b/ci/ci_common/bench-common.libsonnet @@ -122,7 +122,9 @@ generate_fork_tags(suite_obj):: if std.objectHasAll(suite_obj, "tags") && std.objectHasAll(suite_obj.tags, "opt_post_merge") then { tags: {opt_post_merge: [tag +"-many-forks" for tag in suite_obj.tags.opt_post_merge]}, - } else {}, + } else { + tags: {} + }, generate_fork_builds(suite_obj, subdir='compiler', forks_file_base_name=null):: /* based on a benchmark suite definition, generates the many forks version based on the hidden fields