Add the following two items to the licenses allow list as dependencies
of ScreenAI:
- LicenseRef-MicrosoftEnterpriseWindowsDriverKit
- LicenseRef-Public-Domain-Gutenberg
Bug: 378472917
Change-Id: I4f8786fb9880a61dcb379b57e0ead3d3ae9cff41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6529681
Commit-Queue: Jordan Brown <rop@google.com>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Jordan Brown <rop@google.com>
`dirmd` was not previously included in the recipes bundle, and couldn't
be used in recipes. Update `.gitattributes` to include it in the bundle.
Its dependencies should already be covered by `/*.bat`, `/*.sh`,
and `/cipd_manifest*` patterns.
Bug: 416037494
Change-Id: I320cb6ef9b5f1679c95c4f36ece534ddc75bcdde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6546185
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
When running `git cl format` with both --dry-run and --diff flags, some
formatters weren't returning exit code 2 when files needed formatting.
This made it impossible to detect formatting issues when using both
flags together.
Modified the following formatters to consistently return exit code 2
when files need formatting under --dry-run --diff flags:
- java
- rustfmt
- swift-format
- yapf
- gn
Also fixed incorrect usage of --presubmit flag in rustfmt and
swift-format. This flag is only intended to filter out formatters that
have dedicated presubmit checks, not to control their return codes.
Since CheckPatchFormatted in presubmit_canned_checks.py always passes
both --dry-run and --presubmit flags, the presubmit behavior remains
unchanged.
Change-Id: I4c26f22fc197c700a5c08d42b96ea4fc535ce293
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6509717
Commit-Queue: Aleksei Khoroshilov <akhoroshilov@brave.com>
Auto-Submit: Aleksei Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
This should make it easier for people unfamiliar with how the command
parsers work to follow along.
Bug: None
Change-Id: I6a6a2100cb881610a14b298303a3040e9ea5ffb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6508214
Reviewed-by: Scott Lee <ddoman@chromium.org>
Auto-Submit: Michael Cui <mlcui@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
This should be a bit more understandable, especially as `formatters` is
a list of tuples.
Bug: None
Change-Id: I6a6a2100e5169f1270bc3167a584274f67b80ae8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6508211
Commit-Queue: Michael Cui <mlcui@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
This reverts commit 550706e9f4.
Reason for revert: https://crrev.com/c/6497038 was landed to make a fix for the lock failure.
Bug: 41488725
Original change's description:
> Revert "git-cache: contains_revision returns False if sentient file exists"
>
> This reverts commit 5a267a66a6.
>
> Reason for revert: Causing gclient sync failures: https://ci.chromium.org/ui/p/chromeos/builders/staging/staging-amd64-generic-msan-fuzzer/b8716255278944170913
>
> Bug: 41488725
> Original change's description:
> > git-cache: contains_revision returns False if sentient file exists
> >
> > If git_cache.populate() gets interrupted midway, it can possibly leave
> > a git mirror in a state where only some commits are available. Cloning
> > such a repo results in an empty repository and causes subsequent git
> > checkout to fail.
> >
> > If the sentient file exists, it indicates that the bootstrapping
> > process was interrupted. This CL updates git_cache.contains_revision()
> > such that it returns False if the sentient file exists. Then,
> > the caller can call mirror.populate() to re-populate the repo/rev.
> >
> > Bug: 41488725
> > Change-Id: I24fd24e300f5a9f9349589496d6b5f3dacf71fd2
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6491733
> > Reviewed-by: Gavin Mak <gavinmak@google.com>
> > Commit-Queue: Scott Lee <ddoman@chromium.org>
> > Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
>
> Bug: 41488725
> Change-Id: I50f3ce5f0b6802db5969546d43a4fe1ab2dcf3c0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6497449
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Scott Lee <ddoman@chromium.org>
> Reviewed-by: Scott Lee <ddoman@chromium.org>
> Auto-Submit: Andrew Lamb <andrewlamb@chromium.org>
Bug: 41488725
Change-Id: Ia74db70be221f7cdf0960632644162bb3d39e5e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6507483
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
After crrev.com/c/6486489 landed, gclient sync failed randomly due to
lock failures. After investigation, it was concluded that the locks
are not immediately released after the lock file handler close so that
it fails to acquire the lock if gclient_scm.py attempts to lock it
immediately after mirror.populate().
In Linux, there is no guarantee that the file close will release
all the locks before processing the file description closure, unlike
the CloseHandle() do in Microsoft Windows.
This CL is to update the logic so that it releases the lock
before os.close().
Bug: 407795715
Change-Id: I0f58627d368922f27c0590dcea2e7fde4242ae17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6497038
Auto-Submit: Scott Lee <ddoman@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
To help maintain android_build_server_helper.py and revert any failing
changes to it.
R=sokcevic@google.com
Bug: 393136861
Change-Id: Ib4d111ffa03e21a3d733dec64141e7d00da573b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6499329
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
In a typical scenario we would not want to run the build server if
autoninja is run as part of a script (see https://crrev.com/c/6278629),
but specifically for benchmarking, we want to allow callers who
explicitly set AUTONINJA_STDOUT_NAME to still run the build server, as
these callers need the build server to run to properly time and
benchmark, even if all the output is discarded.
R=agrieve@chromium.org
Bug: 393136861
Change-Id: I97f556c2238eacc5cc8240287f4c6da0160efb71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6499328
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
This reverts commit 5a267a66a6.
Reason for revert: Causing gclient sync failures: https://ci.chromium.org/ui/p/chromeos/builders/staging/staging-amd64-generic-msan-fuzzer/b8716255278944170913
Bug: 41488725
Original change's description:
> git-cache: contains_revision returns False if sentient file exists
>
> If git_cache.populate() gets interrupted midway, it can possibly leave
> a git mirror in a state where only some commits are available. Cloning
> such a repo results in an empty repository and causes subsequent git
> checkout to fail.
>
> If the sentient file exists, it indicates that the bootstrapping
> process was interrupted. This CL updates git_cache.contains_revision()
> such that it returns False if the sentient file exists. Then,
> the caller can call mirror.populate() to re-populate the repo/rev.
>
> Bug: 41488725
> Change-Id: I24fd24e300f5a9f9349589496d6b5f3dacf71fd2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6491733
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Scott Lee <ddoman@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Bug: 41488725
Change-Id: I50f3ce5f0b6802db5969546d43a4fe1ab2dcf3c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6497449
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Auto-Submit: Andrew Lamb <andrewlamb@chromium.org>
If git_cache.populate() gets interrupted midway, it can possibly leave
a git mirror in a state where only some commits are available. Cloning
such a repo results in an empty repository and causes subsequent git
checkout to fail.
If the sentient file exists, it indicates that the bootstrapping
process was interrupted. This CL updates git_cache.contains_revision()
such that it returns False if the sentient file exists. Then,
the caller can call mirror.populate() to re-populate the repo/rev.
Bug: 41488725
Change-Id: I24fd24e300f5a9f9349589496d6b5f3dacf71fd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6491733
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
The long_text includes stack_trace[1] which is very verbose and not
providing much value. If user really need stacktrace or long_text,
they can access it by going to the build page.
[1]: https://screenshot.googleplex.com/5dcPwjNrtizEVBK
Change-Id: I2c5a5c2703875906f4ccaa1c8b1e83fe3a2f6115
Bug: 404837554
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6486346
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
The current gsutil download code silently fails when the connection
drops mid-download, as read() returns an empty buffer instead of raising
an exception. This may lead to errors such as "zipfile.BadZipFile: File
is not a zip file" on Chromium sync with freshly-bootstrapped
depot_tools when downloading gcs deps.
This change solves this by hardening the process:
- Use retry mechanism with exponential backoff for gsutil download
- Switch to urlretrieve, which looks at Content-Length
- Compare MD5 of the downloaded file with the value from API
- Move exponential_backoff_retry from git_cache.py to gclient_utils.py
Change-Id: I25242948399e01373eb2afd9352e5c78a889051d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6485485
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Aleksei Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Chrome's first use of appending location data to a PRESUBMIT.py check
made Chrome's "all" PRESUBMIT.py builders fail:
https://ci.chromium.org/ui/p/chromium/builders/ci/linux-presubmit
That's presumably because they're trying to upload findings in a
context without a gerrit CL. This should hopefully fix that.
Bug: 413427415
Change-Id: Ib2cab5d2668fa4562e6b2f365811983c93d0591e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6489610
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
The current implementation relies on the current working directory,
when it traverses the file tree to find the nearest OWNERS. It also
causes an infinite loop when it cannot find any OWNERS.
This CL changes the implementation so that it works
no matter what the cwd is.
Bug: 412904761
Change-Id: Ic4e25217aa64bd2eb6514ccdd486fe3b57a82312
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6484531
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>