Tox linters job randomly failing bashate in sysinv

Bug #1890287 reported by Al Bailey on 2020-08-04
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Al Bailey

Bug Description

Brief Description
When code is submitted for review in stx/config it may randomly fail zuul.
This is because bashate only aborts on some errors, or returns the last files success/failure for others.
Since bashate can process the files in random order, if the last file is a failure, zuul will fail, and if it is success, it returns success.

(blocked submissions but there is a workaround)

Steps to Reproduce
Submit a code change in sysinv. It may randomly fail zuul.

Expected Behavior
Zuul should pass linters job consistently

Actual Behavior
Zuul is failing the linters job and therefore the review cannot merge.

Seen Once

System Configuration

Branch/Pull Time/Commit
master Aug 4, 2020

Last Pass
Anytime. The bad file merged 12 days ago, but zuul could randomly pass anyways.


Running bashate on /home/zuul/src/
Running bashate on /home/zuul/src/
Running bashate on /home/zuul/src/
/home/zuul/src/ E004 File did not end with a newline
1 bashate error(s) found
ERROR: InvocationError for command /bin/bash -c 'find /home/zuul/src/ -not \( -type d -name .?\* -prune \) -type f -not -name \*~ -not -name \*.md -name \*.sh -print0 | xargs -0 bashate -v -e E* -i E006,E010' (exited with code 123)

Test Activity
Submission to Zuul

Use 'recheck' and the next time it runs, the job may process the files in a different order and succeed

Ghada Khalil (gkhalil) on 2020-08-04
tags: added: stx.zuul
Changed in starlingx:
assignee: nobody → Al Bailey (albailey1974)
tags: added: stx.5.0
Changed in starlingx:
importance: Undecided → Medium

Submitter: Zuul
Branch: master

commit fc8b109ef0598534f1f137ee3d259cef396bfa03
Author: albailey <email address hidden>
Date: Tue Aug 4 08:45:26 2020 -0500

    Fix a random tox linters failure in bashate

    There was a file that was missing a newline which would
    cause bashate to fail.
    However the bashate command was being run as a list of inputs
    rather than as individual files, so that error was being ignored
    unless that bad file was the last file processed.
    This submission fixes the file, and ensures that tox linters
    job will fail is any file has an error, regardless of what is
    processed afterwards.

    Change-Id: I7587b7017b6855aad63dfaeaea5ecca0bcfc21ea
    Closes-Bug: 1890287
    Signed-off-by: albailey <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers