#3456 arch filtering broken since https://pagure.io/koji/pull-request/3343
Closed: Fixed by tkopecek. Opened by mh21.

Before https://pagure.io/koji/pull-request/3343, the --arch parameters were used in the following way (https://pagure.io/fork/jcupova/koji/blob/4acb8f7476d6909c5985aadc0834881cad242a8e/f/cli/koji_cli/commands.py#_7381):

if filename.endswith(".rpm"):
    filearch = filename.split(".")[-2]
    if len(suboptions.arches) == 0 or filearch in suboptions.arches:
        downloads.append((task, filename, volume, filename))

After the PR, this got changed to also filter on the architecture of the task (https://pagure.io/fork/jcupova/koji/blob/8a13ffa219418031ffb6b157911fa0cab9028ae7/f/cli/koji_cli/commands.py#_7381):

for task in list_tasks:
    taskarch = task['arch']
    if len(suboptions.arches) == 0 or taskarch in suboptions.arches:
        filearch = filename.split(".")[-2]
        if len(suboptions.arches) == 0 or filearch in suboptions.arches:
            downloads.append((task, filename, volume, new_filename, task_id))

This is a backwards-incompatible change.

This double filtering breaks arch filtering during downloading of packages such as the kernel, which has src/noarch packages on arch build tasks (e.g. https://koji.fedoraproject.org/koji/taskinfo?taskID=90451267 with kernel-5.18.16-100.fc35.src.rpm).

This change was detected during a routine container image upgrade in the internal Red Hat kernel CI. Because of this change, it is now required to download all artifacts of all tasks even for a single architecture, which increases download volume and time by at least a factor of 4.


@mh21 I'll check it and will work on it.

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

Metadata Update from @jcupova:
- Issue set to the milestone: 1.30

Metadata Update from @tkopecek:
- Issue tagged with: testing-ready

Commit b0ca9984 fixes this issue

Commit f017ec28 fixes this issue

Metadata Update from @mfilip:
- Issue tagged with: testing-done

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

Please continue any further discussion there.

Metadata
Related Pull Requests