summaryrefslogtreecommitdiff
path: root/scripts/sync_package_status_unittest.py
diff options
context:
space:
mode:
authorMatt Tennant <mtennant@chromium.org>2012-05-10 12:58:03 -0700
committerGerrit <chrome-bot@google.com>2012-05-10 14:23:08 -0700
commit0f2afd244403b39e7a659bcca47cc7d77d4873a5 (patch)
tree5deb7ce0b067ea95e4c3a1aeae6eedd0f4597fa0 /scripts/sync_package_status_unittest.py
parent0558ddf71c6f539ac8ed54be1ff568c20fcc80fc (diff)
downloadchromite-0f2afd244403b39e7a659bcca47cc7d77d4873a5.tar.gz
sync_package_status: Recover more helpfully when spreadsheet write fails.
As described in the bug, the spreadsheet service is currently returning "Bad Request" errors for all write operations that used to work. That issue is not fixed, but this changelist does improve two things in this situation: 1) The error is caught and explained with a more helpful message. 2) The previous code used to create a new Tracker issue then put a link to it in the spreadsheet, but if the second step failed the tracker issue was still created first. Now it skips creating the tracker issue if it notices that putting a link to the issue in the spreadsheet is going to be a problem. BUG=chromium-os:30779 TEST=`sync_package_status --owner=mtennant` Still fails, since spreadsheet service seems balky right now (as described in the bug). But the errors are cleaner and, more importantly, it does not create a Tracker issue if it cannot put a link to it in the spreadsheet. TEST=pylint of all files passes TEST=`python sync_package_status_unittest.py` passes Change-Id: I2e4fea4dac2b6bd908cdc61a78d8efc9e3dfab72 Reviewed-on: https://gerrit.chromium.org/gerrit/22393 Tested-by: Matt Tennant <mtennant@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Matt Tennant <mtennant@chromium.org>
Diffstat (limited to 'scripts/sync_package_status_unittest.py')
-rw-r--r--scripts/sync_package_status_unittest.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/sync_package_status_unittest.py b/scripts/sync_package_status_unittest.py
index 5f14b3487..5e3ab2091 100644
--- a/scripts/sync_package_status_unittest.py
+++ b/scripts/sync_package_status_unittest.py
@@ -467,6 +467,7 @@ class SyncerTest(test_lib.MoxTestCase):
ss_issue_val = 'Hyperlink%d' % issue_id
# Replay script
+ mocked_scomm.ClearCellValue(row_ix, mocked_syncer.tracker_col_ix)
mocked_tcomm.CreateTrackerIssue(issue).AndReturn(issue_id)
mocked_syncer._GenSSLinkToIssue(issue_id).AndReturn(ss_issue_val)
mocked_scomm.ReplaceCellValue(row_ix, mocked_syncer.tracker_col_ix,