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

Retry publishing for all connection-related errors #176

Merged

Conversation

jeremycline
Copy link
Member

Previously publishing was only retried if the connection was closed
cleanly. However, it might close for other reasons (someone trips over a
cord, a firewall kills a connection, etc). We should go through the
retry process for any connection exception.

Fixes #175

Signed-off-by: Jeremy Cline jcline@redhat.com

Previously publishing was only retried if the connection was closed
cleanly. However, it might close for other reasons (someone trips over a
cord, a firewall kills a connection, etc). We should go through the
retry process for any connection exception.

Fixes fedora-infra#175

Signed-off-by: Jeremy Cline <jcline@redhat.com>
@@ -153,7 +153,7 @@ def publish(self, message, exchange=None):
except (pika_errs.NackError, pika_errs.UnroutableError) as e:
_log.warning("Message was rejected by the broker (%s)", str(e))
raise PublishReturned(reason=e)
except (pika_errs.ConnectionClosed, pika_errs.AMQPChannelError):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we want to stop handling ConnectionClosed here?

Copy link
Member Author

Choose a reason for hiding this comment

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

@codecov-io
Copy link

codecov-io commented May 17, 2019

Codecov Report

Merging #176 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #176   +/-   ##
=======================================
  Coverage   95.53%   95.53%           
=======================================
  Files          14       14           
  Lines        1478     1478           
  Branches      198      198           
=======================================
  Hits         1412     1412           
  Misses         50       50           
  Partials       16       16
Impacted Files Coverage Δ
fedora_messaging/_session.py 96.53% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cffceb4...fb8cef0. Read the comment docs.

Copy link
Member

@abompard abompard left a comment

Choose a reason for hiding this comment

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

Looks sane.

@mergify mergify bot merged commit 3a6c4e3 into fedora-infra:master May 17, 2019
@jeremycline jeremycline deleted the publish-handle-all-conn-errs branch May 21, 2019 19:21
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.

ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2488)
4 participants