zuul flake8 failing tox for stx/update

Bug #1856585 reported by Al Bailey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Al Bailey

Bug Description

Brief Description
-----------------
  ON Dec 13, a new version of hacking (2.0.0) was released which is used by flake8 to determine which checks are performed. Some of these new checks are failing flake8 for cgcs_patch in stx/update

 No one will be able to submit any code in stx/update until this is fixed, since the zuul flake8 job will fail.

 The fix should probably be to "clamp" the version of hacking in test-requirements.txt.

Severity
--------
Major - It needs to be fixed, but there are no outstanding reviews in stx/update so no one is blocked (yet).
The fix should probably be ported back to other branches, otherwise any cherry-picks to those branches will also fail zuul.

Steps to Reproduce
------------------
Submit a benign code change (like in a comment) in stx/update to trigger zuul to run.

Expected Behavior
------------------
Zuul should pass

Actual Behavior
----------------
Zuul is failing.

Reproducibility
---------------
100% of the time (since Friday).
It is also reproducable in a designer env if you "flush" your .tox folder under stx/update/cgcs-patch

System Configuration
--------------------
Designed setup

Branch/Pull Time/Commit
-----------------------
Master (or R3, or any previous branch) since Friday Dec 13.

Last Pass
---------
Thursday Dec 12.

Timestamp/Logs
--------------
ERROR: flake8: commands failed

Test Activity
-------------
Developer Testing

Revision history for this message
Al Bailey (albailey1974) wrote :

This submission triggered the failed zuul job.
https://review.opendev.org/#/c/699218/

I will update that review to include the fix.

Changed in starlingx:
assignee: nobody → Al Bailey (albailey1974)
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to update (master)

Reviewed: https://review.opendev.org/699218
Committed: https://git.openstack.org/cgit/starlingx/update/commit/?id=5d2da5d041028afa916149da660809ca6fc4fb73
Submitter: Zuul
Branch: master

commit 5d2da5d041028afa916149da660809ca6fc4fb73
Author: Al Bailey <email address hidden>
Date: Mon Dec 16 08:48:14 2019 -0600

    Fix zuul tox flake8 failures from newer version of hacking

    A newer version of hacking was released which enables additional
    checks and is breaking flake8 and zuul.

    Hacking has now been clamped at 2.0.0 in test-requirements.txt
    Added the same for patch-alarm, although it was not failing.

    The new checks that are fixed are:
     H106: Don't put vim configuration in source files
     W605 invalid escape sequence
     F632 use ==/!= to compare str, bytes, and int literals
     F841 local variable is assigned to but never used

    The following flake8 extension check has been removed:
     H904 Delay string interpolations at logging calls

    Closes-Bug: 1856585
    Change-Id: I8bdc94539f4a6ce243c4e30efc07eed3bad1ce62
    Signed-off-by: Al Bailey <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marked for stx.2.0 & stx.3.0 given zuul can fail for those branches as well.

@Al, please cherry-pick the change to these branches at your earliest convenience.

tags: added: stx.zuul
tags: added: stx.2.0 stx.3.0 stx.update
Changed in starlingx:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to update (r/stx.3.0)

Fix proposed to branch: r/stx.3.0
Review: https://review.opendev.org/702942

Revision history for this message
Ghada Khalil (gkhalil) wrote :

After further discussion with Al Bailey, I'm removing the stx.2.0 tag as the repo in question doesn't exist in that release.

tags: removed: stx.2.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to update (r/stx.3.0)

Reviewed: https://review.opendev.org/702942
Committed: https://git.openstack.org/cgit/starlingx/update/commit/?id=ecd5a624e22d1a81d44c84bf1e0192dd3af3ad0d
Submitter: Zuul
Branch: r/stx.3.0

commit ecd5a624e22d1a81d44c84bf1e0192dd3af3ad0d
Author: Al Bailey <email address hidden>
Date: Mon Dec 16 08:48:14 2019 -0600

    Fix zuul tox flake8 failures from newer version of hacking

    A newer version of hacking was released which enables additional
    checks and is breaking flake8 and zuul.

    Hacking has now been clamped at 2.0.0 in test-requirements.txt
    Added the same for patch-alarm, although it was not failing.

    The new checks that are fixed are:
     H106: Don't put vim configuration in source files
     W605 invalid escape sequence
     F632 use ==/!= to compare str, bytes, and int literals
     F841 local variable is assigned to but never used

    The following flake8 extension check has been removed:
     H904 Delay string interpolations at logging calls

    Partial-Bug: 1856585
    Change-Id: I8bdc94539f4a6ce243c4e30efc07eed3bad1ce62
    Signed-off-by: Al Bailey <email address hidden>
    (cherry picked from commit 5d2da5d041028afa916149da660809ca6fc4fb73)

Ghada Khalil (gkhalil)
tags: added: in-r-stx30
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.