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(grpc): show additional error info from expression #1809

Merged
merged 4 commits into from
May 3, 2024

Conversation

meskill
Copy link
Contributor

@meskill meskill commented Apr 29, 2024

Summary:
Pass error extension info from grpc upstream in response. To make it mostly replace anyhow::Error with explicit EvaluationError and work with it

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh --mode=fix to fix all linting issues raised by ./lint.sh --mode=check.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly.
  • I have performed a self-review of my code.
  • PR follows the naming convention of <type>(<optional scope>): <title>

Summary by CodeRabbit

  • New Features
    • Enhanced error handling across various modules with the introduction of EvaluationError for more precise error tracking.
  • Bug Fixes
    • Improved consistency in error types returned by functions, ensuring uniformity in how errors are managed and reported.
  • Refactor
    • Updated several modules to use EvaluationError in function return types for more detailed and specific error reporting.
  • Documentation
    • Adjusted method signatures in documentation to reflect new error handling protocols.
  • Tests
    • Updated tests to handle new error types, ensuring robust error handling is maintained throughout the application.

@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Apr 29, 2024
Copy link
Contributor

coderabbitai bot commented Apr 29, 2024

Walkthrough

The updates across various files primarily focus on enhancing error handling by introducing a consistent use of EvaluationError. This change replaces the generic anyhow::Result with a more specific Result type that includes EvaluationError, improving clarity and error management. Additionally, there's a notable shift from using anyhow to async_graphql for error extensions in several files, aligning error handling strategies throughout the codebase.

Changes

Files Change Summary
src/blueprint/into_schema.rs Enhanced error handling using ErrorExtensions from async_graphql.
src/http/request_context.rs
src/lambda/cache.rs
src/lambda/concurrent.rs
src/lambda/eval.rs
src/lambda/expression.rs
src/lambda/io.rs
src/lambda/list.rs
src/lambda/logic.rs
src/lambda/math.rs
src/lambda/relation.rs
tests/expression_spec.rs
Updated to use EvaluationError in Result types for consistent error handling.
src/serde_value_ext.rs
tailcall-query-plan/src/resolver.rs
Adjusted error handling and return types for direct use and propagation.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Apr 29, 2024

Codecov Report

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

Project coverage is 89.42%. Comparing base (4ca53f9) to head (351ab32).

Files Patch % Lines
src/lambda/concurrent.rs 0.00% 3 Missing ⚠️
src/lambda/expression.rs 81.81% 2 Missing ⚠️
src/lambda/io.rs 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1809      +/-   ##
==========================================
+ Coverage   89.33%   89.42%   +0.09%     
==========================================
  Files         152      152              
  Lines       15365    15367       +2     
==========================================
+ Hits        13726    13742      +16     
+ Misses       1639     1625      -14     

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

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.

Actionable comments posted: 1

src/lambda/expression.rs Show resolved Hide resolved
Copy link

github-actions bot commented May 1, 2024

Action required: PR inactive for 2 days.
Status update or closure in 5 days.

@github-actions github-actions bot added state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. and removed state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. labels May 1, 2024
@tusharmath tusharmath enabled auto-merge (squash) May 3, 2024 11:10
@tusharmath tusharmath merged commit ca0a8bb into main May 3, 2024
30 of 31 checks passed
@tusharmath tusharmath deleted the fix/grpc-error branch May 3, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: fix Iterations on existing features or infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants