@@ -54,30 +54,9 @@ local std_get = (import "../../ci/ci_common/common-utils.libsonnet").std_get;
54
54
local table = [ ["name" , "variant" , task_details_title] + platform_titles] + cols;
55
55
table
56
56
,
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,
83
62
}
0 commit comments