Commit Graph

27 Commits (a5f17dd7b3cef04e687c33b69b033b2fecf0919f)

Author SHA1 Message Date
Gavin Mak a5f17dd7b3 Revert "Drop py2 support in recipe modules"
This reverts commit 5819c303f0.

Reason for revert: breaking dart builds

Original change's description:
> Drop py2 support in recipe modules
>
> python3 is the only supported version of python in depot_tools.
>
> Bug: 1475402
> Change-Id: I479de09a0c34b438aced35e4ced58a5972108132
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4808518
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: 1475402
Change-Id: I0fef7581835bb25ea7e4f22303eef11e72df9536
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4811596
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Gavin Mak 5819c303f0 Drop py2 support in recipe modules
python3 is the only supported version of python in depot_tools.

Bug: 1475402
Change-Id: I479de09a0c34b438aced35e4ced58a5972108132
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4808518
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2 years ago
Garrett Beaty 3d1a52e074 Remove recipe warnings due to python module.
The python module is deprecated in favor of using the step module with
an explicit python binary. Switching the code to use the step module and
remove DEPS on recipe_engine/python removes warnings when running recipe
tests in the repo.

Change-Id: If3c9d5d6aff5aab69898b535399accbef92f5c0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3880624
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
3 years ago
Andrew Grieve c49a7334d3 Add gerrit_change_review_url to tryserver/api.py
This came up as a thing I wanted to use here:
https://chromium-review.googlesource.com/c/chromium/tools/build/+/3449158

Bug: None
Change-Id: I631c66a1b81bddedaf0e812a590a8e05db958fa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3449844
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
3 years ago
Garrett Beaty dd93ebcac8 Add method for setting test data for get_files_affected_by_patch.
The get_files_affected_by_patch method on the test API will return a
TestData object that determines the output of the "git diff" call. a
Test was added specifically for the get_files_affected_by_patch API
method to ensure that the test API operates as expected.

Change-Id: Ia1846700461757a72ed518894a5a38a8ca54fcc9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3422006
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
3 years ago
Gavin Mak 535213f8cf Add PYTHON_VERSION_COMPATIBILITY to tryserver recipe module
Bug: 1227140
Change-Id: I67769aaf544ee43e58c7e0499d7b2a2a258d8fe9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3116776
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
4 years ago
Josip Sokcevic ce332a47a9 Use main as default branch in all recipes
Recipe-Manual-Change: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: I89008bc07b1c3de13d9c6dd64e723fe6dc8d01d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3015262
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
4 years ago
Stephanie Kim b992c4253f tryserver getter for CL repo host/project
Allows for quick retrieval of host and project without having to parse
gerrit_change_repo_url or hard coding.

Bug:
Change-Id: I43f6e0bfda4b54d742bfa7ea20ee781162796608
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2971110
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Greg Guterman e8b56fbf3c Fix get_footer None AttributeError
R: nodir@chromium.org
Change-Id: Ib052dabd7a92b3643f7f2fa3cc7933eb7a60dd9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2753457
Auto-Submit: Gregory Guterman <guterman@google.com>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
Nodir Turakulov 260eb0f662 [tryserver] Report affected files via property
To enable aggregate analysis on changed files in BigQuery, conditionally
report them via an output property.

This CL causes a non-trivial roll only because of the sorting.

Recipe-Nontrivial-Roll: build
Bug: 1151655
Change-Id: Ie7a6c622196143c1aef07af9a9a356fb4202ea56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2553349
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
4 years ago
Xinan Lin da73999f79 Make bot_update and tryserver module not crash for multiple changes
Currently bot_update and tryserver crashes at initialization step if
the input contains multiple gerrit changes. This is not friendly for
CrOS CLs, e.g. crrev.com/c/2536761.

This CL moves the “crash” out of initialization, thus the consumer
of these modules could control which gerrit change to pass to bot_update
and tryserver.

This CL does NOT enable the modules here to support multiple patchset,
but allows consumers to choose one.

Bug:1146487
Change-Id: Iec46a8041189912e34da9bc5e8ff4611123ec9e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2528670
Commit-Queue: Xinan Lin <linxinan@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
5 years ago
Andrii Shyshkalov e2aee98036 remove dead code.
R=smut

Change-Id: Ie919e4f90378ecdeb6a2e015cb313f044aa2d214
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2080206
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: smut <smut@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Andrii Shyshkalov 8ac1b46551 Delete tryserver.set_do_not_retry.
Use cq.set_do_not_retry instead.
See https://crrev.com/c/2040838

R=yiwzhang

Change-Id: I110c398e794c19df30c42aa77e88a5da5d33276d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2040709
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
5 years ago
Andrii Shyshkalov e868546ad8 tryserver: delete failure_hash support.
It was used by CQ a while ago, but since 2019, it had little if any
effect, and has since been deleted from CQ entirely.

Companion CL
https://chromium-review.googlesource.com/c/chromium/tools/build/+/2040484

R=jbudorick

Change-Id: Ia570bce4886fa60a3bf16e88919f3a230d48fbc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2040699
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
5 years ago
Andrii Shyshkalov 2025b98401 recipes: update to stop using legacy properties.
The only exception is 'revision' of gclient's weird RevisionResolver,
which will be tackled in https://crbug.com/949334

R=ehmaldonado

Bug: 877161
Change-Id: Ic65a2d13578802cf093f2a1cfb4002fe97509b3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1818973
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
6 years ago
Erik Staab 10e07dd38b [depot_tools] Add new tryjob failure types TEST_TIMEOUT and TEST_EXPIRED.
Bug: 850653
Change-Id: I3bbf0c423076fd42d5fb8f5cae193ffa8b1d63a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1699030
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
6 years ago
erikchen 016601cc21 Add mechanism for telling CQ to avoid retrying builds.
The function can be called by chromium_test to set a property 'do_not_retry'
which will be propagated into buildbucket output.

Change-Id: I32d8ea925b7cb98d9b25d24226686e116c17801c
Bug: 910193
Reviewed-on: https://chromium-review.googlesource.com/c/1351542
Commit-Queue: Erik Chen <erikchen@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
6 years ago
Nodir Turakulov 53e28ecb9f [gclient] Remove calculate_patch_root
It is not used. get_gerrit_patch_root is used instead.

Bug: 694348
Change-Id: Icc717e38cbcaa8050c8ce8a364202b81d7f9cf2c
Reviewed-on: https://chromium-review.googlesource.com/1231282
Auto-Submit: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
7 years ago
Nodir Turakulov ddda0b5b8a Fetch current Gerrit CL info in tryserver
Add tryserver.api.gerrit_change_info that returns detailed info about the
current Gerrit CL. It makes a Gerrit RPC in the background on the first read.
This step will be present in all tryjobs.

This mechanism can be used for extra details about the current CL.
This CL starts to use this in bot_update for gerrit_ref, and stops using
patch_ref property, and also update bot_update to use when the destination
branch is needed.

Also this CL removes no longer used properties in bot_update,
namely most of patch_* properties.

build.git manual roll: https://chromium-review.googlesource.com/c/chromium/tools/build/+/1217626

Recipe-Manual-Change: build
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: release_scripts
R=tandrii@chromium.org
Bug: 694348
Change-Id: I945d061b74278c3d1d227578abe16a64cdaca647
Reviewed-on: https://chromium-review.googlesource.com/1213557
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Nodir Turakulov bf6feefa8a Update tryserver to use buildbucket.build.input.gerrit_changes
tryserver module's purpose is to provide high level API for patches.
Update it to use buildbucket.build.input.gerrit_changes[0].
Add helper properties for gerrit repo URL and gerrit ref.

This will be used by both bot_update and gclient.

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

