ci: coerce the pool timeout input to a number

timeout-minutes requires a numeric value, but inputs.pool_timeout_minutes
is a string, so '${{ inputs.pool_timeout_minutes || 240 }}' evaluated to
the string '240' and the runner rejected the template: 'An error occurred
when attempting to determine the step timeout ... Unexpected value 240'
(chain run 36505625402 job at 02:25:52, standalone run 36393453114 at
07:46:37). Both pool runs since #8155 merged have therefore executed
without the intended step budget. Wrap the expression in fromJSON and
update the policy test that pinned the broken literal.
This commit is contained in:
hector
2026-09-30 08:08:46 +08:00
committed by Chris
parent 45f97bccf9
commit e22414fe68
+1 -1
View File
@@ -439,7 +439,7 @@ class WorkflowTimeoutTests(unittest.TestCase):
line in (" id: test", " id: pool_test") for line in step)]
self.assertEqual(len(primary), 1)
if suite == "pool-expand":
self.assertIn(" timeout-minutes: ${{ inputs.pool_timeout_minutes || 240 }}", primary[0])
self.assertIn(" timeout-minutes: ${{ fromJSON(inputs.pool_timeout_minutes || '240') }}", primary[0])
for event in ("workflow_call", "workflow_dispatch"):
event_block = yaml_block(source.splitlines(), event, 2)
timeout_input = yaml_block(event_block, "pool_timeout_minutes", 6)