Page MenuHomePhabricator

operations/software repo: flake8 check
Closed, ResolvedPublic

Description

Yesterday flake8 released a new version (3.5.0) that now brings a newer pyflakes (1.6.0) that introduces a new feature:

Find Python files without extensions by their shebang

The new flake8 loads also some additional pycodestyle plugins by default:

pycodestyle.ambiguous_identifier
pycodestyle.bare_except

As a result, files that before were not checked might now be checked and with the additional check files that were passing might not pass anymore.

As a quick workaround we forced an older flake8 version in https://gerrit.wikimedia.org/r/#/c/386139/
but we need to go over those files and fix the issue or ignore the files if they are not internally developed and just imported from elsewhere.
The other approach could be to just disable the checks E722 and E741.

The list of offending files is:

checkhosts/HSources.py
checkhosts/HPassPlugins.py
clouseau/scripts/retention/do_audit_emails.py
clouseau/retention/local/locallogaudit.py
clouseau/retention/local/localexaminer.py
clouseau/retention/local/localfileaudit.py
clouseau/retention/utils/fileinfo.py
clouseau/retention/utils/config.py
clouseau/retention/utils/cliutils.py
clouseau/retention/utils/rule.py
clouseau/retention/utils/magic.py
clouseau/retention/utils/ignores.py
clouseau/retention/utils/fileutils.py
clouseau/retention/utils/ruleutils.py
clouseau/retention/remote/cli.py
clouseau/retention/remote/remotehomeauditor.py
clouseau/retention/remote/remotefileauditor.py
clouseau/retention/remote/remotelogauditor.py
clouseau/retention/remote/remoteexaminer.py
clouseau/retention/remote/remoteusercfgrabber.py

Event Timeline

Volans triaged this task as Medium priority.Oct 24 2017, 10:14 AM

Change 386139 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/software@master] s1,s2.hosts: Add db2088 to s1 and s2

https://gerrit.wikimedia.org/r/386139

Change 386139 merged by jenkins-bot:
[operations/software@master] s1,s2.hosts: Add db2088 to s1 and s2

https://gerrit.wikimedia.org/r/386139

Marostegui moved this task from Backlog to Blocked external/Not db team on the DBA board.