0

Invoke 'cros chrome-sdk' in gclient hooks via vpython3

This gets invoked outside of a cros chroot. And since it doesn't
specify which python to use today, it uses the system one. (ie: /usr/bin/python3)

It appears that recently the system python3 on some workstations
got upgraded. And the upgrade led to some mysterious errors in
simple chrome (see b/172226630#comment41 for details).

By invoking `cros chrome-sdk` via vpython, we use a version of python
that we more closely control, and so won't be affected by rollouts
we're not involved with. Additionally, using vpython's venv helps avoid
the original error that the rollout caused by using our own crcmod lib.

Bug: b/172226630
Change-Id: I0721843ab1294ad30750ae1122cb54b7a699a5d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4123032
Reviewed-by: Sven Zheng <svenzheng@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1089345}
This commit is contained in:
Ben Pastene
2023-01-05 18:28:03 +00:00
committed by Chromium LUCI CQ
parent 7ed9e0e11a
commit d8ca3222af
2 changed files with 9 additions and 0 deletions

@ -260,6 +260,7 @@ wheel: <
# Used by:
# //third_party/blink/tools/wpt_upload.py
# //third_party/chromite/bin/cros chrome-sdk
wheel: <
name: "infra/python/wheels/crcmod/${vpython_platform}"
version: "version:1.7.chromium.3"

8
DEPS

@ -4700,6 +4700,7 @@ hooks = [
'pattern': '.',
'condition': 'checkout_simplechrome_with_vms and not checkout_src_internal',
'action': [
'vpython3',
'src/third_party/chromite/bin/cros',
'chrome-sdk',
'--fallback-versions=20',
@ -4718,6 +4719,7 @@ hooks = [
'pattern': '.',
'condition': 'checkout_simplechrome and not checkout_src_internal',
'action': [
'vpython3',
'src/third_party/chromite/bin/cros',
'chrome-sdk',
'--fallback-versions=20',
@ -4735,6 +4737,7 @@ hooks = [
'pattern': '.',
'condition': 'checkout_simplechrome and checkout_src_internal',
'action': [
'vpython3',
'src/third_party/chromite/bin/cros',
'chrome-sdk',
'--fallback-versions=20',
@ -4751,6 +4754,7 @@ hooks = [
'pattern': '.',
'condition': 'checkout_simplechrome_with_vms and checkout_src_internal',
'action': [
'vpython3',
'src/third_party/chromite/bin/cros',
'chrome-sdk',
'--fallback-versions=20',
@ -4770,6 +4774,7 @@ hooks = [
'pattern': '.',
'condition': 'checkout_simplechrome_with_vms and not checkout_src_internal and checkout_lacros_sdk',
'action': [
'vpython3',
'src/third_party/chromite/bin/cros',
'chrome-sdk',
'--fallback-versions=20',
@ -4789,6 +4794,7 @@ hooks = [
'pattern': '.',
'condition': 'checkout_simplechrome and not checkout_src_internal and checkout_lacros_sdk',
'action': [
'vpython3',
'src/third_party/chromite/bin/cros',
'chrome-sdk',
'--fallback-versions=20',
@ -4808,6 +4814,7 @@ hooks = [
'pattern': '.',
'condition': 'checkout_simplechrome_with_vms and checkout_src_internal and checkout_lacros_sdk',
'action': [
'vpython3',
'src/third_party/chromite/bin/cros',
'chrome-sdk',
'--fallback-versions=20',
@ -4826,6 +4833,7 @@ hooks = [
'pattern': '.',
'condition': 'checkout_simplechrome and checkout_src_internal and checkout_lacros_sdk',
'action': [
'vpython3',
'src/third_party/chromite/bin/cros',
'chrome-sdk',
'--fallback-versions=20',