Bug: 694348
Change-Id: I7eb416e75737310404c4354fa680fd3499eddaa7
Reviewed-on: https://chromium-review.googlesource.com/1211653
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Aaron Gable de8ce79f79 Remove rietveld support from tryserver recipe module
Bug: 770408
Recipe-Nontrivial-Roll: build
Change-Id: Icafd4bd11009975c40e53d93901589c07ecd738e
Reviewed-on: https://chromium-review.googlesource.com/707723
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Aaron Gable aac382b3b6 Remove rietveld-based tests from tryserver recipe module
This introduces a pragma: no cover, which is unfortunate.
But this is a prerequisite for removing rietveld support
entirely from the recipe engine without having to do
manual recipe rolls. The entire block of uncovered code
will be removed shortly.

Bug: 770408
Change-Id: I37319f3ae70413adcda655c443325bccffe695d8
Reviewed-on: https://chromium-review.googlesource.com/834455
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
7 years ago
Daniel Jacques 31f3e63cbc Revert "Revert "[tryserver] Remove unused methods.""
This reverts commit cc27ecb005.

Reason for revert: Published this method downstream to internal repo.

Original change's description:
> Revert "[tryserver] Remove unused methods."
> 
> This reverts commit 133ac1ab8d.
> 
> Reason for revert: Turns out these are used by internal recipes.
> 
> Original change's description:
> > [tryserver] Remove unused methods.
> > 
> > R=​agable@chromium.org, dnj@chromium.org, hinoka@chromium.org
> > 
> > Bug:
> > Change-Id: I82a11f31c8c1c4c4a2b461090e5aee637f8821c2
> > Reviewed-on: https://chromium-review.googlesource.com/569019
> > Reviewed-by: Nodir Turakulov <nodir@chromium.org>
> > Reviewed-by: Aaron Gable <agable@chromium.org>
> > Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
> 
> TBR=iannucci@chromium.org,hinoka@chromium.org,agable@chromium.org,dnj@chromium.org,nodir@chromium.org
> 
> Change-Id: Ib1d4192520a36f649f1f9b31e2928027667311d4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/570988
> Reviewed-by: Daniel Jacques <dnj@chromium.org>
> Commit-Queue: Daniel Jacques <dnj@chromium.org>

TBR=iannucci@chromium.org,hinoka@chromium.org,agable@chromium.org,dnj@chromium.org,nodir@chromium.org

Change-Id: Id7ac3555d40162e4204ceac5e96c2e3864c67aba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/570781
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
Daniel Jacques cc27ecb005 Revert "[tryserver] Remove unused methods."
This reverts commit 133ac1ab8d.

Reason for revert: Turns out these are used by internal recipes.

Original change's description:
> [tryserver] Remove unused methods.
> 
> R=​agable@chromium.org, dnj@chromium.org, hinoka@chromium.org
> 
> Bug:
> Change-Id: I82a11f31c8c1c4c4a2b461090e5aee637f8821c2
> Reviewed-on: https://chromium-review.googlesource.com/569019
> Reviewed-by: Nodir Turakulov <nodir@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Commit-Queue: Robbie Iannucci <iannucci@chromium.org>

TBR=iannucci@chromium.org,hinoka@chromium.org,agable@chromium.org,dnj@chromium.org,nodir@chromium.org

Change-Id: Ib1d4192520a36f649f1f9b31e2928027667311d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/570988
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
Robert Iannucci 133ac1ab8d [tryserver] Remove unused methods.
R=agable@chromium.org, dnj@chromium.org, hinoka@chromium.org

Bug:
Change-Id: I82a11f31c8c1c4c4a2b461090e5aee637f8821c2
Reviewed-on: https://chromium-review.googlesource.com/569019
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Paweł Hajdan, Jr 24025d3e71 tryserver: add support for gerrit footers
Bug: 644609
Change-Id: Ied7439d688b89f90b9705968927521b5060c5fb4
Reviewed-on: https://chromium-review.googlesource.com/565564
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Robert Iannucci 56038f517d rename example.py -> examples/full.py for all modules
R=dnj@chromium.org, nodir@chromium.org, phajdan.jr@chromium.org

Bug:
Change-Id: I47d8f9311b6ee71583fb989888a1e4d28b5495df
Reviewed-on: https://chromium-review.googlesource.com/520731
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
8 years ago