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

Skip delivery notification when perform_deliveries is false. #33824

Merged
merged 2 commits into from Sep 11, 2018

Conversation

Projects
None yet
6 participants
@yskkin
Contributor

yskkin commented Sep 8, 2018

Summary

If perform_deliveries is false, current master logs delivery of mail even if it is not delivered actually.
I think delivery notification should be skipped for this case.

@rails-bot

This comment has been minimized.

Show comment
Hide comment
@rails-bot

rails-bot Sep 8, 2018

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @schneems (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review.

Please see the contribution instructions for more information.

rails-bot commented Sep 8, 2018

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @schneems (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review.

Please see the contribution instructions for more information.

@y-yagi

This comment has been minimized.

Show comment
Hide comment
@y-yagi

y-yagi Sep 8, 2018

Member

This seems the expected behavior. Ref: #32754 (comment)

Member

y-yagi commented Sep 8, 2018

This seems the expected behavior. Ref: #32754 (comment)

@eugeneius

This comment has been minimized.

Show comment
Hide comment
@eugeneius

eugeneius Sep 8, 2018

Member

How about logging a different message when delivery is disabled, e.g.

Skipped sending mail to test@email.com as perform_deliveries is false

Member

eugeneius commented Sep 8, 2018

How about logging a different message when delivery is disabled, e.g.

Skipped sending mail to test@email.com as perform_deliveries is false

@y-yagi

This comment has been minimized.

Show comment
Hide comment
@y-yagi

y-yagi Sep 8, 2018

Member

Or how about including perform_deliveries in payload?
This will allow the user to deal with notificaiton when perform_deliveries is false.

Member

y-yagi commented Sep 8, 2018

Or how about including perform_deliveries in payload?
This will allow the user to deal with notificaiton when perform_deliveries is false.

@yskkin

This comment has been minimized.

Show comment
Hide comment
@yskkin

yskkin Sep 9, 2018

Contributor

I think both of changing message and adding payload is required since user cannot detach LogScbscriber and LogScbscriber cannot know perform_deriveries without adding it to payload.
I'll update PR later unless I missed something.

Contributor

yskkin commented Sep 9, 2018

I think both of changing message and adding payload is required since user cannot detach LogScbscriber and LogScbscriber cannot know perform_deriveries without adding it to payload.
I'll update PR later unless I missed something.

@yskkin

This comment has been minimized.

Show comment
Hide comment
@yskkin

yskkin Sep 9, 2018

Contributor

@y-yagi @eugeneius Thank you for review!
I updated my PR.

Contributor

yskkin commented Sep 9, 2018

@y-yagi @eugeneius Thank you for review!
I updated my PR.

@rafaelfranca rafaelfranca merged commit 7acd267 into rails:master Sep 11, 2018

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@yskkin yskkin deleted the yskkin:suppress_logging branch Sep 12, 2018

@yskkin

This comment has been minimized.

Show comment
Hide comment
@yskkin

yskkin Sep 12, 2018

Contributor

Thanks ❤️

By the way, as I added to the guide, if perform_deliveries is false, AM::Base.deliveries array will not be populated even if delivery_method is :test.

To me, it does not align well with #32754 (comment). Is this bug?

the action of delivering the mail message is still performed and logged so people can for example see what is going to be delivered

Contributor

yskkin commented Sep 12, 2018

Thanks ❤️

By the way, as I added to the guide, if perform_deliveries is false, AM::Base.deliveries array will not be populated even if delivery_method is :test.

To me, it does not align well with #32754 (comment). Is this bug?

the action of delivering the mail message is still performed and logged so people can for example see what is going to be delivered

@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca Sep 12, 2018

Member

No. The delivery is not made so we don't want to add the the deliveries array. But we wan to log it specially because in development delivery is disabled by default.

Member

rafaelfranca commented Sep 12, 2018

No. The delivery is not made so we don't want to add the the deliveries array. But we wan to log it specially because in development delivery is disabled by default.

@yskkin

This comment has been minimized.

Show comment
Hide comment
@yskkin

yskkin Sep 12, 2018

Contributor

I got it. Thank you for answer!

Contributor

yskkin commented Sep 12, 2018

I got it. Thank you for answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment