Skip to content

[GR-68451] Remove default timelimit in graal/ci/ci_common/common.jsonnet #11879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/ci_common/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ common + common.frequencies + {
"*.bgv",
"*/graal_dumps/*/*",
],
timelimit: "30:00",
},
local linux_deps_extras = {
packages+: {
Expand Down
31 changes: 5 additions & 26 deletions ci/ci_common/run-spec-tools.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,9 @@ local std_get = (import "../../ci/ci_common/common-utils.libsonnet").std_get;
local table = [ ["name", "variant", task_details_title] + platform_titles] + cols;
table
,
// Removes the 'timelimit' property from an object.
// Usually, this is used to remove hard-coded (default) timelimits defined in `ci/ci_common/common.jsonnet`.
// These definitions assume that the os/arch definition comes first and will be refined later.
// With run-spec, however, this is not true in general because the os/arch is only fixed later
// in the pipeline. Thus, hard-coded timelimits would override any previous settings. To resolve
// this, we delete the default value altogether and explicitly set the timelimits for all jobs.
//
// Implementation note: we cannot set the value to `null` and use `std.prune` because that deletes hidden fields.
delete_timelimit(b)::
local public_fields = std.objectFields(b);
std.foldl(function(acc, k) acc +
local value = b[k];
if std.member(public_fields, k) then
if std.type(value) == "string" then
{ [k]: value }
else
{ [k]+: value }
else
if std.type(value) == "string" then
{ [k]:: value }
else
{ [k]+:: value }
,
[k for k in std.objectFieldsAll(b) if k != "timelimit"],
{}
),
// Check there is no 'timelimit' property on an object,
// so that it is safe to add the timelimit later and ordering won't matter.
check_no_timelimit(b)::
assert !std.objectHasAll(b, "timelimit") : "b";
b,
}
3 changes: 2 additions & 1 deletion substratevm/ci/ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
local tools = import "ci_common/tools.libsonnet",
local sg = import "ci_common/svm-gate.libsonnet",
local run_spec = import "../../ci/ci_common/run-spec.libsonnet",
local check_no_timelimit = (import '../../ci/ci_common/run-spec-tools.libsonnet').check_no_timelimit,
local galahad = import "../../ci/ci_common/galahad-common.libsonnet",
local exclude = run_spec.exclude,

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

local all_jobs = {
Expand Down
20 changes: 0 additions & 20 deletions substratevm/ci/ci_common/tools.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,6 @@
// std.get is not available in all versions
std_get::(import '../../common-utils.libsonnet').std_get,
//
local delete_timelimit(b) =
local public_fields = std.objectFields(b);
std.foldl(function(acc, k) acc +
local value = b[k];
if std.member(public_fields, k) then
if std.type(value) == "string" then
{ [k]: value }
else
{ [k]+: value }
else
if std.type(value) == "string" then
{ [k]:: value }
else
{ [k]+:: value }
,
[k for k in std.objectFieldsAll(b) if k != "timelimit"],
{}
),
delete_timelimit::delete_timelimit,
//
local _make_visible(o, inc_hidden=true) =
local objectFields = if inc_hidden then std.objectFieldsAll else std.objectFields;
if std.type(o) == "array" then
Expand Down
4 changes: 2 additions & 2 deletions web-image/ci/ci_common/wi-run-spec.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local ci_common = import '../../../ci/ci_common/common.jsonnet';
local r = import '../../../ci/ci_common/run-spec.libsonnet';
local common = import 'common.jsonnet';

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

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

{
Expand Down