New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 758609 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Swarming's bot sys.path manipulation gets in the way for bot_config

Project Member Reported by mar...@chromium.org, Aug 24 2017

Issue description

When bot_config.py imports google.protobuf, it unconditionally gets the one embedded in the bot's version due to the bot's sys.path manipulation.

This causes problems because "from google" nows has a limited view of the packages in the bot, instead of whatever is installed in the running swarming bot environment.

https://chromium.googlesource.com/infra/luci/luci-py/+/master/appengine/swarming/server/bot_archive.py#163

I'm unsure how to fix that. Options:
#1 issue 638071 by simply having bot_config run out of process, thus has its own clean sys.path
#2 after bot's initialization but before importing bot_config, try to "revert" sys.path. The use of api.os_utilities and api.platforms.* needs to be kept but they can be preemptively imported which should work around the problem.
#3 workaround: have bot_config hack sys.path by itself

#1 is really the long term fix but it's non-trivial to implement. Since Michael is immediately affected by this I'd like to see if #2 is doable. Otherwise Michael shall do #3 for now. Any other idea?
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 24 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/4441dc304cc32b82f413e6109323e6d379e80155

commit 4441dc304cc32b82f413e6109323e6d379e80155
Author: Michael Jones <jonesmi@google.com>
Date: Thu Aug 24 16:42:57 2017

Project Member

Comment 2 by sheriffbot@chromium.org, Aug 27

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Pri-1 -Hotlist-Recharge-Cold Pri-2
Status: Available (was: Untriaged)

Sign in to add a comment