Skip to content

timeout-minutes parameter is not transfered through a job generator

Affected version : ochestrator version 0.66.0, squash orchestrator image version 4.14.0

Steps to reproduce

  • Add a debug log in the arranger.py to display the timeout of the job (L988):
root@21acaa84f06f:~# cat /usr/local/lib/python3.12/site-packages/opentf/core/arranger.py |grep -C 5 'TIMEOUT OF THE JOB'
            self.contexts, ('opentf', 'inputs', 'variables', 'needs')
        )
        manifest['timeout-minutes'] = evaluate_int(
            manifest.get('timeout-minutes', DEFAULT_TIMEOUT_MINUTES), oivn
        )
        debug('TIMEOUT OF THE JOB %s: %d', self.full_name, manifest['timeout-minutes'])
        manifest['continue-on-error'] = self.continue_on_error = evaluate_bool(
            manifest.get('continue-on-error', False), oivn
        )
        self.defaults = parent.defaults.copy()
        self.defaults.update(evaluate_items(manifest.get('defaults', {}), oivn))
  • Set the ARRANGER_DEBUG_LEVEL to DEBUG
  • Create a workflow with a job that uses a generator:
metadata:
  name: Robot Framework
timeout-minutes: 900
variables:
  ROBOTFRAMEWORK_EXTRA_OPTIONS: --loglevel debug
jobs:
  test-timeout:
    runs-on: [robotframework, dev]
    timeout-minutes: 900
    generator: tm.squashtest.org/tm.generator@v1
    with:
      testPlanType: Iteration
      testPlanUuid: e2bfa53c-83d8-406b-844a-34a350838ccc
      squashTMUrl: http://SQUASH_IP:8080/squash
      squashTMAutomatedServerLogin: rf.server
      squashTMAutomatedServerPassword: 123456789
  • Run the workflow: opentf-ctl run workflow workflow.yml --opentfconfig=config --wait
  • Watch the logs of the orchestrator.

Expected result

The log about the timeout of the job "test-timeout" should be the same as the job generated with the name "test-timeout squashTMJob-0", of 900s

Observed behaviour

[2025-02-07 10:47:03,126] INFO in receptionist: Workflow Robot Framework accepted (workflow_id=b78511a6-6273-4fde-a635-1f13742a3e32).
[2025-02-07 10:47:03,137] INFO in arranger: 127.0.0.1 - - "POST /inbox HTTP/1.1" 200 122 "-" "python-requests/2.32.3"
[2025-02-07 10:47:03,139] DEBUG in arranger: Preparing workflow b78511a6-6273-4fde-a635-1f13742a3e32.
[2025-02-07 10:47:03,140] DEBUG in arranger: TIMEOUT OF THE JOB test-timeout: 900
[2025-02-07 10:47:03,140] DEBUG in arranger: Requiring channels for 0 jobs (workflow_id=b78511a6-6273-4fde-a635-1f13742a3e32).
[2025-02-07 10:47:03,140] DEBUG in arranger: Queuing channels request for workflow b78511a6-6273-4fde-a635-1f13742a3e32.
[2025-02-07 10:47:03,141] DEBUG in arranger: Job test-timeout started (job_id=0355e342-8f8d-4250-91f8-39670f2c6367, workflow_id=b78511a6-6273-4fde-a635-1f13742a3e32).
[2025-02-07 10:47:03,156] INFO in tm.generator.community: Calling the Squash TM automated test API at http://SQUASH_IP:8080/squash with the following arguments targetUUID=e2bfa53c-83d8-406b-844a-34a350838ccc,targetType=ITERATION
[2025-02-07 10:47:05,186] INFO in tm.generator.community: Successfully published AutomatedSuite definition 4028801e9440a4aa0194e0052d4b00a7 for generator test-timeout in workflow b78511a6-6273-4fde-a635-1f13742a3e32
[2025-02-07 10:47:05,199] INFO in tm.publisher: Received expected automated suite definition 4028801e9440a4aa0194e0052d4b00a7 for job 0355e342-8f8d-4250-91f8-39670f2c6367 in workflow b78511a6-6273-4fde-a635-1f13742a3e32 
[2025-02-07 10:47:05,215] INFO in tm.generator.community: Successfully published generation result for generator test-timeout in workflow b78511a6-6273-4fde-a635-1f13742a3e32
[2025-02-07 10:47:05,221] INFO in arranger: 127.0.0.1 - - "POST /inbox HTTP/1.1" 200 122 "-" "python-requests/2.32.3"
[2025-02-07 10:47:05,221] DEBUG in arranger: TIMEOUT OF THE JOB test-timeout squashTMJob-0: 360