Changeset 60903 in webkit


Ignore:
Timestamp:
Jun 9, 2010 11:32:27 AM (14 years ago)
Author:
ojan@chromium.org
Message:

2010-06-09 Ojan Vafai <ojan@chromium.org>

Reviewed by Adam Barth.

Rietveld upload queue fails when setting in-rietveld flag
https://bugs.webkit.org/show_bug.cgi?id=40371

Make the comment arguments to set_flag_on_attachment optional
and add it to the MockBugzilla.

  • Scripts/webkitpy/common/net/bugzilla.py:
  • Scripts/webkitpy/tool/bot/queueengine.py:
  • Scripts/webkitpy/tool/commands/download_unittest.py:
  • Scripts/webkitpy/tool/commands/queues.py:
  • Scripts/webkitpy/tool/commands/queues_unittest.py:
  • Scripts/webkitpy/tool/mocktool.py:
Location:
trunk/WebKitTools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r60902 r60903  
     12010-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
    1182010-06-09  Kenneth Russell  <kbr@google.com>
    219
  • trunk/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py

    r60635 r60903  
    789789                               flag_name,
    790790                               flag_value,
    791                                comment_text,
    792                                additional_comment_text):
     791                               comment_text=None,
     792                               additional_comment_text=None):
    793793        # FIXME: We need a way to test this function on a live bugzilla
    794794        # instance.
     
    806806        self.browser.select_form(nr=1)
    807807
    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)
    809810
    810811        self._find_select_element_for_flag(flag_name).value = (flag_value,)
  • trunk/WebKitTools/Scripts/webkitpy/tool/bot/queueengine.py

    r59208 r60903  
    114114                    if e.exit_code == self.handled_error_code:
    115115                        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()
    117117                    self._delegate.handle_unexpected_error(work_item, message)
    118118            except TerminateQueue, e:
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/download_unittest.py

    r60635 r60903  
    110110
    111111    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"
    113113        self.assert_execute_outputs(PostAttachmentToRietveld(), [197], options=self._default_options(), expected_stderr=expected_stderr)
    114114
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues.py

    r60635 r60903  
    338338    def handle_script_error(cls, tool, state, script_error):
    339339        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))
    341341
    342342
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py

    r60635 r60903  
    123123            "next_work_item" : """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)
    124124Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)
     125MOCK 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.'
    125126MOCK: update_work_items: commit-queue [106, 197]
    1261272 patches in commit-queue [106, 197]
    127128""",
    128129            "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",
    129131        }
    130132        self.assert_queue_outputs(CommitQueue(), expected_stderr=expected_stderr)
     
    139141            "next_work_item" : """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)
    140142Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)
     143MOCK 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.\'
    141144MOCK: update_work_items: commit-queue [106, 197]
    142145MOCK: update_status: commit-queue Builders ["Builder2"] are red. See http://build.webkit.org
     
    144147""",
    145148            "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",
    146150        }
    147151        self.assert_queue_outputs(CommitQueue(), tool=tool, expected_stderr=expected_stderr)
     
    157161            "next_work_item": """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)
    158162Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)
     163MOCK 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.\'
    159164MOCK: update_work_items: commit-queue [106, 197]
    160165MOCK: update_status: commit-queue Builders ["Builder2"] are red. See http://build.webkit.org
     
    162167""",
    163168            "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",
    164170        }
    165171        self.assert_queue_outputs(CommitQueue(), tool=tool, work_item=rollout_patch, expected_stderr=expected_stderr)
     
    200206            "should_proceed_with_work_item": "MOCK: update_status: rietveld-upload-queue Uploading patch\n",
    201207            "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",
    202209        }
    203210        self.assert_queue_outputs(RietveldUploadQueue(), expected_stderr=expected_stderr)
  • trunk/WebKitTools/Scripts/webkitpy/tool/mocktool.py

    r60666 r60903  
    294294        return "%s/%s%s" % (self.bug_server_url, attachment_id, action_param)
    295295
     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
    296305    def post_comment_to_bug(self, bug_id, comment_text, cc=None):
    297306        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.