mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Massenzio" <ma...@mesosphere.io>
Subject Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.
Date Wed, 08 Jul 2015 21:41:05 GMT


> On July 7, 2015, 9:32 p.m., Marco Massenzio wrote:
> > support/post-reviews.py, line 173
> > <https://reviews.apache.org/r/35777/diff/2/?file=1001308#file1001308line173>
> >
> >     note that here you will be printing the whole commit message, which in this
case is not appropriate.
> >     
> >     I would do instead:
> >     ```
> >     pos = message.find('Review:')
> >     if pos != -1:
> >         ...
> >         print ...format(message[pos:])
> >     ```
> >     should make the error message clearer.
> 
> Marco Massenzio wrote:
>     ok - to be a bit more pedantic:
>     ```
>     if pos != -1:
>         ...
>         if not match:
>             newline = max(message.find('\n', pos), len(message))
>             print ...format(message[pos:newline])
>     ```
> 
> Michael Park wrote:
>     I took your first suggestion. I would like to show the full rest of the message if
`Review: ...` is not the last line of the commit message.
>     
>     It still isn't robust anyway, since we don't check that the line starts with `Review:
` for example. But we can fix those later.

That's cool - thanks for that!
Someone with committer's power (@Till?) should commit this.


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review90783
-----------------------------------------------------------


On July 8, 2015, 9:18 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> -----------------------------------------------------------
> 
> (Updated July 8, 2015, 9:18 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. (29 seconds
ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> Reads `REVIEWBOARD_URL` from `.reviewboardrc` if it's available. We use `imp.load_source`
to import the `.reviewboardrc` file.
> > __.reviewboardrc__
> >
> > The .reviewboardrc file is a generic place for configuring a repository. This must
be in a directory in the user’s checkout path to work. __It must parse as a valid Python
file__, or you’ll see an error when using rbt.
> 
> 
> Diffs
> -----
> 
>   support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> -------
> 
> Modified the commit message with `git rebase` and ran `./support/post-reviews.py` to
observe the above error messages.
> Used the valid commit message for this patch and created it by running `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message