- 06 May, 2019 1 commit
-
-
Raul Tambre authored
Ran "2to3 -w -n -f print ./" and manually added imports. Ran "^\s*print " and "\s+print " to find batch/shell scripts, comments and the like with embedded code, and updated them manually. Also manually added imports to files, which used print as a function, but were missing the import. The scripts still work with Python 2. There are no intended behaviour changes. Bug: 942522 Change-Id: Id777e4d4df4adcdfdab1b18bde89f235ef491b9f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1595684Reviewed-by:
Dirk Pranke <dpranke@chromium.org> Commit-Queue: Dirk Pranke <dpranke@chromium.org> Auto-Submit: Raul Tambre <raul@tambre.ee>
-
- 12 Feb, 2018 1 commit
-
-
Aaron Gable authored
Although we want to prevent dfgs from untar'ing files to a parent or sibling of its target directory, normal files that just happen to have ".." in their name (i.e. not preceding a path separator) are okay. R=hinoka Bug: 807286 Change-Id: Ibdc2c3615c4778ef66abceb532a4f671fbdab8ef Reviewed-on: https://chromium-review.googlesource.com/912430Reviewed-by:
Ryan Tseng <hinoka@chromium.org> Commit-Queue: Aaron Gable <agable@chromium.org>
-
- 02 Feb, 2018 1 commit
-
-
Michael Achenbach authored
The first call to gsutil causes a network call and makes the download script slow also in the most optimal cases. This CL refactors the download script and moves the first gsutil call after checking locally if sha1s match. 1) This turns the input acquisition into a generator and buffers the files and sha1s in a list before multithreading. 2) This sequentially checks the sha1s and files and bails out early if all match. In Chrome-land, we usually call this script with only one file. There are some cases with around 4. This could also be parallelized if the need arises. 3) The initial gsutil check, which ensures gsutil is updated, is moved right in front of the multithreaded downloads. The performance of one call to download_from_google_storage for an existing 500MB file is 2.3s before this CL and 1.2s after (most of the remaining time left is spent for making sha1sum). Example for full gclient runhooks (when everything is up-to-date): Chromium: 32s before, 12s after V8: 12s before, 3s after Bug: 776311 Change-Id: Ia7715a6af84b1b336455ea88494d399bdb050317 Reviewed-on: https://chromium-review.googlesource.com/897562 Commit-Queue: Michael Achenbach <machenbach@chromium.org> Reviewed-by:
Sergiy Byelozyorov <sergiyb@chromium.org> Reviewed-by:
Ryan Tseng <hinoka@chromium.org>
-
- 03 Nov, 2017 1 commit
-
-
Raphael Kubo da Costa authored
In Python land, the method run once a test method runs is called tearDown(), not cleanUp(). In other words, the existing methods were never called and we were always leaving lots of "gstools_test*" directories in /tmp. Change-Id: Ib1de95c7ba92922b98571780f389237de0dcb253 Reviewed-on: https://chromium-review.googlesource.com/753383 Commit-Queue: Aaron Gable <agable@chromium.org> Reviewed-by:
Aaron Gable <agable@chromium.org>
-
- 23 Oct, 2017 1 commit
-
-
Ryan Tseng authored
the tests haven't been ran by presumbit for a while because of the plural in the filename. At some point some post "gsutil cp" file checking happened, which broke the tests. This adds a callback to the fake gsutil cp so that the expect file is copied over. This also removes "gsutil version" checking from gsutil.py and just assume that if the file exists, then it's good, which should shave about 1-2s off of each gsutil.py call. Bug: 772740,776311 Change-Id: I4fef62cfd46a849afed1f095dd6a96069376d13d Reviewed-on: https://chromium-review.googlesource.com/707758 Commit-Queue: Ryan Tseng <hinoka@chromium.org> Reviewed-by:
Robbie Iannucci <iannucci@chromium.org> Reviewed-by:
Aaron Gable <agable@chromium.org>
-
- 10 Oct, 2017 1 commit
-
-
Nico Weber authored
Apparently several scripts in other repros call this function directly. Bug: 772741 Change-Id: I486483e44a072af6cf8c75373a2da6ef5469fc2c TBR=dpranke Reviewed-on: https://chromium-review.googlesource.com/707937 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by:
Nico Weber <thakis@chromium.org>
-
- 09 Oct, 2017 1 commit
-
-
Nico Weber authored
The script prints a bunch of stuff behind `if verbose` checks, but then "verbose" was turned on by default in https://bugs.chromium.org/p/chromium/issues/detail?id=504452 I think the wrong lesson was learned from that bug – it sounds like the problem was that an error message was printed only if verbose was set. After this change, the script is silent when it does nothing, and prints something if something happens. (Arguably, it still prints too much in the case where it successfully downloads something.) This is part of a few changes to make `gclient runhooks` less noisy. Bug: 772741,504452 Change-Id: I5823c296abe97611ba4411bab2743673b10dca4b Reviewed-on: https://chromium-review.googlesource.com/706915 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by:
Dirk Pranke <dpranke@chromium.org> Reviewed-by:
Ryan Tseng <hinoka@chromium.org>
-
- 16 Dec, 2016 1 commit
-
-
Quinten Yearsley authored
This affects a bunch of files, but only changes comments, and shouldn't make any difference to behavior. The purpose is to slightly improve readability of pylint disable comments. Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11 Reviewed-on: https://chromium-review.googlesource.com/420412Reviewed-by:
Aaron Gable <agable@chromium.org> Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
-
- 18 Aug, 2015 1 commit
-
-
ricow@chromium.org authored
Reland 0c7d94eb: Add support for tar.gz archive files to download from download_from_google_storage I fixed the overlapping argument and fixed up the tests so that the actual sha1 hash is now passed (since the tool actually check now that the downloaded file hash matches) BUG= R=hinoka@google.com Review URL: https://codereview.chromium.org/1285423002 . git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296346 0039d316-1c4b-4281-b951-d872f2087c98
-
- 29 Jul, 2015 1 commit
-
-
hinoka@chromium.org authored
This does one last check to see if the file downloaded by download_from_google_storage.py actually matches its sha1 BUG= Review URL: https://codereview.chromium.org/1252313005 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296155 0039d316-1c4b-4281-b951-d872f2087c98
-
- 30 Jun, 2015 2 commits
-
-
boliu@chromium.org authored
Revert of Add support for tar.gz archive files to download from download_from_google_storage (patchset #8 id:140001 of https://codereview.chromium.org/807463005/) Reason for revert: This conflicts with (and duplicates?) the -z option below and has broken one of the chrome android downstream bots. Safer to revert than trying to fix Original issue's description: > Add support for tar.gz archive files to download from download_from_google_storage > > Also, add support for directly setting the public read flag on uploaded files. > > The support for tar.gz allows the uploaded bundle to be a single tar.gz file instead of a lot of individual files using the directory support already in. The benefit here is that it is much easier to update the dependency. Simply clean out the existing files, copy in the new ones, create a tar.gz file, with the same name as the directory + 'tar.gz'. If the directory name and file name does not match up we will not clean up existing artifacts on download (i.e., there can be left over files after extracting). > > I am doing this because I am moving a bunch of the dart dependencies to gcs, and a lot of our dependencies is much easier to manage with this in. If you don't like this, I can simply wrap the download script in another python script and do the logic there, but this may be handy for other people as well. > > Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=295872 TBR=hinoka@google.com,hinoka@chromium.org,azarchs@chromium.org,ricow@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1209033006 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295883 0039d316-1c4b-4281-b951-d872f2087c98
-
ricow@google.com authored
Also, add support for directly setting the public read flag on uploaded files. The support for tar.gz allows the uploaded bundle to be a single tar.gz file instead of a lot of individual files using the directory support already in. The benefit here is that it is much easier to update the dependency. Simply clean out the existing files, copy in the new ones, create a tar.gz file, with the same name as the directory + 'tar.gz'. If the directory name and file name does not match up we will not clean up existing artifacts on download (i.e., there can be left over files after extracting). I am doing this because I am moving a bunch of the dart dependencies to gcs, and a lot of our dependencies is much easier to manage with this in. If you don't like this, I can simply wrap the download script in another python script and do the logic there, but this may be handy for other people as well. Review URL: https://codereview.chromium.org/807463005 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295872 0039d316-1c4b-4281-b951-d872f2087c98
-
- 18 Jun, 2015 1 commit
-
-
ricow@google.com authored
This does not seem to be run by the bots, otherwise they should be red R=hinoka@google.com, iannucci@google.com BUG= Review URL: https://codereview.chromium.org/1188643008 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295741 0039d316-1c4b-4281-b951-d872f2087c98
-
- 17 Jan, 2014 1 commit
-
-
hinoka@google.com authored
A very common pattern for the users of this script is to have binaries in three different folders, eg: some/folder/win/bin.exe some/folder/mac/bin some/folder/linux/bin Instead of using --platform to specify three different paths, we can recognize this usage and pass in --auto_platform, and then --directory some/folder/ as the target. When enumerating files, it will match each individual file to see if they have (win|mac|linux) as a parent folder name, and filter out non-matching platforms. BUG= TEST= src/third_party/clang_format/bin$ download_from_google_storage --auto_platform --no_auth -b chromium-clang-fomat -dr . 0> Downloading ./linux/clang-format... Review URL: https://codereview.chromium.org/126893002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245643 0039d316-1c4b-4281-b951-d872f2087c98
-
- 12 Dec, 2013 1 commit
-
-
hinoka@chromium.org authored
Code path: 1. plugins.sso_auth is imported, which adds the AuthHandler class to the global state. 2. HasConfiguredCredentials() in gslib/utils.py is called by gsutil, and will return true if "prodaccess" exists on the system, which tells the system that we don't want a no-op auth handler. 3. When a command is called, all the auth handlers are cycled through and sso_auth.SSOAuth is called, which calls a stubby command to emit a gaiamint'ed oauth2 access token, which is then used as the Authorization Header if --bypass_prodaccess is passed in, then: 1. HasConfiguredCredentials() will bypass the check for prodaccess, as if it didn't exist. 2. plugins.sso_auth does not get imported. Which will essentially cause gsutil to behave as if this patch never existed. So the expected behavior is: =.boto file does not exist, prodaccess exists, but unauthenticated= Failure: No handler was ready to authenticate. 3 handlers were checked. ['OAuth2Auth', 'HmacAuthV1Handler', 'SSOAuth'] Check your credentials. =.boto file exists, prodaccess exists, but unauthenticated= sso_auth will raise NotReadyToAuthenticate, and the .boto file will be used instead =.boto file exists, prodaccess exists, authenticated= sso_auth will be run _after_ the default gsutil authenticator, which causes the sso_auth to be used over whatever the default authentication is. bypass_prodaccess is passed in by default to upload_to_google_storage because we expect people who use upload_to_google_storage to not need prodaccess and have their own boto file already. Also the sso_auth plugin will only request a readonlyi token, which will not work for uploading. BUG=258152 Review URL: https://codereview.chromium.org/86123002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@240266 0039d316-1c4b-4281-b951-d872f2087c98
-
- 25 Nov, 2013 1 commit
-
-
scottmg@chromium.org authored
Seems overly verbose when run in "gclient runhooks". R=iannucci@chromium.org, brettw@chromium.org Review URL: https://codereview.chromium.org/58783002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237120 0039d316-1c4b-4281-b951-d872f2087c98
-
- 19 Nov, 2013 1 commit
-
-
hinoka@chromium.org authored
BUG=321254 Review URL: https://codereview.chromium.org/76583002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@236039 0039d316-1c4b-4281-b951-d872f2087c98
-
- 20 Jun, 2013 1 commit
-
-
petermayo@chromium.org authored
It appears to be parsed and ignored, seems like a bug to me. BUG=None TEST=local/manual. Review URL: https://chromiumcodereview.appspot.com/17265012 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@207404 0039d316-1c4b-4281-b951-d872f2087c98
-
- 04 Jun, 2013 1 commit
-
-
hinoka@google.com authored
When a developer runs download_from_google_storage, and they don't have a .boto file, the tool automatically runs "gsutil config" to create one for them. Unfortunately, a side consequence is that if a bot runs the script, and it has a boto file that 403's, then it would run "gsutil config" which moves the .boto to .boto.bak, and creates an empty .boto file. This should not be the intended action. This CL changes so that "gsutil config" is not called, but instead just fails with a message telling the dev to run that command. TBR=maruel@chromium.org Review URL: https://codereview.chromium.org/16072023 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203824 0039d316-1c4b-4281-b951-d872f2087c98
-
- 13 Mar, 2013 1 commit
-
-
hinoka@google.com authored
continuation of: https://codereview.chromium.org/11664024 Moved it from chrome/trunk/src/build to depot_tools/ BUG=153360 TEST=two unittests included in tests/ For end-to-end testing, check out a large directory. Run find . -name .svn -prune -o -size +1000k -type f -print0 | upload_to_google_storage.py -b chrome-artifacts -0 - (replacing chrome-artifacts with an upload-able bucket) to test upload run "find . -name .svn -prune -o -size +1000k -type f -print0 | xargs -0 rm" to remove the files uploaded. Check that the large binary files have been removed run "download_from_google_storage.py -r -d -b chrome-artifacts ." to download the files again. Review URL: https://chromiumcodereview.appspot.com/12042069 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@187951 0039d316-1c4b-4281-b951-d872f2087c98
-