Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stacktrace in twisted.smtp on buildbot #816

Merged
merged 3 commits into from
Jun 14, 2017
Merged

Conversation

rodrigc
Copy link
Contributor

@rodrigc rodrigc commented Jun 14, 2017

@codecov
Copy link

codecov bot commented Jun 14, 2017

Codecov Report

Merging #816 into trunk will decrease coverage by 1.57%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##            trunk     #816      +/-   ##
==========================================
- Coverage   91.59%   90.01%   -1.58%     
==========================================
  Files         840      840              
  Lines      146766   146774       +8     
  Branches    12854    12854              
==========================================
- Hits       134426   132117    -2309     
- Misses      10098    12288    +2190     
- Partials     2242     2369     +127

@rodrigc rodrigc merged commit 5ddbe39 into trunk Jun 14, 2017
@rodrigc rodrigc deleted the 9180-rodrigc-smtp branch June 14, 2017 07:27
Copy link
Member

@exarkun exarkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Some changes would be nice. Though I see you merged this already without any apparent review?

Are you treating your Twisted commit privileges responsibly?

@@ -0,0 +1 @@
Sending a list of recipients with twisted.smtp.SenderFactory has been fixed. This fixes a problem found when running buildbot.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fragment doesn't follow the style guidelines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@exarkun thanks for the additional feedback. @tardyp reviewed the request.

I may not be as talented as some of the other Twisted devs, but I do take my commit privileges responsibly, to the best of my ability.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is tardyp's review? The convention is for the review to be left on the PR. Failing that, the trac ticket. I don't see it in either place. Am I missing it somewhere?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did discuss that over IRC


def test_SMTPClientRecipientUnicode(self):
"""
Use a L{unicode} recipient.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what?

'source@address', u'recipient@address',
BytesIO(b"Message body"), onDone,
retries=0, timeout=0.5)
return self._timeoutTest(onDone, clientFactory)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about factoring the duplication between this and the previous test out? This will make it clear what's varying.

"""
onDone = defer.Deferred()
clientFactory = smtp.SMTPSenderFactory(
'source@address', (u'recipient1@address', b'recipient2@address'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow what an awful API. This should probably be deprecated and removed.

@@ -1896,7 +1897,7 @@ def __init__(self, fromEmail, toEmail, file, deferred, retries=5,
if not isinstance(_email, bytes):
_email = _email.encode('ascii')

toEmailFinal.append(email)
toEmailFinal.append(_email)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's not a good idea to have variables named email and _email in the same function?

@glyph
Copy link
Member

glyph commented Jun 14, 2017

It's important to go through all the parts of the review process as documented on https://twistedmatrix.com/trac/wiki/ReviewProcess#Reviewers:Howtoreviewachange.

In this case, the parts that were skipped are:

  • "write a detailed comment about all potential improvements to the branch", and
  • "Remove the 'review' keyword from the ticket".

These are pretty critical pieces of the process. We should improve the clarity of the language here - the comment in question is assumed to have to be either on the PR or the trac ticket, comments elsewhere (not in email, and especially not on IRC, where they'll be entirely lost to other interested readers) don't count. But in any case, the review keyword was not attached or removed, so there's no record of the code review, so this is a blatantly out-of-policy merge.

Since you, the author ( @rodrigc ) and not the reviewer ( @tardyp ) , are the project committer in this case, as per https://twistedmatrix.com/trac/wiki/ReviewProcess#Whocanreview, "the committer may accept it and land their change, but they are then responsible for the adequacy of the review". This review policy is in place to allow new reviewers to become familiar with our process so they can become committers - it is both out of process and unhelpful to that reviewer if they aren't actually following it. Usually if you have a non-committer review your changes, you should provide some feedback on the quality of the review in order to help give them confidence to eventually join the project.

Hopefully this explanation makes it a little clearer why these aspects of the process are important, and what exactly is required.

@tardyp
Copy link
Contributor

tardyp commented Jun 14, 2017

Well, I cannot say I did an official review, as I have no familiarity with that code.
We discussed the problem over IRC, and I said that the fixed looked good, combined with the fact that we had people reporting the fix was fixing their problem.

It looks like @rodrigc was overzealous merging that fix thinking that 17.5.0 was breaking Buildbot email feature. I think he can followup with another PR addressing the review comments.

After a more thorough review, I doubt that this is recent regression, as the problem comes from e73c9c5 which is 10 month old.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants