#6450 pylint: cyclic dep check sometimes makes build fail
Closed: fixed 5 years ago Opened 7 years ago by alich.

[root@master1 freeipa]# make rpms
- SNIP -
                    IPA Server 4.4.90.201611021526GITf12abfb
                    ========================

        prefix:                   /usr
        exec_prefix:              ${prefix}
        libdir:                   /usr/lib
        bindir:                   ${exec_prefix}/bin
        sbindir:                  ${exec_prefix}/sbin
        sysconfdir:               /etc
        localstatedir:            /var
        datadir:                  ${datarootdir}
        krb5rundir:               /var/run/krb5kdc
        systemdsystemunitdir:     /usr/lib/systemd/system
        source code location:     .
        compiler:                 gcc
        cflags:                   -g -O2 -Wall -Wextra -Wformat-security -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers 
        LDAP libs:                -lldap_r -llber
        KRB5 libs:                -lkrb5 -lk5crypto -lcom_err
        KRAD libs:                -lkrad
        OpenSSL crypto libs:      -lcrypto
        Maintainer mode:          no

./makeapi --validate
./makeapi: ipaserver/plugins/dogtag.py:244: ignoring ImportError: No module named backports_abc
./makeaci --validate
./makeaci: ipaserver/plugins/dogtag.py:244: ignoring ImportError: No module named backports_abc
# find all python modules and executable python files outside modules for pylint check
FILES=`find . \
    -type d -exec test -e '{}/__init__.py' \; -print -prune -o \
    -path '*/.*' -o \
    -path './dist/*' -o \
    -path './lextab.py' -o \
    -path './yacctab.py' -o \
    -name '*~' -o \
    -name \*.py -print -o \
    -type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \
echo "Pylint is running, please wait ..."; \
PYTHONPATH=. pylint --rcfile=pylintrc  $FILES || false
Pylint is running, please wait ...
************* Module ipasetup
ipasetup.py:1: [R0401(cyclic-import), ] Cyclic import (ipapython.config -> ipapython.ipautil))
ipasetup.py:1: [R0401(cyclic-import), ] Cyclic import (ipaclient.plugins.rpcclient -> ipalib.rpc -> ipalib -> ipaclient.remote_plugins))
ipasetup.py:1: [R0401(cyclic-import), ] Cyclic import (ipalib -> ipalib.cli))
ipasetup.py:1: [R0401(cyclic-import), ] Cyclic import (ipatests.test_integration.config -> ipatests.test_integration.host -> ipatests.test_integration.env_config))
ipasetup.py:1: [R0401(cyclic-import), ] Cyclic import (ipatests.test_integration.config -> ipatests.test_integration.env_config))
ipasetup.py:1: [R0401(cyclic-import), ] Cyclic import (ipaclient.plugins.rpcclient -> ipalib -> ipaclient.remote_plugins))
Makefile:130: recipe for target 'pylint' failed
make: *** [pylint] Error 1
[root@master1 freeipa]# rpm -q pylint
pylint-1.5.6-1.fc24.noarch

Steps to reproduce:
1. download freeipa master code from GIT
1. cd freeipa && make && make rpms

Note: my box is up2date Fedora 24


We don't know why pylint doesn't run this check always, this is reproducible only sometimes

OK, I have box where I hit the issue in 100%, for the debugging purpose feel free to ping me and I'll give you the credentials.

Cyclic dep check in pylint should be disabled.

Metadata Update from @alich:
- Issue assigned to someone
- Issue set to the milestone: FreeIPA 4.5

7 years ago

Metadata Update from @pvoborni:
- Issue close_status updated to: None
- Issue set to the milestone: FreeIPA 4.7 (was: FreeIPA 4.5)

7 years ago

We haven't had any trouble with cyclic dependency checker for a while. it looks like the issue was fixed by a more recent version of pylint.

Metadata Update from @cheimes:
- Issue close_status updated to: fixed

5 years ago

Login to comment on this ticket.

Metadata