Looks like the error codes issued by python's http library might vary
between versions/distros. The code tries to reach an URL which is only valid
inside GCE and in the event of getting an error it assumes the user is
a non-googler.
At least in this case, we're seeing:
third_party.httplib2.socks.HTTPError: (404, 'No such domain')
Adding this exception type allows the function to work correctly.
Change-Id: I08d3656b25d9046f8b2fc0da2a2b7c7a698c1d92
Reviewed-on: https://chromium-review.googlesource.com/978212
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
file_list can be none if gclient runs with --nohooks.
Fix apply_patch_ref so that it doesn't try to update file_list when it is
None.
TBR=agable@chromium.org
Bug: 643346
Change-Id: If00547da004415edfe68196a44cbda753b4db017
Reviewed-on: https://chromium-review.googlesource.com/989279
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
This is useful for processing purely "local" DEPS files, with a command-line like:
gclient revinfo --output-json /tmp/out \
--spec 'solutions=[{"name": ".", "deps_file": "myDEPS", "url": None}]'
This is specifically to fix the "revinfo --output-json" case, but it
also cleans up some errors in the 'flattening' test cases. Note that
None values already work when using 'revinfo' with stdout output, it's
just the json output that complains.
BUG=825063
Change-Id: If5f69ba51cb9d0aa0f2b48a2f9b4ed8706b4c738
Reviewed-on: https://chromium-review.googlesource.com/989022
Commit-Queue: Michael Moss <mmoss@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Add support for more ways to express revisions in DEPS files, notably
"<origin-url>@<revision>" which is needed for src-internal.
Bug: 760633
Change-Id: I86724b9c077c6101a0c424d80460123d15533da8
Reviewed-on: https://chromium-review.googlesource.com/988493
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
cipd.bat is called from bootstrap/win/win_tools.bat. ERRORLEVEL in
win_tools.bat script should not mean return code of cipd.bat.
Bug: none
Change-Id: Ia425d5054fa9c1e1f84b4a10decc265669911646
Reviewed-on: https://chromium-review.googlesource.com/987954
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
The URLs for the dependencies in DEPS files might end in '.git', so
search for them too.
R=agable@chromium.org
Bug: 643346
Change-Id: I955c2750179b54fec26423f5123b3fa7eea38d96
Reviewed-on: https://chromium-review.googlesource.com/987630
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Add some other people to recipes/OWNERS
Change-Id: I554d1fd354e628d2e62629be7ce20e899364c4a9
Reviewed-on: https://chromium-review.googlesource.com/984972
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
This is a reland of 88f9c40e0c
We no longer need the vars dict to be declared before vars can be used.
This was causing problems because gclient flatten printed vars after deps,
breaking the above assumption.
Original change's description:
> gclient eval: Expand vars while parsing DEPS files
>
> Introduce a Parse function that takes care of expanding vars while parsing
> the DEPS file.
>
> It wraps Exec and exec calls, and supports deferring the expansion until
> later, so gclient flatten gets access to the unexpanded version.
>
> Bug: 821199
> Change-Id: I943b021cc4474c9cda67b3816b841dd8ada3f5b2
> Reviewed-on: https://chromium-review.googlesource.com/973749
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Bug: 821199
Change-Id: I583df23558f91871e1a2aa2574c20d35e54635f6
Reviewed-on: https://chromium-review.googlesource.com/981086
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
None of these repos has had a .DEPS.git file in over 3.5 years.
R=ehmaldonado
Bug: 824734
Change-Id: I768e247eee5a8eff9fcf8f1891497840909ec9fa
Reviewed-on: https://chromium-review.googlesource.com/982521
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
This will make it easier to programmatically determine where a flattened
entry originated, which is needed for recursively branching and
unpinning DEPS files.
BUG=825063
R=dpranke@google.com
Change-Id: Id280c0b0a95b8664602e0ec4513722fe4d6d1ebf
Reviewed-on: https://chromium-review.googlesource.com/977326
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Michael Moss <mmoss@chromium.org>
This adds a --enable-gclient-experiment flags that tells bot_update.py
to skip applying the patch, and instead forward the flags to gclient.
Bug: 643346
Change-Id: Ia4275a126e6adba54dfcc894d224c50c166db90e
Reviewed-on: https://chromium-review.googlesource.com/962938
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
This is a reland of 88f9c40e0c
Original change's description:
> gclient eval: Expand vars while parsing DEPS files
>
> Introduce a Parse function that takes care of expanding vars while parsing
> the DEPS file.
>
> It wraps Exec and exec calls, and supports deferring the expansion until
> later, so gclient flatten gets access to the unexpanded version.
>
> Bug: 821199
> Change-Id: I943b021cc4474c9cda67b3816b841dd8ada3f5b2
> Reviewed-on: https://chromium-review.googlesource.com/973749
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Bug: 821199
Change-Id: Ic04af0cae59abc01a0382e2de3497a91cf7e62fd
Reviewed-on: https://chromium-review.googlesource.com/978561
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
When specified it will skip any issues that were not modified in the specified
time period even if they are owned by the user.
R=tandrii@chromium.org
Change-Id: I230c8fa6cbc517c32edb8618a831a62ec6e45405
Reviewed-on: https://chromium-review.googlesource.com/978170
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
On buildbot (only), we don't trust PYTHONPATH, so we have set
VPYTHON_CLEAR_PYTHONPATH to make the first invocation of vpython in a
given chain of python invocations clear PYTHONPATH.
This has the unfortunate side-effect that python scripts that set
PYTHONPATH and then call into vpython (like presubmit) end up
having their PYTHONPATH modifications removed.
As a workaround (until I clean up PYTHONPATH in buildbot for real), fix
presubmit_canned_checks so that it clears VPYTHON_CLEAR_PYTHONPATH when it
adjusts PYTHONPATH.
R=charlie@chromium.org, nodir@chromium.org, vadimsh@chromium.org
Bug: 825290,825174
Change-Id: Ib5f73add1726fdf3c335d26fc0af76cfe3b747b2
Reviewed-on: https://chromium-review.googlesource.com/978632
Reviewed-by: Charlie Andrews <charliea@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
This reverts commit 88f9c40e0c.
Reason for revert: suspected to be causing update scripts failures and prevent gce bots from connecting
https://build.chromium.org/deprecated/tryserver.chromium.win/builders/win7_chromium_rel_ng/builds/128479/steps/update_scripts/logs/stdio
Original change's description:
> gclient eval: Expand vars while parsing DEPS files
>
> Introduce a Parse function that takes care of expanding vars while parsing
> the DEPS file.
>
> It wraps Exec and exec calls, and supports deferring the expansion until
> later, so gclient flatten gets access to the unexpanded version.
>
> Bug: 821199
> Change-Id: I943b021cc4474c9cda67b3816b841dd8ada3f5b2
> Reviewed-on: https://chromium-review.googlesource.com/973749
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
TBR=agable@chromium.org,dpranke@chromium.org,ehmaldonado@chromium.org
Change-Id: Ib9b84c13ef9b56735fd8f714b74a6601c61715e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 821199
Reviewed-on: https://chromium-review.googlesource.com/976721
Reviewed-by: Benjamin Pastene <bpastene@chromium.org>
Commit-Queue: Benjamin Pastene <bpastene@chromium.org>
Introduce a Parse function that takes care of expanding vars while parsing
the DEPS file.
It wraps Exec and exec calls, and supports deferring the expansion until
later, so gclient flatten gets access to the unexpanded version.
Bug: 821199
Change-Id: I943b021cc4474c9cda67b3816b841dd8ada3f5b2
Reviewed-on: https://chromium-review.googlesource.com/973749
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Currently in LUCI `git cl` is invoked on chromium_presubmit using vpython. This
means that it operates under the depot_tools .vpython environment (which is
blank).
Some features in presubmit_support allow invocation of python subprocesses, and
previously they would use `sys.executable` (especially on windows, but
occasionally on non-windows as well).
In non-vpython environments, this just picks up the system python and whatever
modules happen to be installed there. Some python unittests work around this on
non-windows systems by having a shebang line which explicitly invokes vpython.
This CL changes presubmit_support so that invocations of 'python', or executions
of '.py' scripts will always end up invoking vpython. In the best case, this will
pick up the invoked scripts' vpython environment. In the worst case, this will
invoke the script under an empty vpython environment (aka "stock python").
R=dpranke@chromium.org, jbudorick@chromium.org, tandrii@chromium.org, tikuta@chromium.org
Bug: 821669
Change-Id: I5d2d5dfd0364022d56833c2c8af4983553a29c7a
Reviewed-on: https://chromium-review.googlesource.com/961865
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Mimics bot_update's functionality to apply gerrit refs in gclient
via --gerrit-ref flags.
When the patch fails to apply, gclient sync will return exit code 2.
The idea is to move this logic from bot_update to gclient sync to
deal when patches for projects like ANGLE are tried on Chromium bots.
This way the patch is applied before recursively parsing and syncing
ANGLE’s DEPS.chromium file, which doesn't currently happen.
Bug: 643346
Change-Id: I7e2018b3c393a5ac9852b8c3611f906977eeeb18
Reviewed-on: https://chromium-review.googlesource.com/961605
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This reverts commit 33bf49538c.
Reason for revert: Done debugging.
Original change's description:
> Add debugging info when gclient deletes an old DEPS entry.
>
> To help figure out why it decided to do so.
>
> BUG=823586
>
> Change-Id: I93d7c9f7af6145ee0ebd9f5ad4483f27925e84d6
> Reviewed-on: https://chromium-review.googlesource.com/970082
> Commit-Queue: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
TBR=thestig@chromium.org,agable@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 823586
Change-Id: I476cbe423b849582f8684426653f0c08062e89e9
Reviewed-on: https://chromium-review.googlesource.com/974458
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Since we only support Var, and Var only does one thing, we hard code that
into the parser. Then, we don't need global_scope.
local_scope hasn't been needed for a while.
Bug: 760633
Change-Id: I21b171a8b71e7dcaf8e29c780ca88b9f46f368e8
Reviewed-on: https://chromium-review.googlesource.com/972611
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This is a reland of 7f4c905fc5
Original change's description:
> gclient: Add commands to edit dependencies and variables in DEPS
>
> Adds 'gclient setvar' and 'gclient setdep' commands to edit variables
> and dependencies in a DEPS file.
>
> Bug: 760633
> Change-Id: I6c0712cc079dbbbaee6541b7eda71f4b4813b77b
> Reviewed-on: https://chromium-review.googlesource.com/950405
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
Bug: 760633
Change-Id: Ia46c74d02e5cc3b67517dfa248f597cb3d98ef3d
Reviewed-on: https://chromium-review.googlesource.com/969457
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
gclient previously used a CIPD root per DEPS file. This didn't work
in cases in which a DEPS file wanted to specify a CIPD package outside
of its directory hierarchy, though, as is the case with buildspecs.
Bug: 755920
Change-Id: I0d6c3db567f17f9171c0feaaf9ed6bc64db22757
Reviewed-on: https://chromium-review.googlesource.com/955933
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
To help figure out why it decided to do so.
BUG=823586
Change-Id: I93d7c9f7af6145ee0ebd9f5ad4483f27925e84d6
Reviewed-on: https://chromium-review.googlesource.com/970082
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
This helps make it slightly easier to understand.
Change-Id: Iaf68409374be67e03d5708b409c1ad9229c68b1d
Reviewed-on: https://chromium-review.googlesource.com/970161
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
This reverts commit 7f4c905fc5.
Reason for revert:
When running "gclient sync" on a V8 checkout, it says:
File "/work/chrome/depot_tools/gclient.py", line 995, in run
self.ParseDepsFile()
File "/work/chrome/depot_tools/gclient.py", line 874, in ParseDepsFile
self._postprocess_deps(deps, rel_prefix), use_relative_paths)
File "/work/chrome/depot_tools/gclient.py", line 660, in _postprocess_deps
dval['condition'], self.condition)
TypeError: '_NodeDict' object does not support item assignment
on the recursive descent into third_party/android_tools/DEPS. Any chance that's related to https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/950405 ?
Original change's description:
> gclient: Add commands to edit dependencies and variables in DEPS
>
> Adds 'gclient setvar' and 'gclient setdep' commands to edit variables
> and dependencies in a DEPS file.
>
> Bug: 760633
> Change-Id: I6c0712cc079dbbbaee6541b7eda71f4b4813b77b
> Reviewed-on: https://chromium-review.googlesource.com/950405
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
TBR=agable@chromium.org,ehmaldonado@chromium.org
Change-Id: If58f6b15d31b19fc53294f1e41d26b4e684a2cf9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 760633
Reviewed-on: https://chromium-review.googlesource.com/969165
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Adds 'gclient setvar' and 'gclient setdep' commands to edit variables
and dependencies in a DEPS file.
Bug: 760633
Change-Id: I6c0712cc079dbbbaee6541b7eda71f4b4813b77b
Reviewed-on: https://chromium-review.googlesource.com/950405
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
This also adds support for V8 project on issue tracker.
R=tandrii@chromium.org
Change-Id: Ie90ae664573d36030267b639e8a55bc349cad872
Reviewed-on: https://chromium-review.googlesource.com/966623
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
This method hasn't been supported for a long time now (and besides, its
only for Rietveld).
R=agable@chromium.org, tandrii@chromium.org
Recipe-Manual-Change: infra
Change-Id: Ie6e63834dca67962db29f2cb407950ed85db55a7
Reviewed-on: https://chromium-review.googlesource.com/957832
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>