Commit Graph

10 Commits (cc7ab346b0283abaf15f4632a4307b92bfa2f535)

Author SHA1 Message Date
Edward Lesmes 743e98ce87 gerrit_util: Fix checking if code-owners enabled on repo.
Change-Id: I5f518c22be4c5496f91202015c9caf18d0fa1be9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2778638
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
George Engelbrecht 888c0fe768 ReadHttpResponse: Handle 429s with retries and adjust retry count
We've had reliability issues with gerrit, primarily related to
429 status codes but also DDoS bans. The light DDoS bans can be
very short lived and we extend retries to handle this. Longer
term bans can take up to an hour to lift.

BUG=chromium:1071590
TEST=./gerrit_client_test.py

Change-Id: Iaf68c0d9cc7375aa58367ec0447d54a99f8ebf39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2153089
Commit-Queue: George Engelbrecht <engeg@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
5 years ago
Edward Lesmes 5a5537dc63 git-cl: Fix retrieving gitcookies path.
Decode the result of reading http.cookiefile from git config

Bug: 1066992
Change-Id: I1d4f2c8e54f717ef61ab4e630f3f66206c56047e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2132774
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Josip Sokcevic 464e9ff4f3 Add support for git_cl_tests on Windows platform
Change-Id: I9d3d084e7f48ab991db3db16873f030890ad72d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2108981
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago
Edward Lemur a3b6fd06f9 Reland "my_activity.py: Run using vpython3 by default."
Fix issue with gerrit_util.py and add tests.

Change-Id: Ie523ea59ddb93cf5c7fa35f3761310ce96747720
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2081092
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur a81450253f depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock
Change-Id: I3a188b34ae5f62649108afe08fe0e389a408c2ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1947933
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
5 years ago
Edward Lemur 4ba192e7a9 Reland "gerrit_util: Refactor ReadHttpResponse and add more tests."
This is a reland of 5bfa3ae88d

Replace cStringIO with StringIO and add tests.

Original change's description:
> gerrit_util: Refactor ReadHttpResponse and add more tests.
>
> Bug: 1016601
> Change-Id: Ie6afc5b1ea29888b0bf40bdb39b2b492d2d0494c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1880014
> Reviewed-by: Anthony Polito <apolito@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

Bug: 1016601
Change-Id: I0c83a83202169b6a1acc60bdf6f4cd00eac6e2a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1884461
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes 27eb01c355 Revert "gerrit_util: Refactor ReadHttpResponse and add more tests."
This reverts commit 5bfa3ae88d.

Reason for revert:
Fails when fetching status for cl 1708084 

Original change's description:
> gerrit_util: Refactor ReadHttpResponse and add more tests.
> 
> Bug: 1016601
> Change-Id: Ie6afc5b1ea29888b0bf40bdb39b2b492d2d0494c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1880014
> Reviewed-by: Anthony Polito <apolito@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=ehmaldonado@chromium.org,apolito@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1016601
Change-Id: I84bc378ed5f58e911e0900b1a5dbea70dc06ade1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1883677
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 5bfa3ae88d gerrit_util: Refactor ReadHttpResponse and add more tests.
Bug: 1016601
Change-Id: Ie6afc5b1ea29888b0bf40bdb39b2b492d2d0494c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1880014
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 67fccdf0c9 gerrit_util: Add tests for CookiesAuthenticator
Bug: 1016601
Change-Id: If049ec7d07ded5c357396fca8b3fcc5510a41871
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1871768
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago