1. 14 Apr, 2022 5 commits
  2. 13 Apr, 2022 1 commit
    • Bruce Dawson's avatar
      Make CheckLicense ~60x faster · 07bfa0dd
      Bruce Dawson authored
      After optimizing CheckForIncludeGuards the CheckLicense presubmit was
      the second slowest presubmit, taking about 35 minutes when run as part
      of "git cl presubmit --all". The cause of its slowness was initially
      non-obvious because it runs quite quickly on most files, however
      analysis showed that it could take 50+ seconds on some files. The files
      that it is slow on are those that lack a good license header, meaning
      that the regex match has to painstakingly scan the entire file.
      
      The optimization in this change is to recognize that there is a simple
      non-regex line that appears in all valid license headers, regardless of
      variants. If that line is absent then there is, necessarily, no valid
      license header, and searching for a line of text is something that
      Python can do extremely quickly.
      
      This change drops the CheckLicense time from about 35 minutes to about
      32 seconds.
      
      Trivia: _CommonChecks in third_party/blink/PRESUBMIT.py passes .* as the
      license, so I added an early-out for that to avoid pointlessly scanning
      those files.
      
      Bug: 1309977
      Change-Id: Ic2e56079675c2c5a2643d20dd492b1cc52e4ead2
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3584882Reviewed-by: 's avatarErik Staab <estaab@chromium.org>
      Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      07bfa0dd
  3. 12 Apr, 2022 1 commit
    • Garrett Beaty's avatar
      Reland "Set a default got_revision property in the bot_update json output." · 3b97fa82
      Garrett Beaty authored
      This is a reland of commit 05381726
      
      The change was not related to the errors that it was reverted for, so no
      changes are necessary.
      
      Original change's description:
      > Set a default got_revision property in the bot_update json output.
      >
      > The bot_update.py script sets a got_revision property by default even if
      > it is not present in the reverse revision mapping. This results in an
      > uncaught exception when set_output_commit is set to True if got_revision
      > isn't present in the reverse revision mapping, but it isn't caught until
      > production because the test API doesn't match that behavior. This change
      > updates the test API method to match the behavior of the script.
      >
      > Recipe-Nontrivial-Roll: build
      > Recipe-Nontrivial-Roll: build_limited
      > Recipe-Nontrivial-Roll: chromiumos
      > Recipe-Nontrivial-Roll: infra
      > Change-Id: Ideefa9d77d2a816ae66a2bb52737264ed3f5bcee
      > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575361
      > Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
      > Reviewed-by: Josip Sokcevic <sokcevic@google.com>
      > Commit-Queue: Garrett Beaty <gbeaty@google.com>
      > Auto-Submit: Garrett Beaty <gbeaty@google.com>
      
      Recipe-Nontrivial-Roll: build
      Recipe-Nontrivial-Roll: build_limited
      Recipe-Nontrivial-Roll: chromiumos
      Recipe-Nontrivial-Roll: infra
      Change-Id: I80efeee8a2b951df43b00d89bb596dc2cf2fcec7
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3582182Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
      Commit-Queue: Garrett Beaty <gbeaty@google.com>
      3b97fa82
  4. 11 Apr, 2022 1 commit
  5. 08 Apr, 2022 2 commits
    • recipe-roller's avatar
      Roll recipe dependencies (trivial). · e2222451
      recipe-roller authored
      This is an automated CL created by the recipe roller. This CL rolls
      recipe changes from upstream projects (recipe_engine) into this repository.
      
      The build that created this CL was
      https://ci.chromium.org/b/8817421433491348977
      
      recipe_engine:
      https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0f5f374af06ce6c30708b36fd2545668dff22ad7
        0f5f374 (alexschulze@chromium.org)
            [cipd] Fix `instances` command with limit = 0
      
      More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
      
      R=iannucci@chromium.org
      
      Recipe-Tryjob-Bypass-Reason: Autoroller
      Ignore-Freeze: Autoroller
      Bugdroid-Send-Email: False
      Change-Id: I091805fddb573d78b830f1e33c31e344e5225863
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3579841
      Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
      Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
      e2222451
    • Josip Sokcevic's avatar
      Revert "Set a default got_revision property in the bot_update json output." · a0382d39
      Josip Sokcevic authored
      This reverts commit 05381726.
      
      Reason for revert: we reverted got_revision change, and this change
      itself may be causing some other failues.
      
      Original change's description:
      > Set a default got_revision property in the bot_update json output.
      >
      > The bot_update.py script sets a got_revision property by default even if
      > it is not present in the reverse revision mapping. This results in an
      > uncaught exception when set_output_commit is set to True if got_revision
      > isn't present in the reverse revision mapping, but it isn't caught until
      > production because the test API doesn't match that behavior. This change
      > updates the test API method to match the behavior of the script.
      >
      > Recipe-Nontrivial-Roll: build
      > Recipe-Nontrivial-Roll: build_limited
      > Recipe-Nontrivial-Roll: chromiumos
      > Recipe-Nontrivial-Roll: infra
      > Change-Id: Ideefa9d77d2a816ae66a2bb52737264ed3f5bcee
      > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575361
      > Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
      > Reviewed-by: Josip Sokcevic <sokcevic@google.com>
      > Commit-Queue: Garrett Beaty <gbeaty@google.com>
      > Auto-Submit: Garrett Beaty <gbeaty@google.com>
      
      Change-Id: Ie975dfe39e7b8997336761e12f53f3046359d825
      Recipe-Nontrivial-Roll: build
      Recipe-Nontrivial-Roll: build_limited
      Recipe-Nontrivial-Roll: chromiumos
      Recipe-Nontrivial-Roll: infra
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3578820
      Auto-Submit: Josip Sokcevic <sokcevic@google.com>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      a0382d39
  6. 07 Apr, 2022 5 commits
  7. 06 Apr, 2022 5 commits
  8. 05 Apr, 2022 7 commits
  9. 04 Apr, 2022 1 commit
  10. 03 Apr, 2022 1 commit
    • Bruce Dawson's avatar
      Ensure _PresubmitResult._message is text · db8622bc
      Bruce Dawson authored
      It is easy to get type confusion and end up passing a list as the
      message parameter to _PresubmitResult. This error will not be detected
      until the end of the run - perhaps hours later - when all evidence of
      where the list came from is lost.
      
      This change ensures that the message parameter is a string. If it is not
      then the exception that is thrown should allow quick identification of
      the problematic code.
      
      This also fixes a presubmit unit test that passed None as the message.
      We could support that but I don't think that we should.
      
      Bug: 1309977
      Change-Id: Ifb1d5100d47922b0ebd8bb834caa6fbba690b43c
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3566436Reviewed-by: 's avatarJochen Eisinger <jochen@chromium.org>
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      db8622bc
  11. 31 Mar, 2022 2 commits
  12. 30 Mar, 2022 3 commits
  13. 29 Mar, 2022 3 commits
  14. 28 Mar, 2022 3 commits