Bug 1419894 - Tests are failing during build
Summary: Tests are failing during build
Alias: None
Product: Fedora
Classification: Fedora
Component: custodia
Version: 26
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Simo Sorce
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2017-02-07 11:04 UTC by Lumír Balhar
Modified: 2017-10-30 07:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-10-30 07:51:56 UTC
Type: Bug

Attachments (Terms of Use)
Add py36 environment to tox tests (1.20 KB, patch)
2017-03-07 16:28 UTC, Lumír Balhar
no flags Details | Diff
Run tests with appropriate Python 3 version (1.26 KB, patch)
2017-03-09 12:53 UTC, Lumír Balhar
no flags Details | Diff

Description Lumír Balhar 2017-02-07 11:04:30 UTC
In rawhide, there is Python version 3.6 but in Custodia specfile there is hardcoded Python 3.5 in test execution command (tox environment):

> tox -e py35 -- --skip-servertests

Result is that Tox cannot find interpreter for Python 3.5 and silently fails with exit code 0:

> GLOB sdist-make: /builddir/build/BUILD/custodia-0.2.0/setup.py
> py35 create: /builddir/build/BUILD/custodia-0.2.0/.tox/py35
> ERROR: InterpreterNotFound: python3.5
> ___________________________________ summary ____________________________________
> SKIPPED:  py35: InterpreterNotFound: python3.5
>   congratulations :)
> + exit 0

I've tried to change it to `py36` but another problem appears because tox tries to install dnspython3:

> Collecting dnspython3 (from python-etcd->custodia==0.2.0)

But python[23]-dns is installed as a dependency of python[23]-python-etcd. This problem appears with both python versions (in F26 with py36 and F25 with py35). It looks like a problem with python[23]-python-etcd package but I am not sure and I'll investigate it more.

Comment 1 Lumír Balhar 2017-02-07 13:01:59 UTC
Ok, I've found the reason. The reason is that old version (0.4.3) of python-etcd still depends on separated packages dnspython and dnspython3 but this two packages were merged in upstream to one package dnspython.

So, when you install python3-dns, the module is named dnspython instead of dnspython3 which causes that Tox tries to download package dnspython3 and it fails in Koji.

The update of python-etcd should solve this issue, but we have to wait until upstream developers make a new release. https://github.com/jplana/python-etcd/issues/208
After that, we can update python-etcd package to the newest version and the custodia to Python 3.6.

Have a nice day.

Comment 2 Fedora End Of Life 2017-02-28 11:12:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 3 Lumír Balhar 2017-03-07 16:28:06 UTC
Created attachment 1260883 [details]
Add py36 environment to tox tests


I found out that there is a new version of python-etcd in rawhide and lot of issues were fixed in the newest Custodia.

But there is still missing Python 3.6 environment in the %check section which leads to skipping tests under Python 3 in rawhide. Because of tox skips tests with the missing environment, is safe to just add test execution with another Python environment.

The patch for a specfile is attached.

Koji builds:
f27: https://koji.fedoraproject.org/koji/taskinfo?taskID=18249170
f26: https://koji.fedoraproject.org/koji/taskinfo?taskID=18249173
f25: https://koji.fedoraproject.org/koji/taskinfo?taskID=18249177

Have a nice day.

Comment 4 Miro Hrončok 2017-03-09 11:20:10 UTC
(Based on a conversation with Lumír) I don't think that "tox with non-existing Python version will fail silently with exit code 0" should be used as a feature. I'd suggest use this instead:

tox --sitepackages -e py%{python3_version_nodots} -- --skip-servertests

Comment 5 Lumír Balhar 2017-03-09 12:53:58 UTC
Created attachment 1261547 [details]
Run tests with appropriate Python 3 version

Yes, Miro is right. I didn't know about 'nodots' macro.

New patch version attached.

Comment 6 Lumír Balhar 2017-05-15 13:01:06 UTC

I see that the issue is solved. From my point of view is better to use standard macro '%{python3_version_nodots}' instead of defining new one '%{python3_tox}' but it is up to you.

Commit: http://pkgs.fedoraproject.org/cgit/rpms/custodia.git/commit/?id=05365a8441751e9fb3d7054b7da21be03f79b4b4

My koji scratch build with running tests: https://koji.fedoraproject.org/koji/taskinfo?taskID=19565848

I don't know why but the build of the package with latest committed changes failed. Could you please try it one more time? It seems that in my scratch build there is everything ok.

Failed build: https://koji.fedoraproject.org/koji/taskinfo?taskID=18924699

Thank you and have a nice day.

Comment 7 Lumír Balhar 2017-10-30 07:51:56 UTC
Fixed in the latest version, closing.

Commit: https://src.fedoraproject.org/rpms/custodia/c/10e487b50a165b10f2ca996fb08ca5d413da6b02?branch=f27

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