Hi all,
we recently excluded build for i686 arch: https://github.com/rhinstaller/anaconda/blob/7748f0c07d207c99754dcbb3383f8344aa8fbb4d/anaconda.spec.in#L5
however, as you can see on this MR to dist-git: https://src.fedoraproject.org/rpms/anaconda/pull-request/191#comment-226551
we are getting failure from ZUUL check for i686 build. The build is starting koji job ending with:
error: Architecture is excluded: i686 error: parsing failed Architecture is excluded: i686 parsing failed RPM build errors: Child return code was: 1
which is not actually error, that is expected behavior.
My main concern is waste of resources for unnecessary koji builds. Could the ZUUL please take into consideration the arch exclude of the package to avoid failing tests and running unnecessary builds?
My main concern is waste of resources for unnecessary koji builds.
My main concern is wasted people resources for manually checking why there is a failure on i686.
That is definitely also true :)
I think the logic here [1] should be improved. We need the right rpm command to compute the excluded arches then remove the corresponding jobs from [2].
I'll be happy to review a proposal on that playbook.
1: https://pagure.io/fedora-zuul-jobs-config/blob/master/f/playbooks/rpm/check-for-arches.yaml 2: https://fedora.softwarefactory-project.io/zuul/build/1ebced6bbae1412f85c207c30443a6a3/log/zuul-info/inventory.yaml#36
Koji must know how to handle excluded arches. So does Copr. Perhaps we can inspire there?
This seems to work:
import rpm import sys DEFAULT_ARCHES = {"x86_64", "i686", "aarch64", "ppc64le", "s390x"} s = rpm.spec(sys.argv[1]) arch = s.sourceHeader[rpm.RPMTAG_ARCH] if arch == "noarch": print("noarch", " # submit a scratch build with no --arch overrides") else: exclusive_arch = set(s.sourceHeader[rpm.RPMTAG_EXCLUSIVEARCH]) exclude_arch = set(s.sourceHeader[rpm.RPMTAG_EXCLUDEARCH]) if exclusive_arch: build_on = (DEFAULT_ARCHES & exclusive_arch) - exclude_arch else: build_on = DEFAULT_ARCHES - exclude_arch for arch in sorted(build_on): print(arch, f" # submit a scratch build with --arch {arch}")
See it in action:
[fedora-scm]$ python ~/tmp/zuularch.py anaconda/*.spec aarch64 # submit a scratch build with --arch aarch64 ppc64le # submit a scratch build with --arch ppc64le s390x # submit a scratch build with --arch s390x x86_64 # submit a scratch build with --arch x86_64 [fedora-scm]$ python ~/tmp/zuularch.py scipy/*.spec aarch64 # submit a scratch build with --arch aarch64 i686 # submit a scratch build with --arch i686 ppc64le # submit a scratch build with --arch ppc64le s390x # submit a scratch build with --arch s390x x86_64 # submit a scratch build with --arch x86_64 [fedora-scm]$ python ~/tmp/zuularch.py python-trimesh/*.spec aarch64 # submit a scratch build with --arch aarch64 ppc64le # submit a scratch build with --arch ppc64le s390x # submit a scratch build with --arch s390x x86_64 # submit a scratch build with --arch x86_64 [fedora-scm]$ python ~/tmp/zuularch.py redhat-rpm-config/*.spec noarch # submit a scratch build with no --arch overrides
And it also solves https://pagure.io/fedora-ci/general/issue/495
I've integrated the script via a new check-for-arches-ng jobs https://pagure.io/fedora-zuul-jobs-config/pull-request/194 Next step will be to run that new job in // in order to check the results
https://pagure.io/fedora-zuul-jobs-config/pull-request/195 https://pagure.io/fedora-zuul-jobs/pull-request/191 https://pagure.io/fedora-project-config/pull-request/333
@churchyard above PRs are merged, please let me know about the result of the non voting "check-for-arches-ng" job. The output of the job should display the list of jobs to run. For now the workflow is not changed, I'd like to see the job run and that we ensure the result are as expected then we could switch to that new version as the followup.
https://src.fedoraproject.org/rpms/python-trimesh/pull-request/46 -- FAILURE
the field 'args' has an invalid value ({'msg': '{{ cmd_out.stdout | from_json }}'}), and could not be converted to an dict.The error was: Expecting value: line 1 column 1 (char 0) The error appears to be in '/var/lib/zuul/builds/b395aab69fb94e9da0afd0368d00b6b5/trusted/project_3/pagure.io/fedora-zuul-jobs-config/playbooks/rpm/check-for-arches-ng.yaml': line 20, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - ansible.builtin.debug: ^ here
Here is the list of jobs that run so far: https://fedora.softwarefactory-project.io/zuul/builds?job_name=check-for-arches-ng&skip=0 and some of them fails because it seems that the discover-arches.py is unable to find the local sources and expects that we populate a SOURCES directory.
error: Unable to open /workspace/rpmbuild/SOURCES/triggers.systemd: No such file or directory Traceback (most recent call last): File "/tmp/discover-arches.py", line 15, in <module> s = rpm.spec(sys.argv[1]) ^^^^^^^^^^^^^^^^^^^^^ ValueError: can't parse specfile
error: Unable to open /workspace/rpmbuild/SOURCES/extrasources.inc: No such file or directory Traceback (most recent call last): File "/tmp/discover-arches.py", line 15, in <module> s = rpm.spec(sys.argv[1]) ^^^^^^^^^^^^^^^^^^^^^ ValueError: can't parse specfile
Do you know the proper command to extract the sources files located next to the .spec file and copy them into the SOURCES directory.
(comment deleted)
This should do:
rpm.addMacro("_sourcedir", ".") s = rpm.spec(sys.argv[1])
Thanks you ! Local test is Ok. So https://pagure.io/fedora-zuul-jobs-config/pull-request/196 and let's see how it'll behave
For some spec file the rpm lib return some warning in the command output so here is an additional fix https://pagure.io/fedora-zuul-jobs-config/pull-request/197
I'm still getting:
the field 'args' has an invalid value ({'msg': '{{ cmd_out.stdout | from_json }}'}), and could not be converted to an dict.The error was: Expecting value: line 1 column 1 (char 0) The error appears to be in '/var/lib/zuul/builds/6301b63e36984c3a8365788d4e9d5b82/trusted/project_3/pagure.io/fedora-zuul-jobs-config/playbooks/rpm/check-for-arches-ng.yaml': line 25, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - ansible.builtin.debug: ^ here
e.g. in https://src.fedoraproject.org/rpms/python-tox/pull-request/160
Hi, Here https://fedora.softwarefactory-project.io/zuul/build/8304f6dd2014494195eb5e9f3531917d/console I see:
pyproject_buildrequires: invalid option -- 'g' error: python-tox.spec: line 110: Unknown option g in pyproject_buildrequires(rRxtNwe:C:) Traceback (most recent call last): File "/tmp/discover-arches.py", line 16, in <module> s = rpm.spec(sys.argv[1]) ^^^^^^^^^^^^^^^^^^^^^ ValueError: can't parse specfile
So we don't get any valid JSON output for the next Ansible task. Any idea ?
That's outdated pyproject-srpm-macros on that system. Updating it should solve that.
Ok, then I'll ensure packages are up to date in the container: https://pagure.io/fedora-zuul-jobs-config/pull-request/198
@churchyard Hi, I did not noticed new issues with check-for-arches-ng. Is it fine for you if I propose the changes to replace check-for-arches with this new version and land them ?
ack, thanks
I did the switch few hour ago https://pagure.io/fedora-zuul-jobs-config/pull-request/199 Let's me know if you see issues. I'll close the ticket, please re-open if needed.
Metadata Update from @fbo: - Issue status updated to: Closed (was: Open)
Will test in https://src.fedoraproject.org/rpms/anaconda/pull-request/197 and report back.
Works. Thank you.
I found a problem. The discover-arches.py script does not properly work with Fedora/RHEL conditionals: https://pagure.io/fedora-ci/general/issue/515
Log in to comment on this ticket.