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(request-response): Report failures #4701

Conversation

oblique
Copy link
Contributor

@oblique oblique commented Oct 20, 2023

Description

Added failure reporting. Also fixed the removal of pending jobs.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Awesome work on discovering all these bugs. Curious what you think of making this more type-safe!

protocols/request-response/src/handler.rs Outdated Show resolved Hide resolved
protocols/request-response/src/lib.rs Show resolved Hide resolved
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Thank you @oblique!

protocols/request-response/src/lib.rs Outdated Show resolved Hide resolved
protocols/request-response/src/lib.rs Outdated Show resolved Hide resolved
@oblique oblique marked this pull request as draft October 24, 2023 16:36
@oblique oblique marked this pull request as ready for review October 25, 2023 11:33
@oblique
Copy link
Contributor Author

oblique commented Oct 25, 2023

This PR is ready. I finalized implementation and test cases

Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Great work!

I have some minor feedback for the implementation and a few ideas on how we can make the tests a bit more concise :)

protocols/request-response/src/handler.rs Outdated Show resolved Hide resolved
protocols/request-response/src/handler.rs Outdated Show resolved Hide resolved
protocols/request-response/src/handler.rs Outdated Show resolved Hide resolved
protocols/request-response/src/lib.rs Outdated Show resolved Hide resolved
protocols/request-response/tests/error_reporting.rs Outdated Show resolved Hide resolved
protocols/request-response/tests/error_reporting.rs Outdated Show resolved Hide resolved
protocols/request-response/tests/error_reporting.rs Outdated Show resolved Hide resolved
protocols/request-response/tests/error_reporting.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Great work! Two more minor comments :)

protocols/request-response/tests/error_reporting.rs Outdated Show resolved Hide resolved
protocols/request-response/tests/error_reporting.rs Outdated Show resolved Hide resolved
@thomaseizinger
Copy link
Contributor

I'll merge this directly and continue with fixing up CI in the other PR!

Thanks so much of helping on this!

@thomaseizinger thomaseizinger merged commit feccbc2 into libp2p:refactor/req-res-on-upgrade Oct 26, 2023
67 of 70 checks passed
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Changes look good to me. Appreciate the additional tests and type safety!

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

3 participants