Closed
Bug 1434430
Opened 7 years ago
Closed 7 years ago
[flake8] Reviewbot uses different version of flake8 than the one pinned in-tree
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement, P1)
Tracking
(firefox60 fixed)
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: ahal, Assigned: ahal)
References
Details
Attachments
(3 files)
I'm filing a bug rather than a reviewbot issue because we should make however this happens impossible from the in-tree side.
In https://bugzilla.mozilla.org/show_bug.cgi?id=1429457#c5 I discovered it was possible for |mach lint| to use a different version of flake8 than the one we pin in flake8_requirements.txt:
https://searchfox.org/mozilla-central/source/tools/lint/python/flake8_requirements.txt
I didn't think this was possible, as we activate the build system virtualenv, but I guess it's not guaranteed. We should figure out how the reviewbot sets things up and prevent it and others from using a newer version of flake8.
As a short term fix, it's probably best to upgrade the in-tree flake8 to v3.5 to match reviewbot.
Assignee | ||
Comment 1•7 years ago
|
||
Oh, looks like if reviewbot has the FLAKE8 binary set, it could use a different version:
https://searchfox.org/mozilla-central/source/tools/lint/python/flake8.py#98
We should definitely remove that either way.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8947213 -
Flags: review?(rwood)
Attachment #8947214 -
Flags: review?(rwood)
Attachment #8947215 -
Flags: review?(rwood)
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8947213 [details]
Bug 1434430 - [flake8] Drop support for the FLAKE8 environment variable
https://reviewboard.mozilla.org/r/216970/#review223392
Attachment #8947213 -
Flags: review?(rwood) → review+
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8947214 [details]
Bug 1434430 - [flake8] Fix blank 'except' statements
https://reviewboard.mozilla.org/r/216972/#review223404
LGTM
Attachment #8947214 -
Flags: review?(rwood) → review+
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8947215 [details]
Bug 1434430 - [flake8] Upgrade version of flake8 used by |mach lint| to 3.5.0
https://reviewboard.mozilla.org/r/216974/#review223406
Attachment #8947215 -
Flags: review?(rwood) → review+
Comment 8•7 years ago
|
||
hg error in cmd: hg push -r tip ssh://hg.mozilla.org/integration/autoland: pushing to ssh://hg.mozilla.org/integration/autoland
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 3 changesets with 65 changes to 65 files
remote:
remote:
remote: ************************** ERROR ****************************
remote: Rev 9ba97262df76 uses try syntax. (Did you mean to push to Try instead?)
remote: Andrew Halberstadt <ahalberstadt@mozilla.com>
remote: Bug 1434430 - [flake8] Fix blank 'except' statements r=rwood
remote:
remote: This is a new issue that gets linted with flake8 3.5.0. Basically you should
remote: never use:
remote:
remote: try:
remote: ... stuff ...
remote: except:
remote: ... stuff ...
remote:
remote: This will catch all exceptions, including KeyboardInterrupt and SystemExit
remote: (which is likely not intended). If a catch all is needed, use
remote: `except: Exception`. If you *really* mean to also catch KeyboardInterrupt et
remote: al, use `except: BaseException`.
remote:
remote: Of course, being specific is often better than a catch all.
remote:
remote: MozReview-Commit-ID: FKx80MLO4RN
remote: *************************************************************
remote:
remote:
remote: transaction abort!
remote: rollback completed
remote: pretxnchangegroup.c_commitmessage hook failed
abort: push failed on remote
Assignee | ||
Comment 9•7 years ago
|
||
Oh, lol. The push hook thought that the try: from my python code example was supposed to be try syntax.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 13•7 years ago
|
||
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6bd62fcb07d3
[flake8] Drop support for the FLAKE8 environment variable r=rwood
https://hg.mozilla.org/integration/autoland/rev/2d0766c3e7c9
[flake8] Fix blank 'except' statements r=rwood
https://hg.mozilla.org/integration/autoland/rev/0adf57868338
[flake8] Upgrade version of flake8 used by |mach lint| to 3.5.0 r=rwood
Assignee | ||
Updated•7 years ago
|
Priority: -- → P1
Comment 14•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6bd62fcb07d3
https://hg.mozilla.org/mozilla-central/rev/2d0766c3e7c9
https://hg.mozilla.org/mozilla-central/rev/0adf57868338
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•7 years ago
|
Product: Testing → Firefox Build System
Updated•6 years ago
|
Version: Version 3 → 3 Branch
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•