New issue
Advanced search Search tips

Issue 718175 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Fresh "gclient sync" in infra_internal repo failing.

Project Member Reported by akes...@chromium.org, May 3 2017

Issue description

Fresh "gclient sync" in infra_internal repo failing.

~/chrome_infra$ gclient sync
Syncing projects: 100% (49/49), done.                                                  

________ running '/usr/local/google/home/akeshet/venv/bin/python -u ./infra/bootstrap/remove_orphaned_pycs.py infra_internal' in '/usr/local/google/home/akeshet/chrome_infra'

________ running '/usr/local/google/home/akeshet/venv/bin/python -u ./infra_internal/bootstrap/bootstrap_internal.py infra_internal/ENV' in '/usr/local/google/home/akeshet/chrome_infra'
ERROR:__main__:Already activated environment!
Traceback (most recent call last):
  File "./infra_internal/bootstrap/bootstrap_internal.py", line 83, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./infra_internal/bootstrap/bootstrap_internal.py", line 79, in main
    return finish_internal_bootstrap(env_path)
  File "./infra_internal/bootstrap/bootstrap_internal.py", line 53, in finish_internal_bootstrap
    os.symlink(source, target)
OSError: [Errno 2] No such file or directory
Error: Command '/usr/local/google/home/akeshet/venv/bin/python -u ./infra_internal/bootstrap/bootstrap_internal.py infra_internal/ENV' returned non-zero exit status 1 in /usr/local/google/home/akeshet/chrome_infra

 

Comment 1 by mmoss@chromium.org, May 3 2017

Components: -Infra Infra>SDK

Comment 2 by dnj@google.com, May 3 2017

It looks to me like you're running the sync from within a VirtualEnv, which is explicitly disallowed by the script for some reason. I think this is the cause; easy solution would be to not run sync from a Venv. Harder might be to figure out why it cares and mitigate it.
Ah indeed, and now I remember that I was bit by this before.

Can the logging here be made more obvious, if this script is going to bother to care so much about already being in a virtualenv?

Comment 4 by d...@chromium.org, May 3 2017

Well, it does say, "ERROR:__main__:Already activated environment!"
Yeah, but that's pretty vague, obscured by a stackstrace, and accompanied by misleading text "No such file or directory"


Is it that unusual for developers to have their bash shell inside of their own python virtualenv? Several people on my team do this. Seems like tools shouldn't assume otherwise.

Comment 6 by d...@chromium.org, May 4 2017

Cc: iannucci@chromium.org
No idea what's usual. I didn't write the bootstrap, nor did I impose this restriction, so I'm not sure what the motivation or circumstances around it are. Personally this has annoyed me more than once, but I just deactivate. Agreed that it would be nice if it weren't a problem at all.

+iannucci@, who I believe wrote that. Can we remove this check, or step out of a VirtualEnv instead? It does kind of suck...
Cc: -iannucci@chromium.org iannu...@google.com

Sign in to add a comment