Bug 2116674 - koji cannot download rpms for scratch builds
Summary: koji cannot download rpms for scratch builds
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: koji
Version: 37
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Mike McLean
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-09 06:58 UTC by Miroslav Vadkerti
Modified: 2022-08-12 01:42 UTC (History)
6 users (show)

Fixed In Version: koji-1.29.1-4.fc38 koji-1.29.1-4.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 17:27:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure koji pull-request 3458 0 None None None 2022-08-09 18:14:43 UTC

Description Miroslav Vadkerti 2022-08-09 06:58:46 UTC
Description of problem:

Found in Fedora CI, this is blocking testing of scratch builds.

See: 

https://koji.fedoraproject.org/koji/taskinfo?taskID=90635784

❯ koji download-task --arch noarch --arch x86_64 --arch src 90635784
No files for download found.


Version-Release number of selected component (if applicable):
koji-1.29.1-1.fc35.noarch

How reproducible:
100%

Steps to Reproduce:
1. See description

Actual results:
Does not download rpms

Expected results:
Downloads rpms.


Additional info:
Seems last working version was koji-1.29.0-1.fc35.noarch. Reproducable also on Fedora 35.

Comment 1 Marián Konček 2022-08-09 07:07:39 UTC
On my system:
$ rpm -q koji
koji-1.29.0-1.fc35.noarch

$ koji download-build --debuginfo --task-id --arch noarch --arch x86_64 --arch src 90635784 || koji download-task --arch noarch --arch x86_64 --arch src 90635784
No associated builds for task 90635784
Downloading [1/3]: regexp-1.5-40.fc37.noarch.rpm
[====================================] 100%  45.53 KiB
Downloading [2/3]: regexp-javadoc-1.5-40.fc37.noarch.rpm
[====================================] 100% 146.63 KiB
Downloading [3/3]: regexp-1.5-40.fc37.src.rpm
[====================================] 100% 191.03 KiB

Comment 2 Ben Cotton 2022-08-09 13:36:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 3 Kevin Fenzi 2022-08-09 16:18:00 UTC
Right, you need --task-id for it to download a task...

  --task-id             Interperet id as a task id

otherwise it looks for a packagename-v-r and since there's not a 90635784 build, it fails.

Comment 4 Adam Williamson 2022-08-09 16:41:41 UTC
Miroslav was using `koji download-task`, which obviously should take a task ID.

Marián's output shows the command `koji download-build --debuginfo --task-id --arch noarch --arch x86_64 --arch src 90635784` failing because it could find "No associated builds for task 90635784", then the command `koji download-task --arch noarch --arch x86_64 --arch src 90635784` working. But that's with koji-1.29.0-1.fc35. Not quite sure what Marián's point in posting that output was.

Comment 5 Adam Williamson 2022-08-09 17:26:49 UTC
Seems like the arch filtering is breaking it, because:

[adamw@xps13k tmp]$ koji download-task --arch noarch --arch x86_64 --arch src 90635784
No files for download found.
[adamw@xps13k tmp]$ koji download-task 90635784
Downloading [1/3]: regexp-1.5-40.fc37.noarch.rpm
[====================================] 100%  45.53 KiB
Downloading [2/3]: regexp-javadoc-1.5-40.fc37.noarch.rpm
[====================================] 100% 146.63 KiB
Downloading [3/3]: regexp-1.5-40.fc37.src.rpm
[====================================] 100% 191.03 KiB

There definitely was substantial change to the download-task code between 1.29.0 and 1.29.1. I'll see if I can figure out the problem.

Comment 6 Adam Williamson 2022-08-09 17:36:56 UTC
Okay, I see the problem. There's an unsafe check on the path where we're filtering by arch:

        if len(suboptions.arches) == 0 or taskarch in suboptions.arches:

that skips over the task if its arch is not in `suboptions.arches`. But builds of noarch packages can run on *any* arch. So in the example, the build task ran on an s390x host, and that's what `taskarch` (which is just `task["arch"]`) is. So when we filter with `--arch noarch --arch x86_64 --arch src` that task gets skipped.

I'll figure out the best way to address this and send a PR.

Comment 7 Fedora Update System 2022-08-09 19:08:31 UTC
FEDORA-2022-9d2bf6b5b2 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9d2bf6b5b2

Comment 8 Fedora Update System 2022-08-09 19:54:25 UTC
FEDORA-2022-bf1ca23cf2 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-bf1ca23cf2

Comment 9 Fedora Update System 2022-08-09 19:54:27 UTC
FEDORA-2022-08bbd1aa34 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-08bbd1aa34

Comment 10 Fedora Update System 2022-08-10 01:39:04 UTC
FEDORA-2022-08bbd1aa34 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-08bbd1aa34`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-08bbd1aa34

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2022-08-10 02:10:24 UTC
FEDORA-2022-bf1ca23cf2 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-bf1ca23cf2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-bf1ca23cf2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2022-08-10 17:26:10 UTC
FEDORA-2022-a3c287d512 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-a3c287d512

Comment 13 Fedora Update System 2022-08-10 17:26:29 UTC
FEDORA-2022-ad136b1f77 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-ad136b1f77

Comment 14 Fedora Update System 2022-08-10 17:27:40 UTC
FEDORA-2022-ad136b1f77 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2022-08-11 23:40:46 UTC
FEDORA-2022-a3c287d512 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2022-08-12 01:38:35 UTC
FEDORA-2022-08bbd1aa34 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2022-08-12 01:42:00 UTC
FEDORA-2022-bf1ca23cf2 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.