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: inspect query warns on failing addresses #2341

Merged
merged 6 commits into from
Dec 1, 2023
Merged

Conversation

toteki
Copy link
Member

@toteki toteki commented Nov 29, 2023

Adds a helpful field for inspect query - will indicate if any addresses are being skipped due to price problems, for example.

Summary by CodeRabbit

  • New Features

    • Enhanced the inspect query to include a list of accounts with uncalculated positions.
  • Bug Fixes

    • Improved error handling by tracking and displaying failed account inspections.
  • Documentation

    • Updated CHANGELOG to reflect new query functionality and error tracking enhancements.

@toteki toteki requested a review from a team as a code owner November 29, 2023 14:12
Copy link
Contributor

coderabbitai bot commented Nov 29, 2023

Walkthrough

The inspect query within the Umee protocol has been enhanced to include a new feature that reports a list of accounts with uncalculable positions. This update involves appending failed addresses to a failures list during the inspection process and returning this list as part of the query response.

Changes

File Path Change Summary
proto/umee/leverage/v1/query.proto
x/leverage/keeper/inspector.go
Added failures field to QueryInspectResponse message.
Included failures slice to store and return failed addresses.
CHANGELOG.md Documented the addition of functionality to return failed accounts in the inspect query across multiple entries.

🐇✨
In the realm of code, where the data hops around,
A query was tweaked, and the failures were found.
Now the rabbit reports with a list quite precise,
Of accounts that stumbled, not once, but twice.
🌟📜


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between faade06 and 11e542b.
Files ignored due to filter (2)
  • swagger/swagger.yaml
  • x/leverage/types/query.pb.go
Files selected for processing (2)
  • proto/umee/leverage/v1/query.proto (1 hunks)
  • x/leverage/keeper/inspector.go (3 hunks)
Files skipped from review due to trivial changes (1)
  • proto/umee/leverage/v1/query.proto
Additional comments: 3
x/leverage/keeper/inspector.go (3)
  • 29-35: The introduction of the failures slice and the conditional check for liquidator query enablement are correctly implemented.

  • 74-79: The logic to append failed addresses to the failures slice when an error occurs in getting the account position is correctly implemented.

  • 123-126: The QueryInspectResponse is correctly updated to include the Failures field, which will return the list of failed addresses.

x/leverage/keeper/inspector.go Show resolved Hide resolved
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Merging #2341 (5221e32) into main (7f05ad4) will decrease coverage by 5.23%.
Report is 306 commits behind head on main.
The diff coverage is 66.08%.

❗ Current head 5221e32 differs from pull request most recent head e6fb670. Consider uploading reports for the commit e6fb670 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2341      +/-   ##
==========================================
- Coverage   75.38%   70.16%   -5.23%     
==========================================
  Files         100      170      +70     
  Lines        8025    12651    +4626     
==========================================
+ Hits         6050     8877    +2827     
- Misses       1589     3169    +1580     
- Partials      386      605     +219     
Files Coverage Δ
ante/ante.go 66.66% <100.00%> (+18.45%) ⬆️
ante/fee.go 80.00% <100.00%> (+1.64%) ⬆️
ante/spam_prevention.go 75.92% <ø> (ø)
app/inflation/inflation.go 100.00% <100.00%> (ø)
app/upgradev3/migrations.go 84.21% <ø> (+5.94%) ⬆️
util/coin/utoken.go 100.00% <100.00%> (ø)
util/ibc/ibc.go 58.82% <ø> (ø)
util/sdkutil/events.go 0.00% <ø> (ø)
util/store/store.go 52.06% <ø> (+10.65%) ⬆️
util/store/unmarshal.go 42.85% <ø> (ø)
... and 40 more

... and 103 files with indirect coverage changes

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 11e542b and 20e296e.
Files selected for processing (1)
  • CHANGELOG.md (1 hunks)

CHANGELOG.md Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 20e296e and 5221e32.
Files selected for processing (1)
  • CHANGELOG.md (1 hunks)

@toteki toteki enabled auto-merge November 30, 2023 16:06
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 5221e32 and 2515126.
Files ignored due to filter (2)
  • swagger/swagger.yaml
  • x/leverage/types/query.pb.go
Files selected for processing (1)
  • proto/umee/leverage/v1/query.proto (1 hunks)

proto/umee/leverage/v1/query.proto Show resolved Hide resolved
@robert-zaremba robert-zaremba added the skip-e2e-test Skip the e2e tests label Dec 1, 2023
@toteki toteki added this pull request to the merge queue Dec 1, 2023
Merged via the queue into main with commit 0579b5e Dec 1, 2023
26 of 37 checks passed
@toteki toteki deleted the adam/inspect-error branch December 1, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-e2e-test Skip the e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants