Bug 1774038

Summary: Please build python3-transtats-cli
Product: [Fedora] Fedora EPEL Reporter: Raphael Groner <projects.rg>
Component: transtats-cliAssignee: Parag Nemade <pnemade>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel7CC: pnemade, suanand
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: transtats-cli-0.4.0-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-12 22:50:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1388248, 1757463    
Bug Blocks:    
Attachments:
Description Flags
build.log none

Description Raphael Groner 2019-11-19 13:25:42 UTC
Description of problem:
python2-tabulate is going away in epel7 because of announced general EOL for any python2. The package python2-transtats-cli will be obsolete.

Version-Release number of selected component (if applicable):
epel7

How reproducible:
yes

Steps to Reproduce:
1. yum install python3-transtats-cli
2.
3.

Actual results:
no pkg. found

Expected results:
package gets installed properly with python3

Additional info:
python3-transtats-cli is the only dependency left for python2-tabulate. Please consider.

Comment 1 Raphael Groner 2019-11-19 13:27:05 UTC
Correction.
Additional info:
python2-transtats-cli is the only dependency left for python2-tabulate. Please consider.

Comment 2 Parag Nemade 2019-11-19 16:28:30 UTC
I think this package also needs python3 flake8. I cannot find it in epel7.

Comment 3 Raphael Groner 2019-11-19 16:33:30 UTC
python3-flake8 isn't enabled for epel. Maybe open another RFE.
https://src.fedoraproject.org/rpms/python-flake8/blob/epel7/f/python-flake8.spec#_4

Comment 4 Fedora Update System 2020-06-11 04:21:37 UTC
FEDORA-EPEL-2020-c4b6a0fe80 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-c4b6a0fe80

Comment 5 Parag Nemade 2020-06-11 04:31:15 UTC
ah, I forgot to enable python3. Will do that now.

Comment 6 Fedora Update System 2020-06-11 06:29:23 UTC
FEDORA-EPEL-2020-c5c9623841 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-c5c9623841

Comment 7 Fedora Update System 2020-06-14 04:55:57 UTC
transtats-cli-0.4.0-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-c5c9623841

Comment 8 Raphael Groner 2020-06-17 17:27:41 UTC
From package changelog: "Disable python3 tests as they are failing"

Can you tell what tests are failing or does %check fail completely? It may be a general indication of b0rken support for python3.

Comment 9 Parag Nemade 2020-06-18 08:08:23 UTC
Thank you for taking interest to look into this issue. %check fail completely. I don't have any RHEL system to test this failure but same tests run fine in rawhide.

Here is the failure build log https://kojipkgs.fedoraproject.org//work/tasks/7713/45847713/build.log

Comment 10 Raphael Groner 2020-06-19 14:23:08 UTC
So, wondering why it generally works for python3x in Fedora. Maybe x is too old in RHEL as minor value it indicates API version nowadays?

I'll take a closer look. Thanks for providing the complete output pf test execution.

Comment 11 Fedora Update System 2020-06-29 00:31:58 UTC
FEDORA-EPEL-2020-c5c9623841 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Raphael Groner 2020-07-21 15:34:16 UTC
Sorry, missed the deadline to validate failing tests.

Comment 13 Raphael Groner 2020-07-21 16:10:35 UTC
Created attachment 1701937 [details]
build.log

Comment 14 Raphael Groner 2020-07-21 16:27:04 UTC
The tests fail there:

            runner = CliRunner()
            result = runner.invoke(entry_point, ['coverage', 'rhinstaller'])

while:

from click.testing import CliRunner

This seems a general bug in click module.

Comment 15 Parag Nemade 2020-12-03 09:44:10 UTC
any updates here?

Comment 16 Raphael Groner 2020-12-03 16:19:23 UTC
Sorry for the delay. Currently there's no free time slot for me to take a deeper look into.

Those tests still fail in another rebuild tried with python3:

test_coverage_rule (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_job_log (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_job_run (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_package_status (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_package_status_exist (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_package_status_health (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_package_status_health_in_sync (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_release_status (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_release_status_by_locale (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_release_status_detail (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_release_status_json (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_server_version (tests.test_tscli.TestTranstatsCLI) ... FAIL
test_version_cli (tests.test_tscli.TestTranstatsCLI) ... FAIL

======================================================================
FAIL: test_coverage_rule (tests.test_tscli.TestTranstatsCLI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/transtats-cli-0.4.0/tests/test_tscli.py", line 136, in test_coverage_rule
    self.assertEqual(result.exit_code, 0)
AssertionError: -1 != 0

Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=56711196

Comment 17 Parag Nemade 2020-12-04 14:07:59 UTC
no worries. Thanks for the update.

Comment 18 Raphael Groner 2021-01-12 22:50:58 UTC
While debugging a lot, finally found the nasty bug in click framework:

Result RuntimeError('Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. ....

But all tests show success with the following patch.

%check
# log complete result error for better debugging
sed -i -r 's:assertEqual\(result.exit_code, 0:\0, str(result):' tests/test_*.py
# see http://click.pocoo.org/python3 for unicode issue
export LC_ALL=en_US.UTF-8
%{__python2} setup.py test
%{__python3} setup.py test


test_coverage_rule (tests.test_tscli.TestTranstatsCLI) ... ok
test_job_log (tests.test_tscli.TestTranstatsCLI) ... ok
test_job_run (tests.test_tscli.TestTranstatsCLI) ... ok
test_package_status (tests.test_tscli.TestTranstatsCLI) ... ok
test_package_status_exist (tests.test_tscli.TestTranstatsCLI) ... ok
test_package_status_health (tests.test_tscli.TestTranstatsCLI) ... ok
test_package_status_health_in_sync (tests.test_tscli.TestTranstatsCLI) ... ok
test_release_status (tests.test_tscli.TestTranstatsCLI) ... ok
test_release_status_by_locale (tests.test_tscli.TestTranstatsCLI) ... ok
test_release_status_detail (tests.test_tscli.TestTranstatsCLI) ... ok
test_release_status_json (tests.test_tscli.TestTranstatsCLI) ... ok
test_server_version (tests.test_tscli.TestTranstatsCLI) ... ok
test_version_cli (tests.test_tscli.TestTranstatsCLI) ... ok

----------------------------------------------------------------------
Ran 13 tests in 0.031s

OK