Skip to content

Commit 8807d65

Browse files
committed
[GR-68451] Remove default timelimit in graal/ci/ci_common/common.jsonnet
* Rename delete_timelimit() to check_no_timelimit() and simplify.
1 parent fd29b2e commit 8807d65

File tree

5 files changed

+9
-50
lines changed

5 files changed

+9
-50
lines changed

ci/ci_common/common.jsonnet

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ common + common.frequencies + {
128128
"*.bgv",
129129
"*/graal_dumps/*/*",
130130
],
131-
timelimit: "30:00",
132131
},
133132
local linux_deps_extras = {
134133
packages+: {

ci/ci_common/run-spec-tools.libsonnet

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -54,30 +54,9 @@ local std_get = (import "../../ci/ci_common/common-utils.libsonnet").std_get;
5454
local table = [ ["name", "variant", task_details_title] + platform_titles] + cols;
5555
table
5656
,
57-
// Removes the 'timelimit' property from an object.
58-
// Usually, this is used to remove hard-coded (default) timelimits defined in `ci/ci_common/common.jsonnet`.
59-
// These definitions assume that the os/arch definition comes first and will be refined later.
60-
// With run-spec, however, this is not true in general because the os/arch is only fixed later
61-
// in the pipeline. Thus, hard-coded timelimits would override any previous settings. To resolve
62-
// this, we delete the default value altogether and explicitly set the timelimits for all jobs.
63-
//
64-
// Implementation note: we cannot set the value to `null` and use `std.prune` because that deletes hidden fields.
65-
delete_timelimit(b)::
66-
local public_fields = std.objectFields(b);
67-
std.foldl(function(acc, k) acc +
68-
local value = b[k];
69-
if std.member(public_fields, k) then
70-
if std.type(value) == "string" then
71-
{ [k]: value }
72-
else
73-
{ [k]+: value }
74-
else
75-
if std.type(value) == "string" then
76-
{ [k]:: value }
77-
else
78-
{ [k]+:: value }
79-
,
80-
[k for k in std.objectFieldsAll(b) if k != "timelimit"],
81-
{}
82-
),
57+
// Check there is no 'timelimit' property on an object,
58+
// so that it is safe to add the timelimit later and ordering won't matter.
59+
check_no_timelimit(b)::
60+
assert !std.objectHasAll(b, "timelimit") : "b";
61+
b,
8362
}

substratevm/ci/ci.jsonnet

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
local tools = import "ci_common/tools.libsonnet",
77
local sg = import "ci_common/svm-gate.libsonnet",
88
local run_spec = import "../../ci/ci_common/run-spec.libsonnet",
9+
local check_no_timelimit = (import '../../ci/ci_common/run-spec-tools.libsonnet').check_no_timelimit,
910
local galahad = import "../../ci/ci_common/galahad-common.libsonnet",
1011
local exclude = run_spec.exclude,
1112

@@ -85,7 +86,7 @@
8586
local os_arch_jdk_mixin = task_spec(run_spec.evaluate_late({
8687
// this starts with _ on purpose so that it will be evaluated first
8788
"_os_arch_jdk": function(b)
88-
tools.delete_timelimit(jdk_name_to_dict[b.jdk] + default_os_arch(b)[b.os][b.arch])
89+
check_no_timelimit(jdk_name_to_dict[b.jdk] + default_os_arch(b)[b.os][b.arch])
8990
})),
9091

9192
local all_jobs = {

substratevm/ci/ci_common/tools.libsonnet

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,6 @@
5656
// std.get is not available in all versions
5757
std_get::(import '../../common-utils.libsonnet').std_get,
5858
//
59-
local delete_timelimit(b) =
60-
local public_fields = std.objectFields(b);
61-
std.foldl(function(acc, k) acc +
62-
local value = b[k];
63-
if std.member(public_fields, k) then
64-
if std.type(value) == "string" then
65-
{ [k]: value }
66-
else
67-
{ [k]+: value }
68-
else
69-
if std.type(value) == "string" then
70-
{ [k]:: value }
71-
else
72-
{ [k]+:: value }
73-
,
74-
[k for k in std.objectFieldsAll(b) if k != "timelimit"],
75-
{}
76-
),
77-
delete_timelimit::delete_timelimit,
78-
//
7959
local _make_visible(o, inc_hidden=true) =
8060
local objectFields = if inc_hidden then std.objectFieldsAll else std.objectFields;
8161
if std.type(o) == "array" then

web-image/ci/ci_common/wi-run-spec.jsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local ci_common = import '../../../ci/ci_common/common.jsonnet';
22
local r = import '../../../ci/ci_common/run-spec.libsonnet';
33
local common = import 'common.jsonnet';
44

5-
local delete_timelimit = (import '../../../ci/ci_common/run-spec-tools.libsonnet').delete_timelimit;
5+
local check_no_timelimit = (import '../../../ci/ci_common/run-spec-tools.libsonnet').check_no_timelimit;
66

77
// Supported JDKs for jobs
88
local jdk_name_to_dict = {
@@ -12,7 +12,7 @@ local jdk_name_to_dict = {
1212
local os_arch_jdk_mixin(mapping) = r.task_spec(r.evaluate_late({
1313
// this starts with _ on purpose so that it will be evaluated first
1414
_os_arch_jdk: function(b)
15-
delete_timelimit(jdk_name_to_dict[b.jdk] + mapping(b)[b.os][b.arch]),
15+
check_no_timelimit(jdk_name_to_dict[b.jdk] + mapping(b)[b.os][b.arch]),
1616
}));
1717

1818
{

0 commit comments

Comments
 (0)