#381 EL 8 or 9 is too old to be the Ansible host for Fedora STI tests
Closed by churchyard. Opened by churchyard.

In https://src.fedoraproject.org/rpms/python-gear/pull-request/57 I demonstrate an interesting phenomenon.

The spec file uses this line:

%bcond tests 0

This is a perfectly valid line in all the supported Fedora releases with RPM 4.18 or 4.17.1.
See the documentation: https://rpm-software-management.github.io/rpm/manual/conditionalbuilds.html

Unfortunately, this is not yet available in RHEL 9 with RPM 4.16.x or RHEL 8 with 4.14.x.

The STI tests run via Ansible. Apparently, the Ansible host is a system based on RHEL 8 or 9 (I have only guessed that based on the Python version).

When the STI tests run, some of the things happen on the host. For example, as demonstrated in the linked pull request, when the standard-test-source role is used, the Ansible host executes:

rpm -q --specfile --queryformat="%{NAME}\n" /var/ARTIFACTS/dist-git-repository-None-ew3bnic6/tests/../*.spec | head -n1

On RHEL 8 or RHEL 9-based system, this errors with:

error: line 3: Unknown tag: %bcond tests 0
error: query of specfile /var/ARTIFACTS/dist-git-repository-None-ew3bnic6/tests/../python-gear.spec failed, can't parse

And as a result, the entire CI job fails with:

Unable to retrieve source file: gear-0.16.0.tar.gz

This is just one example of what could go wrong. The %bcond macro is currently being backported to RHEL 9, so this particular problem might go away if the host runs (or is updated to) RHEL 9. But there will be more similar problems.

I believe a CI system for Fedora must run on recent enough Fedora. Technically, I believe it should always be Rawhide, but for stability's sake, I think the latest stable version is good enough.

Using RHEL works well enough for a couple of years, but will eventually be harder and harder.


Edited the issue, as I realized the host might even be RHEL 8.

Metadata Update from @mvadkert:
- Issue tagged with: Testing Farm

@churchyard Testing Farm is OS-independent, we cannot force it to be built on Fedora.

I would say we should patch STI to not call rpm directly on local machine (the worker, the test runner), but rather call it via a fedora latest container?
That would resolve the problem, I never liked this part of the code running directly on the worker.

I will look into it sometime, but patches are welcome :(

The sad code is here:

https://pagure.io/standard-test-roles/blob/master/f/roles/standard-test-source/tasks/main.yml

but patches are welcome

I have no idea how to make that thing run containers, sorry.

Another similar problem:

TASK [standard-test-source : Get the specfile package name] ********************
changed: [sut -> executor(127.0.0.1)] => {
    "changed": true,
    "cmd": "rpm -q --specfile --queryformat=\"%{NAME}\\n\" /var/ARTIFACTS/git-96290d6caec0a467c86b4e5dbbde7f0821c43cdepjie95wg/tests/../*.spec | head -n1",
    "delta": "0:00:00.088576",
    "end": "2023-03-29 13:54:36.892451",
    "rc": 0,
    "start": "2023-03-29 13:54:36.803875"
}
STDERR:
warning: line 23: Possible unexpanded macro in: Release:        %autorelease
warning: line 23: Possible unexpanded macro in: Release:        %autorelease
warning: line 93: Possible unexpanded macro in: Provides: python3-tox = 4.4.8-%autorelease
error: %changelog entries must start with *
error: query of specfile /var/ARTIFACTS/git-96290d6caec0a467c86b4e5dbbde7f0821c43cdepjie95wg/tests/../python-tox.spec failed, can't parse

Let me put this on the board, so we can discuss how to resolve this.

https://issues.redhat.com/browse/TFT-1969

Another issue is when I have multiple Patch: declarations without numbers:

TASK [standard-test-source : Get the specfile package name] ********************
changed: [sut -> executor(127.0.0.1)] => {
    "changed": true,
    "cmd": "rpm -q --specfile --queryformat=\"%{NAME}\\n\" /var/ARTIFACTS/git-d8295e20cb33457b17c7c5e5f393772095b77a8bceloyofj/tests/../*.spec | head -n1",
    "delta": "0:00:00.021770",
    "end": "2023-07-17 09:48:49.039862",
    "rc": 0,
    "start": "2023-07-17 09:48:49.018092"
}
STDERR:
error: patch 2147483647 defined multiple times
error: query of specfile /var/ARTIFACTS/git-d8295e20cb33457b17c7c5e5f393772095b77a8bceloyofj/tests/../python-tox.spec failed, can't parse

thanks, we plan to get to this in our 2023-08.1 release, so next month, sorry for the delay, I added it there.

We have now full hands with trying to get rawhide testing into shape :(

@churchyard Testing Farm 2023-08.1 is out, and it uses Fedora 38 based workers.
We are dedicated to use latest released Fedora.

I hope that resolves the issue.

Can you please test @churchyard ?

Testing in https://src.fedoraproject.org/rpms/python-tox/pull-request/134

Works like a charm, thanks.

Metadata Update from @churchyard:
- Issue status updated to: Closed (was: Open)

glad to hear!

Metadata