Changeset 60903 in webkit
- Timestamp:
- Jun 9, 2010 11:32:27 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r60902 r60903 1 2010-06-09 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Rietveld upload queue fails when setting in-rietveld flag 6 https://bugs.webkit.org/show_bug.cgi?id=40371 7 8 Make the comment arguments to set_flag_on_attachment optional 9 and add it to the MockBugzilla. 10 11 * Scripts/webkitpy/common/net/bugzilla.py: 12 * Scripts/webkitpy/tool/bot/queueengine.py: 13 * Scripts/webkitpy/tool/commands/download_unittest.py: 14 * Scripts/webkitpy/tool/commands/queues.py: 15 * Scripts/webkitpy/tool/commands/queues_unittest.py: 16 * Scripts/webkitpy/tool/mocktool.py: 17 1 18 2010-06-09 Kenneth Russell <kbr@google.com> 2 19 -
trunk/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py
r60635 r60903 789 789 flag_name, 790 790 flag_value, 791 comment_text ,792 additional_comment_text ):791 comment_text=None, 792 additional_comment_text=None): 793 793 # FIXME: We need a way to test this function on a live bugzilla 794 794 # instance. … … 806 806 self.browser.select_form(nr=1) 807 807 808 self.browser.set_value(comment_text, name='comment', nr=0) 808 if comment_text: 809 self.browser.set_value(comment_text, name='comment', nr=0) 809 810 810 811 self._find_select_element_for_flag(flag_name).value = (flag_value,) -
trunk/WebKitTools/Scripts/webkitpy/tool/bot/queueengine.py
r59208 r60903 114 114 if e.exit_code == self.handled_error_code: 115 115 continue 116 message = "Unexpected failure when landing patch! Please file a bug against webkit-patch.\n%s" % e.message_with_output()116 message = "Unexpected failure when processing patch! Please file a bug against webkit-patch.\n%s" % e.message_with_output() 117 117 self._delegate.handle_unexpected_error(work_item, message) 118 118 except TerminateQueue, e: -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/download_unittest.py
r60635 r60903 110 110 111 111 def test_post_attachment_to_rietveld(self): 112 expected_stderr = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 197 from bug 42.\nMOCK: Uploading patch to rietveld\n "112 expected_stderr = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 197 from bug 42.\nMOCK: Uploading patch to rietveld\nMOCK setting flag 'in-rietveld' to '+' on attachment '197' with comment 'None' and additional comment 'None'\n" 113 113 self.assert_execute_outputs(PostAttachmentToRietveld(), [197], options=self._default_options(), expected_stderr=expected_stderr) 114 114 -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
r60635 r60903 338 338 def handle_script_error(cls, tool, state, script_error): 339 339 status_id = cls._update_status_for_script_error(tool, state, script_error) 340 self._reject_patch(patch, cls._error_message_for_bug(tool, status_id, script_error))340 cls._reject_patch(patch, cls._error_message_for_bug(tool, status_id, script_error)) 341 341 342 342 -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
r60635 r60903 123 123 "next_work_item" : """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 124 124 Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 125 MOCK setting flag 'commit-queue' to '-' on attachment '128' with comment 'Rejecting patch 128 from commit-queue.' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/config/committers.py.\n\n- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.\n\n- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your committer rights.' 125 126 MOCK: update_work_items: commit-queue [106, 197] 126 127 2 patches in commit-queue [106, 197] 127 128 """, 128 129 "process_work_item" : "MOCK: update_status: commit-queue Pass\n", 130 "handle_unexpected_error" : "MOCK setting flag 'commit-queue' to '-' on attachment '1234' with comment 'Rejecting patch 1234 from commit-queue.' and additional comment 'Mock error message'\n", 129 131 } 130 132 self.assert_queue_outputs(CommitQueue(), expected_stderr=expected_stderr) … … 139 141 "next_work_item" : """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 140 142 Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 143 MOCK setting flag \'commit-queue\' to \'-\' on attachment \'128\' with comment \'Rejecting patch 128 from commit-queue.\' and additional comment \'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/config/committers.py.\n\n- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.\n\n- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your committer rights.\' 141 144 MOCK: update_work_items: commit-queue [106, 197] 142 145 MOCK: update_status: commit-queue Builders ["Builder2"] are red. See http://build.webkit.org … … 144 147 """, 145 148 "process_work_item" : "MOCK: update_status: commit-queue Builders [\"Builder2\"] are red. See http://build.webkit.org\n", 149 "handle_unexpected_error" : "MOCK setting flag 'commit-queue' to '-' on attachment '1234' with comment 'Rejecting patch 1234 from commit-queue.' and additional comment 'Mock error message'\n", 146 150 } 147 151 self.assert_queue_outputs(CommitQueue(), tool=tool, expected_stderr=expected_stderr) … … 157 161 "next_work_item": """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 158 162 Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 163 MOCK setting flag \'commit-queue\' to \'-\' on attachment \'128\' with comment \'Rejecting patch 128 from commit-queue.\' and additional comment \'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/config/committers.py.\n\n- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.\n\n- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your committer rights.\' 159 164 MOCK: update_work_items: commit-queue [106, 197] 160 165 MOCK: update_status: commit-queue Builders ["Builder2"] are red. See http://build.webkit.org … … 162 167 """, 163 168 "process_work_item": "MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'land-attachment', '--force-clean', '--build', '--non-interactive', '--ignore-builders', '--build-style=both', '--quiet', 76543]\nMOCK: update_status: commit-queue Pass\n", 169 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '76543' with comment 'Rejecting patch 76543 from commit-queue.' and additional comment 'Mock error message'\n", 164 170 } 165 171 self.assert_queue_outputs(CommitQueue(), tool=tool, work_item=rollout_patch, expected_stderr=expected_stderr) … … 200 206 "should_proceed_with_work_item": "MOCK: update_status: rietveld-upload-queue Uploading patch\n", 201 207 "process_work_item": "MOCK: update_status: rietveld-upload-queue Pass\n", 208 "handle_unexpected_error": "MOCK setting flag 'in-rietveld' to '-' on attachment '1234' with comment 'Could not upload patch 1234 to rietveld. Rietveld is down or there's a bug in the upload bot.' and additional comment 'Mock error message'\n", 202 209 } 203 210 self.assert_queue_outputs(RietveldUploadQueue(), expected_stderr=expected_stderr) -
trunk/WebKitTools/Scripts/webkitpy/tool/mocktool.py
r60666 r60903 294 294 return "%s/%s%s" % (self.bug_server_url, attachment_id, action_param) 295 295 296 def set_flag_on_attachment(self, 297 attachment_id, 298 flag_name, 299 flag_value, 300 comment_text=None, 301 additional_comment_text=None): 302 log("MOCK setting flag '%s' to '%s' on attachment '%s' with comment '%s' and additional comment '%s'" % ( 303 flag_name, flag_value, attachment_id, comment_text, additional_comment_text)) 304 296 305 def post_comment_to_bug(self, bug_id, comment_text, cc=None): 297 306 log("MOCK bug comment: bug_id=%s, cc=%s\n--- Begin comment ---\%s\n--- End comment ---\n" % (
Note: See TracChangeset
for help on using the changeset viewer.