New issue
Advanced search Search tips

Issue 892899 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

luci-go unable to parse anaconda python versions

Reported by bhavayan...@gmail.com, Oct 6

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

Steps to reproduce the problem:
1. run download_from_google_storage.py
2. 
3.

What is the expected behavior?

What went wrong?
When installing v8 via GN using an Anaconda bundled python, luci-go throws an exception.
See: https://github.com/denoland/deno/issues/542

I believe this is a bug in luci-go since it's trying to parse the python version (major.minor.patch) from the command:

$ python --version

On my OSX system python this is "Python 2.7.12" but for Anaconda it's "Python 2.7.15 :: Continuum Analytics, Inc.".
Similarly on Windows for which the bug report came in from.
Hence there's an exception when parsed by luci-go: "non-canonical Python version string".

I believe the fix is to use platform.python_version instead of --version e.g.
$ python -c 'import platform; print(platform.python_version())'
2.7.15

Perhaps I am missing something, and please correct me if this is the wrong thread.
I am happy to attempt a patch if that's an acceptable/desired fix.

Thanks,
Bhavay

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 69.0.3497.100  Channel: stable
OS Version: OS X 10.13.3
Flash Version:
 
Labels: Needs-Triage-M69
Components: Infra>Platform
Cc: thakis@chromium.org
Cc: vamshi.kommuri@chromium.org
Labels: Triaged-ET TE-NeedsTriageHelp
Thanks for filing the issue!

From comment#0 it is understood that the issue seems to be triaged by installing v8 via GN using an Anaconda bundled python which is out of scope for us to triage it from our end, hence adding label "TE-NeedsTriageHelp" and requesting some one from respective team to have a look into this and help in further triaging it.
Labels: -TE-NeedsTriageHelp -Triaged-ET -Needs-Triage-M69
Owner: iannu...@google.com
Status: Assigned (was: Unconfirmed)
This was separately reported in the chromium-discuss ML.
Note that we don't recommend anaconda python; vpython is designed to solve a superset of the problem that anaconda python is designed to solve. I'll do some basic verification to see how well this will work after we solve the version parsing problem.
Ok, cool, looks like the version thing actually was the only needed change (anaconda seems to work correctly with the fixed vpython on my mac).
Project Member

Comment 8 by bugdroid1@chromium.org, Nov 30

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/646290c8765bcebd278998e8c6a5aa55ca903b12

commit 646290c8765bcebd278998e8c6a5aa55ca903b12
Author: Robert Iannucci <iannucci@chromium.org>
Date: Fri Nov 30 23:19:26 2018

[vpython] Use platform.python_version instead of --version.

This should allow vpython to parse the version string of nonstandard
python installations like anaconda.

R=tandrii@chromium.org, vadimsh@chromium.org

Bug: 892899
Change-Id: I6443178a6cd97ca9525cc13da26f170f9584dfca
Reviewed-on: https://chromium-review.googlesource.com/c/1357246
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>

[modify] https://crrev.com/646290c8765bcebd278998e8c6a5aa55ca903b12/vpython/application/probe.go
[modify] https://crrev.com/646290c8765bcebd278998e8c6a5aa55ca903b12/vpython/python/find.go
[modify] https://crrev.com/646290c8765bcebd278998e8c6a5aa55ca903b12/vpython/python/interpreter.go
[modify] https://crrev.com/646290c8765bcebd278998e8c6a5aa55ca903b12/vpython/python/interpreter_test.go

Sign in to add a comment