Bug 1661676 - taskotron fails with AttributeError: 'ProgressBar' object has no attribute 'maxval'
Summary: taskotron fails with AttributeError: 'ProgressBar' object has no attribute 'm...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libtaskotron
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora QA Tools SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1654746
Blocks: python-progressbar2
TreeView+ depends on / blocked
 
Reported: 2018-12-22 00:08 UTC by Miro Hrončok
Modified: 2018-12-28 12:37 UTC (History)
4 users (show)

Fixed In Version: libtaskotron-0.9.4-3.fc30
Clone Of:
Environment:
Last Closed: 2018-12-27 17:30:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2018-12-22 00:08:55 UTC
Description of problem:
The testsuite of https://github.com/fedora-python/taskotron-python-versions fails on rawhide.

Digging into it, I found the cause.

This script (provided by taskotron devs): https://github.com/fedora-python/taskotron-python-versions/blob/develop/download_rpms.py

Runs koji_directive from libtaskotron.directives and fails.

Version-Release number of selected component (if applicable):
python3-libtaskotron-0.9.4-1.fc30.noarch
python3-progressbar2-3.39.2-2.fc30.noarch

How reproducible:
Easy, run the download_rpms.py on rawhide.

Steps to Reproduce:
1. install the above packages
2. python3 download_rpms.py python-admesh-0.98.5-3.fc25 /tmp x86_64,noarch,src

Actual results:
Downloading rpms for python-admesh-0.98.5-3.fc25 into /var/tmp/task-dist.python-versions_tilx8x8j
Traceback (most recent call last):
  File "download_rpms.py", line 48, in <module>
    **args
  File "download_rpms.py", line 28, in download_rpms
    koji.process(params, arg_data)
  File "/usr/lib/python3.7/site-packages/libtaskotron/directives/koji_directive.py", line 210, in process
    debuginfo=debuginfo, src=src)
  File "/usr/lib/python3.7/site-packages/libtaskotron/ext/fedora/koji_utils.py", line 262, in get_nvr_rpms
    rpm_file = file_utils.download(url, dest, cachedir=cachedir)
  File "/usr/lib/python3.7/site-packages/libtaskotron/file_utils.py", line 134, in download
    _download(url, dl_dest)
  File "/usr/lib/python3.7/site-packages/libtaskotron/file_utils.py", line 200, in _download
    pbar.update(min(read, pbar.maxval))
AttributeError: 'ProgressBar' object has no attribute 'maxval'

Expected results:
Should download the RPMs.

Additional info:
This is directly caused by python3-progressbar2 providing/obsoleting/replacing python3-progressbar.

https://bugzilla.redhat.com/show_bug.cgi?id=1648728
https://bugzilla.redhat.com/show_bug.cgi?id=1654746

Comment 1 František Zatloukal 2018-12-23 00:08:56 UTC
Fix should be in libtaskotron-0.9.4-2.fc30 [0]. It's more of a hotfix than something proper for now.

Is it working for you?

[0] https://koji.fedoraproject.org/koji/buildinfo?buildID=1175379

Comment 2 Miro Hrončok 2018-12-27 00:09:27 UTC
> Is it working for you?

No. You have not applied the patch.

<mock-chroot> sh-4.4# rpm -q python3-libtaskotron
python3-libtaskotron-0.9.4-2.fc30.noarch

<mock-chroot> sh-4.4# python3 download_rpms.py python-admesh-0.98.5-3.fc25 /tmp x86_64,noarch,src
Running script: ['download_rpms.py', 'python-admesh-0.98.5-3.fc25', '/tmp', 'x86_64,noarch,src']
Requested arches: ['x86_64', 'noarch', 'src']
DEBUG:libtaskotron:Using config file: /etc/taskotron/taskotron.yaml
DEBUG:libtaskotron:Using config profile: development
Downloading rpms for python-admesh-0.98.5-3.fc25 into /tmp
INFO:libtaskotron:Querying Koji for a list of RPMs for: python-admesh-0.98.5-3.fc25 (arches ['noarch', 'src', 'x86_64'])
INFO:libtaskotron:Fetching 3 RPMs for: python-admesh-0.98.5-3.fc25 (into /tmp)
DEBUG:libtaskotron:Already downloaded: /var/cache/taskotron/python-admesh-0.98.5-3.fc25.src.rpm
DEBUG:libtaskotron:Downloading (cached): https://kojipkgs.fedoraproject.org/packages/python-admesh/0.98.5/3.fc25/x86_64/python-admesh-0.98.5-3.fc25.x86_64.rpm
N/A%|                                                                                   |ETA:  --:--:--  0.0 s/BTraceback (most recent call last):
  File "download_rpms.py", line 48, in <module>
    **args
  File "download_rpms.py", line 28, in download_rpms
    koji.process(params, arg_data)
  File "/usr/lib/python3.7/site-packages/libtaskotron/directives/koji_directive.py", line 210, in process
    debuginfo=debuginfo, src=src)
  File "/usr/lib/python3.7/site-packages/libtaskotron/ext/fedora/koji_utils.py", line 262, in get_nvr_rpms
    rpm_file = file_utils.download(url, dest, cachedir=cachedir)
  File "/usr/lib/python3.7/site-packages/libtaskotron/file_utils.py", line 134, in download
    _download(url, dl_dest)
  File "/usr/lib/python3.7/site-packages/libtaskotron/file_utils.py", line 200, in _download
    pbar.update(min(read, pbar.maxval))
AttributeError: 'ProgressBar' object has no attribute 'maxval'
100%|#################################################################################|Time:  0:00:00130.4 KiB/s

Comment 3 Miro Hrončok 2018-12-27 00:13:44 UTC
Here you go https://src.fedoraproject.org/rpms/libtaskotron/pull-request/2

Comment 4 František Zatloukal 2018-12-27 00:41:56 UTC
Yeah :/ ... I've forgot to push the latest spec I had localy... merged, build submitted, thanks!

Comment 5 Miro Hrončok 2018-12-27 17:30:16 UTC
Thanks, it works now.


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