#4098 rfe: task search API parameter to query for buildArch tasks with noarch output
Opened by petersen. Modified

This feels like an API regression: noarch buildArch tasks now have the arch field set to the arch of the builder rather than noarch as earlier. This may have started in February looking back at my own noarch builds.

Here is an example noarch build just now: https://koji.fedoraproject.org/koji/taskinfo?taskID=117890247 (note the result arch field says s390x)

Another example with a build from yesterday https://koji.fedoraproject.org/koji/taskinfo?taskID=117855495

One from March: https://koji.fedoraproject.org/koji/taskinfo?taskID=115235074 which does have arch field noarch.

This change/regression makes it rather hard to search for noarch tasks now.

I haven't identified which koji version change caused this different behavior but for Fedora Koji it seems to it might have begun between these 2 builds of mine (koji UTC dates):

19 Feb 2024: https://koji.fedoraproject.org/koji/taskinfo?taskID=113740745
27 Feb 2024: https://koji.fedoraproject.org/koji/taskinfo?taskID=114108823


Another way to investigate this: eg koji-tool tasks [-u USER] -l6 -a noarch.

Today I can only find new epel builds with noarch buildArch tasks, Fedora noarch builds seem to be arch'ed. Perhaps that relates to the koji version on the builder?

Not sure if it could be related to:

  • Allow specifying with a tag value what arches noarch builds happen on.

in Fedora koji-1.34.0-2 ?

The arch field of the task entry has a different meaning than the arch field of the rpm entry. There has never been a guarantee that the two line up. Any system that assumes such is misreading the data.

Koji has, for many years, used specific arch values for noarch buildArch tasks in certain situations. It depends a number of factors -- exclusivearch, excludearch, the tag arch list, the literal_task_arches setting in kojid, and most recently the noarch_arches tag setting.

It is the last that is causing Koji not to use noarch in your case. Fedora has applied this pending change on their instance -- https://pagure.io/koji/pull-request/4013

The task you referenced uses build tag f41-build, which has noarch_arches='aarch64 x86_64 ppc64le s390x'
https://koji.fedoraproject.org/koji/taginfo?tagID=83506

Metadata Update from @mikem:
- Custom field Size adjusted to None

So is there any reliable way to search for noarch buildArch tasks?

In SQL yes, via API no. In db you can run something like:

SELECT id FROM task WHERE method ='buildArch' AND cast(xpath('//param[3]/value/string/text()', request::xml) as text[]) = '{"noarch"}' LIMIT 5

I think there ought to be a way to do it in the API: maybe a new separate arch parameter could be added?

Unfortunately, it is not reasonable to build a api query for task parameters. Queries like the above example are unreliable and slow. The only way to achieve this would be to change the data model for task parameters, which is a big step.

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/4098

Please continue any further discussion there.

Metadata