[CI] openstack-tox-linters failing, probably due to a pylint update

Bug #1912456 reported by Cédric Jeanneret
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Triaged
Critical
Cédric Jeanneret

Bug Description

Hello there,

I suspect pylint was update lately, and is now failing due to some new rule:
************* Module tripleo_common.image.image_builder
tripleo_common/image/image_builder.py:120:8: W1201: Use lazy % formatting in logging functions (logging-not-lazy)
tripleo_common/image/image_builder.py:121:8: W1201: Use lazy % formatting in logging functions (logging-not-lazy)

The code pointed here dates back from 2015 and 2017 - so no way it could pass through.

The patch hitting this issue is this one:
https://review.opendev.org/c/openstack/tripleo-common/+/771422

The full log is here:
https://zuul.opendev.org/t/openstack/build/07a675ddccf843c39e9ac2fa9d0449a5

Note: the bashate one is already corrected, zuul is running again with this correction.

We might see other projects fail with this new rule, therefore setting the proper flags to raise proper awareness since it will prevent merges.

Changed in tripleo:
assignee: nobody → Cédric Jeanneret (cjeanner)
Revision history for this message
Cédric Jeanneret (cjeanner) wrote :

After some more researches, it seems this patch is the culprit:
https://github.com/openstack/tripleo-common/commit/d10497246e1b425a23fe87311e4c4c6e825dbe35

Kudos for Takashi for finding it!

Now the 10'000'000$ question: how did this patch merge when those 2 logging lines were still wrong ?!

Revision history for this message
Cédric Jeanneret (cjeanner) wrote :

New Schroedinger paradigm: it may or may not fail, depending on the branch state. Open it, and you'll know...

Here, against plain master:
╭─cjeanner@tengu ~/work/gerrit/tripleo-common ‹master›
╰─$ tox -elinters
linters installed: appdirs==1.4.4,cfgv==3.2.0,distlib==0.3.1,filelock==3.0.12,identify==1.5.12,nodeenv==1.5.0,pre-commit==2.9.3,PyYAML==5.3.1,six==1.15.0,toml==0.10.2,virtualenv==20.3.0
linters run-test-pre: PYTHONHASHSEED='2813373681'
linters run-test: commands[0] | python -m pre_commit run -a
Trim Trailing Whitespace.................................................Passed
Mixed line ending........................................................Passed
check BOM - deprecated: use fix-byte-order-marker........................Passed
Check that executables have shebangs.....................................Passed
Check for merge conflicts................................................Passed
Debug Statements (Python)................................................Passed
Check Yaml...............................................................Passed
flake8...................................................................Passed
bashate..................................................................Passed
- hook id: bashate
- duration: 0.35s
pylint...................................................................Passed
linters run-test: commands[1] | bash -c tools/check_duplicate_jinja_blocks.sh
grep: container-images/tripleo_kolla_template_overrides.j2: No such file or directory
___________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
  linters: commands succeeded
  congratulations :)

this... well. yeah. Quantum state IS actually a thing!

Revision history for this message
Rabi Mishra (rabi) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.