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

feat(ibc-query): define request/response domain types #1129

Merged
merged 27 commits into from
Mar 18, 2024

Conversation

Farhad-Shabani
Copy link
Member

@Farhad-Shabani Farhad-Shabani commented Mar 16, 2024

Closes: #1128


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests.
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@Farhad-Shabani Farhad-Shabani marked this pull request as ready for review March 16, 2024 01:15
@Farhad-Shabani Farhad-Shabani added this to the 0.51.0 milestone Mar 16, 2024
Copy link

codecov bot commented Mar 16, 2024

Codecov Report

Attention: Patch coverage is 0.06494% with 1539 lines in your changes are missing coverage. Please review.

Project coverage is 63.11%. Comparing base (bef3683) to head (ad7ca4d).

Files Patch % Lines
ibc-query/src/core/channel/types/response.rs 0.00% 412 Missing ⚠️
ibc-query/src/core/client/types/response.rs 0.00% 268 Missing ⚠️
ibc-query/src/core/connection/types/response.rs 0.00% 187 Missing ⚠️
ibc-query/src/core/channel/types/request.rs 0.00% 182 Missing ⚠️
ibc-query/src/core/channel/query.rs 0.00% 111 Missing ⚠️
ibc-query/src/core/client/types/request.rs 0.00% 88 Missing ⚠️
ibc-query/src/core/connection/types/request.rs 0.00% 60 Missing ⚠️
ibc-query/src/core/client/query.rs 0.00% 54 Missing ⚠️
ibc-query/src/core/connection/query.rs 0.00% 48 Missing ⚠️
ibc-query/src/types.rs 0.00% 42 Missing ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1129      +/-   ##
==========================================
- Coverage   66.50%   63.11%   -3.40%     
==========================================
  Files         209      217       +8     
  Lines       20692    21806    +1114     
==========================================
  Hits        13762    13762              
- Misses       6930     8044    +1114     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@rnbguy rnbguy 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 👍

Added review comments for some changes.

ibc-query/src/types.rs Outdated Show resolved Hide resolved
ibc-query/src/utils.rs Outdated Show resolved Hide resolved
ibc-query/src/utils.rs Show resolved Hide resolved
ibc-query/src/error.rs Outdated Show resolved Hide resolved
ibc-query/src/error.rs Outdated Show resolved Hide resolved
ibc-query/README.md Outdated Show resolved Hide resolved
ibc-clients/ics07-tendermint/types/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@rnbguy rnbguy 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 to handle the gRPC types smoothly.

I added a few changes as discussed in previous review comments. I also removed several clippy lints.

@rnbguy
Copy link
Collaborator

rnbguy commented Mar 18, 2024

ibc-query crate lacks tests. We will add them in future PRs.

@rnbguy rnbguy changed the title feat: define request/response domain types in ibc-query feat(ibc-query): define request/response domain types Mar 18, 2024
@rnbguy rnbguy merged commit d773a23 into main Mar 18, 2024
17 checks passed
@rnbguy rnbguy deleted the farhad/add-request-domain-types branch March 18, 2024 14:52
Farhad-Shabani added a commit that referenced this pull request Sep 9, 2024
* feat: Add domain definitions for request/response query types in ibc-query

* chore: add unclog

* feat: define serde & schema features

* fix: derive missing schemars

* docs: add remarks to README + additional unclog

* chore: some clean-ups

* chore: organize orders

* feat: add TryFrom for response types

* use invalid_argument error code

* rm redudant lint relaxing

* use proof_not_found method

* consistent QueryError enum structure

* Update ibc-query/README.md

Signed-off-by: Rano | Ranadeep <ranadip.bswas@gmail.com>

* clippy::match_bool

* clippy::use_self

* clippy::or_fun_call

* use if-let-some over match

* clippy::redundant_closure_for_method_calls

* Into::into over T::from

* clippy::uninlined_format_args

* clippy::cast_lossless

* clippy::impl_trait_in_params

* clippy::shadow_reuse

* clippy::pattern_type_mismatch

* safe use of u64::MAX

* then over then_some

* rename IntoProto to IntoResponse

---------

Signed-off-by: Rano | Ranadeep <ranadip.bswas@gmail.com>
Co-authored-by: Ranadeep Biswas <mail@rnbguy.at>
Co-authored-by: Rano | Ranadeep <ranadeep@informal.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add domain definitions for request/response query types in ibc-query
3 participants