Closed
Bug 1436639
Opened 6 years ago
Closed 6 years ago
[flake8] Explicitly use version of python run with mach
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
(1 file)
I noticed the flake8 linter will use whatever the default 'python' is. For example, the machine reviewbot runs on has python 3 by default, so we're seeing 'undefined name basestring' errors. It looks like instead of: flake8 ... We need to run: python2.7 -mflake8 ... (Though using sys.executable instead of hardcoding anything)
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8949275 [details] Bug 1436639 - [lint] Make sure flake8 is run with same python as |mach lint| was, https://reviewboard.mozilla.org/r/218640/#review224496 looks good
Attachment #8949275 -
Flags: review?(jmaher) → review+
Assignee | ||
Comment 3•6 years ago
|
||
Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4ccea03775c6d951d7702c4411b5937947182a29
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c9d150401eea [lint] Make sure flake8 is run with same python as |mach lint| was, r=jmaher
Assignee | ||
Comment 5•6 years ago
|
||
Oops, I forgot that sys.executable doesn't point to the virtualenv python due to bug 1436777. Out of an abundance of caution I'm going to ask for this to be backed out, fix bug 1436777, and then re-land.
Comment 6•6 years ago
|
||
Backed out changeset c9d150401eea (bug 1436639) for potential local workflow issues r=ahal on a CLOSED TREE Push with issues: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=c9d150401eea734abb9815f237591475f3a98df4&filter-classifiedState=unclassified&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=runnable Backout push: https://hg.mozilla.org/integration/autoland/rev/5df904a4b6965791f5989f0c610872ea72486990
Flags: needinfo?(ahalberstadt)
Assignee | ||
Updated•6 years ago
|
Flags: needinfo?(ahalberstadt)
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c9d150401eea
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Assignee | ||
Updated•6 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 8•6 years ago
|
||
Backout for potential workflow issues: https://hg.mozilla.org/integration/autoland/rev/5df904a4b6965791f5989f0c610872ea72486990 https://hg.mozilla.org/mozilla-central/rev/5df904a4b696
status-firefox60:
fixed → ---
Target Milestone: mozilla60 → ---
Assignee | ||
Comment 9•6 years ago
|
||
Apparently modifying sys.executable can cause problems in some cases, so it's not something we want to do all the time. Luckily sys.prefix *does* get modified, so I can come up with a new patch that uses that instead. Enough has changed that this should get a re-review. Patch coming shortly.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 12•6 years ago
|
||
Comment on attachment 8949275 [details] Bug 1436639 - [lint] Make sure flake8 is run with same python as |mach lint| was, Sorry, the old patch you reviewed had a problem, and I think this warrants a re-review. Basically sys.executable doesn't get updated to the build system python environment, but sys.prefix does.
Attachment #8949275 -
Flags: review+ → review?(jmaher)
Comment 13•6 years ago
|
||
mozreview-review |
Comment on attachment 8949275 [details] Bug 1436639 - [lint] Make sure flake8 is run with same python as |mach lint| was, https://reviewboard.mozilla.org/r/218640/#review225628 this doesn't look scary
Attachment #8949275 -
Flags: review?(jmaher) → review+
Comment 14•6 years ago
|
||
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/365a91ab41e2 [lint] Make sure flake8 is run with same python as |mach lint| was, r=jmaher
Comment 15•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/365a91ab41e2
Status: REOPENED → RESOLVED
Closed: 6 years ago → 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•6 years ago
|
Product: Testing → Firefox Build System
Updated•5 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
•