From 19bd34420c916f4333927e2bf4c0761dcdd317ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0=C4=8Dotka?= Date: Thu, 9 Jul 2026 14:14:18 +0200 Subject: [PATCH 1/5] testingfarm: move environment constraints into fmf plan Declare arch, compose (Fedora-44), virtualization support, and hardware requirements (memory >= 4 GB, disk >= 60 GiB) in plans/job-runner.fmf instead of hard-coding them in the API request. Drop the compose parameter from submit_job() and remove the explicit pipeline timeout, relying on Testing Farm defaults. --- lib/aio/testingfarm.py | 15 --------------- plans/job-runner.fmf | 14 +++++++++++++- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/lib/aio/testingfarm.py b/lib/aio/testingfarm.py index 3da5031f1d..14da3cb89f 100644 --- a/lib/aio/testingfarm.py +++ b/lib/aio/testingfarm.py @@ -106,7 +106,6 @@ async def submit_job( job: JobSpecification | JsonObject, # TODO: PEP 728 *, git_url_ref: tuple[str, str] | None = None, - compose: str = 'Fedora-Rawhide', ) -> str: """Submit a job to Testing Farm for remote execution. @@ -114,7 +113,6 @@ async def submit_job( ctx: JobContext with configuration (will be serialized) job: Job specification as JSON object git_url_ref: Git repository URL and ref (default: from @{upstream}) - compose: Fedora compose to use (default: Fedora-Rawhide) Returns: Testing Farm request ID @@ -142,27 +140,14 @@ async def submit_job( }, 'environments': [ { - 'arch': 'x86_64', - 'os': {'compose': compose}, 'variables': { 'JOB_JSON': job_json, }, 'secrets': { 'JOB_RUNNER_CONFIG_JSON': config_json, }, - 'hardware': { - 'virtualization': { - 'is-virtualized': True, - 'is-supported': True, - } - }, } ], - 'settings': { - 'pipeline': { - 'timeout': 120, - } - }, } url = f'{self.api_url}/requests' diff --git a/plans/job-runner.fmf b/plans/job-runner.fmf index b2ba53272c..3c12e1e50f 100644 --- a/plans/job-runner.fmf +++ b/plans/job-runner.fmf @@ -1,4 +1,16 @@ summary: Run job-runner task remotely +provision: + how: virtual + arch: x86_64 + image: Fedora-44 + hardware: + memory: ">= 4 GB" + disk: + - size: ">= 60 GiB" + virtualization: + #is-virtualized: true + is-supported: true + prepare: how: install package: @@ -16,4 +28,4 @@ execute: /job-runner: summary: Run job-runner task test: ../job-runner json "$JOB_JSON" - duration: 2h + duration: 4h From b15fa8f4fbaf6728dd52e0a5080c3c5d27cbd797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0=C4=8Dotka?= Date: Thu, 9 Jul 2026 15:07:38 +0200 Subject: [PATCH 2/5] testingfarm: keep arch in API request, required by Testing Farm The Testing Farm API validates arch at submission time and rejects requests without it, even when arch is declared in the fmf plan. --- lib/aio/testingfarm.py | 1 + plans/job-runner.fmf | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/aio/testingfarm.py b/lib/aio/testingfarm.py index 14da3cb89f..eb83381a5d 100644 --- a/lib/aio/testingfarm.py +++ b/lib/aio/testingfarm.py @@ -140,6 +140,7 @@ async def submit_job( }, 'environments': [ { + 'arch': 'x86_64', 'variables': { 'JOB_JSON': job_json, }, diff --git a/plans/job-runner.fmf b/plans/job-runner.fmf index 3c12e1e50f..95168b65a1 100644 --- a/plans/job-runner.fmf +++ b/plans/job-runner.fmf @@ -8,7 +8,6 @@ provision: disk: - size: ">= 60 GiB" virtualization: - #is-virtualized: true is-supported: true prepare: From 11d8447ccfa59b61d1a137d62c927d572585e829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0=C4=8Dotka?= Date: Thu, 9 Jul 2026 16:10:34 +0200 Subject: [PATCH 3/5] testingfarm: restore compose parameter, required by Testing Farm API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Like arch, the compose must be specified in the API request — Testing Farm uses it to select the OS image and does not fall back to the fmf plan's provision.image. Default to Fedora-44 to match the fmf plan. --- lib/aio/testingfarm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/aio/testingfarm.py b/lib/aio/testingfarm.py index eb83381a5d..4f99f963bb 100644 --- a/lib/aio/testingfarm.py +++ b/lib/aio/testingfarm.py @@ -106,6 +106,7 @@ async def submit_job( job: JobSpecification | JsonObject, # TODO: PEP 728 *, git_url_ref: tuple[str, str] | None = None, + compose: str = 'Fedora-44', ) -> str: """Submit a job to Testing Farm for remote execution. @@ -113,6 +114,7 @@ async def submit_job( ctx: JobContext with configuration (will be serialized) job: Job specification as JSON object git_url_ref: Git repository URL and ref (default: from @{upstream}) + compose: Fedora compose to use (default: Fedora-44) Returns: Testing Farm request ID @@ -141,6 +143,7 @@ async def submit_job( 'environments': [ { 'arch': 'x86_64', + 'os': {'compose': compose}, 'variables': { 'JOB_JSON': job_json, }, From ba18d7329f710207a30e4cf50de0fe77ef51aa47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0=C4=8Dotka?= Date: Thu, 9 Jul 2026 17:26:13 +0200 Subject: [PATCH 4/5] plans/job-runner: drop provision.how from fmf plan Testing Farm does its own machine provisioning and ignores the how field. Having how: virtual caused tmt to attempt spinning up a nested VM inside the Testing Farm machine, stalling the queue. --- plans/job-runner.fmf | 1 - 1 file changed, 1 deletion(-) diff --git a/plans/job-runner.fmf b/plans/job-runner.fmf index 95168b65a1..ac10916e02 100644 --- a/plans/job-runner.fmf +++ b/plans/job-runner.fmf @@ -1,6 +1,5 @@ summary: Run job-runner task remotely provision: - how: virtual arch: x86_64 image: Fedora-44 hardware: From a646fd6fd4310803d76a1f2a0bf69f0d39ddc651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0=C4=8Dotka?= Date: Thu, 9 Jul 2026 17:33:00 +0200 Subject: [PATCH 5/5] plans/job-runner: drop disk size hardware requirement Removing the disk size constraint to reduce restrictions on available Testing Farm machines and avoid stalling in the queue. --- plans/job-runner.fmf | 2 -- 1 file changed, 2 deletions(-) diff --git a/plans/job-runner.fmf b/plans/job-runner.fmf index ac10916e02..49ccc88504 100644 --- a/plans/job-runner.fmf +++ b/plans/job-runner.fmf @@ -4,8 +4,6 @@ provision: image: Fedora-44 hardware: memory: ">= 4 GB" - disk: - - size: ">= 60 GiB" virtualization: is-supported: true