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

RethrowPolicy in PeerStateActions #5005

Merged
merged 10 commits into from
Oct 31, 2024
Merged

RethrowPolicy in PeerStateActions #5005

merged 10 commits into from
Oct 31, 2024

Conversation

coot
Copy link
Contributor

@coot coot commented Oct 31, 2024

Description

Use RethrowPolicy in PeerStateActions to handle errors thrown by acquireOutboundConnections.

Added tests for:

  • IOErrors thrown by acquireOutboundConnection
  • IOErrors thrown by accept

Ref #4769.

Checklist

Quality

  • Commit sequence makes sense and have useful messages, see ref.
  • New tests are added and existing tests are updated.
  • Self-reviewed the PR.

Maintenance

  • Linked an issue or added the PR to the current sprint of ouroboros-network project.
  • Added labels.
  • Updated changelog files.
  • The documentation has been properly updated, see ref.

IOError handling for system calls:
* socket
* connect
* accept
@coot coot requested a review from a team as a code owner October 31, 2024 06:25
@coot coot added the peer-state-actions Issues related to PeerStateActions label Oct 31, 2024
@coot coot self-assigned this Oct 31, 2024
Copy link
Contributor

@crocodile-dentist crocodile-dentist left a comment

Choose a reason for hiding this comment

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

Overall LGTM, but needs changelog updates since for instance we added AcquireConnectionError which is breaking.

@coot coot linked an issue Oct 31, 2024 that may be closed by this pull request
3 tasks
We need rethrow policy for both `openToConnect` & `connect` Snocket
methods used by `acquireOutboundConnection`.  They execute `socket` and
`connect` system calls.
* Added AbsIOError QuickCheck generator
* Use IOErrors for bi{Inbound,Outbound}Attenuation and `biAcceptFailure`
  in `BearerInfo`
* Updated tests
@coot
Copy link
Contributor Author

coot commented Oct 31, 2024

Thanks @crocodile-dentist, I added changelog entries.

@coot coot enabled auto-merge October 31, 2024 17:24
@coot coot added this pull request to the merge queue Oct 31, 2024
Merged via the queue into main with commit 682a9ec Oct 31, 2024
12 checks passed
@coot coot deleted the coot/rethrow-policies branch October 31, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
peer-state-actions Issues related to PeerStateActions
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Exception handling in P2P
2 participants