Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 908062 - app-admin/ansible-lint-6.17.0 fails to run - AttributeError: 'Runtime' object has no attribute 'plugins'
Summary: app-admin/ansible-lint-6.17.0 fails to run - AttributeError: 'Runtime' object...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrice Clement
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-08 10:24 UTC by Tomáš Mózes
Modified: 2023-06-08 13:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomáš Mózes 2023-06-08 10:24:13 UTC
# ansible-lint
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/ansible-lint", line 8, in <module>
    sys.exit(_run_cli_entrypoint())
             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 310, in _run_cli_entrypoint
    sys.exit(main(sys.argv))
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 247, in main
    rules = RulesCollection(options.rulesdirs, profile_name=options.profile)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/rules/__init__.py", line 398, in __init__
    for rule in load_plugins(rulesdirs_str):
  File "/usr/lib/python3.11/site-packages/ansiblelint/rules/__init__.py", line 346, in load_plugins
    import_module(f"{f.stem}")
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.11/site-packages/ansiblelint/rules/schema.py", line 53, in <module>
    "become_method": get_app().runtime.plugins.become.keys(),  # pylint: disable=no-member
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Runtime' object has no attribute 'plugins'
Comment 1 Tomáš Mózes 2023-06-08 10:25:07 UTC
Portage 3.0.45.3 (python 3.11.3-final-0, default/linux/amd64/17.1, gcc-12, glibc-2.36-r8, 5.15.114-gentoo x86_64)
=================================================================
System uname: Linux-5.15.114-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-2407_0_@_2.20GHz-with-glibc2.36
KiB Mem:     3962016 total,   2491560 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 08 Jun 2023 00:15:01 +0000
Head commit of repository gentoo: 3d0ee5e9d36b3c3b913f3c44bf06ea2d2cf3b3bf

sh bash 5.1_p16-r4
ld GNU ld (Gentoo 2.39 p6) 2.39.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r4::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.11.3::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/cmake:            3.26.3::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.46::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             12.2.1_p20230428-r1::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r8::gentoo
Repositories:

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-mtune=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_
CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict 
network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetc
h userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfil
es --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="acl amd64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libtirpc multilib ncurses nptl openmp pam pcre readline seccomp split-usr ssl test-rust unicode xattr zlib" ABI_X86="64" ADA_
TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default
 authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log
_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="d
f interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx popcnt sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate everm
ore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ub
x" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-con
sole presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHO
N_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby30 ruby31" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd
 pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL
_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB,
 READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Tomáš Mózes 2023-06-08 10:27:49 UTC
Reverted to version 6.16.2 and it works. However, without pip, this is printed in the footer:

...
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/ansible-lint", line 8, in <module>
    sys.exit(_run_cli_entrypoint())
             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 310, in _run_cli_entrypoint
    sys.exit(main(sys.argv))
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 301, in main
    return app.report_outcome(result, mark_as_success=mark_as_success)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/app.py", line 230, in report_outcome
    self.report_summary(
  File "/usr/lib/python3.11/site-packages/ansiblelint/app.py", line 337, in report_summary
    version_warning = get_version_warning()
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/config.py", line 302, in get_version_warning
    pip = guess_install_method()
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/config.py", line 223, in guess_install_method
    from pip._internal.metadata import get_default_environment
ModuleNotFoundError: No module named 'pip'

With pip installed:
...
A new release of ansible-lint is available: 6.16.2 → 6.17.0
Comment 3 Marek Szuba archtester gentoo-dev 2023-06-08 13:21:39 UTC
Argh. I even made a note about upstream having bumped the required ansible-compat version after 6.16.2... and then I forgot anyway. Will push a fix shortly, thanks for the report.
Comment 4 Larry the Git Cow gentoo-dev 2023-06-08 13:35:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0547fbbb1448a8b17276ec8fd783f475aa80bdb8

commit 0547fbbb1448a8b17276ec8fd783f475aa80bdb8
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2023-06-08 13:30:13 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2023-06-08 13:30:16 +0000

    app-admin/ansible-lint: fix dependencies of 6.17.0
    
    Closes: https://bugs.gentoo.org/908062
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 .../{ansible-lint-6.17.0.ebuild => ansible-lint-6.17.0-r1.ebuild}      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 5 Tomáš Mózes 2023-06-08 13:58:38 UTC
No problem, thanks Marek!