From b87cca84449d0a40f131cd900ed2e58d6cc3de52 Mon Sep 17 00:00:00 2001 From: Edward Lesmes Date: Mon, 1 Mar 2021 20:45:47 +0000 Subject: [PATCH] owners: Use DepotToolsClient while code-owners plugin is fixed. Bug: 1183447 Change-Id: I11c67b13ace08eb5bafb90756bd45af6ff39f12f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2727569 Auto-Submit: Edward Lesmes Reviewed-by: Gavin Mak Commit-Queue: Edward Lesmes --- owners_client.py | 4 ++-- tests/owners_client_test.py | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/owners_client.py b/owners_client.py index cdb42bd11..753dada5e 100644 --- a/owners_client.py +++ b/owners_client.py @@ -234,6 +234,6 @@ def GetCodeOwnersClient(root, host, project, branch): Defaults to GerritClient, and falls back to DepotToolsClient if code-owners plugin is not available.""" - if gerrit_util.IsCodeOwnersEnabled(host): - return GerritClient(host, project, branch) + # TODO(crbug.com/1183447): Use code-owners plugin if available on host once + # code-owners plugin issues have been fixed. return DepotToolsClient(root, branch) diff --git a/tests/owners_client_test.py b/tests/owners_client_test.py index 40ee8214d..4e74aaf2f 100644 --- a/tests/owners_client_test.py +++ b/tests/owners_client_test.py @@ -313,10 +313,9 @@ class GetCodeOwnersClientTest(unittest.TestCase): self.addCleanup(mock.patch.stopall) def testGetCodeOwnersClient_GerritClient(self): - gerrit_util.IsCodeOwnersEnabled.return_value = True - self.assertIsInstance( - owners_client.GetCodeOwnersClient('root', 'host', 'project', 'branch'), - owners_client.GerritClient) + # TODO(crbug.com/1183447): Check that code-owners is used if available once + # code-owners plugin issues have been fixed. + pass def testGetCodeOwnersClient_DepotToolsClient(self): gerrit_util.IsCodeOwnersEnabled.return_value = False