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

refactor: handle error for http format #3548

Merged
merged 6 commits into from
Mar 21, 2024

Conversation

tisonkun
Copy link
Collaborator

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

  1. Error response doesn't need a format header. Users should know the input and the actual format is always JSON.
  2. Thus tidy all other related code.
  3. Arrow format can output empty query with empty result.

Perhaps we can further tidy error handling code by impl <T: ErrorExt> From<T> for ErrorResponse, but this PR is large enough.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Mar 20, 2024
@tisonkun tisonkun force-pushed the handle-error-for-http-format branch from 4559171 to 0d8f5c1 Compare March 20, 2024 05:36
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

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

Project coverage is 84.98%. Comparing base (6377982) to head (d8e6597).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3548      +/-   ##
==========================================
- Coverage   85.36%   84.98%   -0.38%     
==========================================
  Files         910      910              
  Lines      152030   152022       -8     
==========================================
- Hits       129780   129203     -577     
- Misses      22250    22819     +569     

@tisonkun tisonkun force-pushed the handle-error-for-http-format branch from 0d8f5c1 to d8e6597 Compare March 20, 2024 05:38
Copy link
Member

@sunng87 sunng87 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@shuiyisong shuiyisong left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@shuiyisong shuiyisong added this pull request to the merge queue Mar 21, 2024
Merged via the queue into GreptimeTeam:main with commit 8b7a5aa Mar 21, 2024
19 checks passed
MichaelScofield pushed a commit to MichaelScofield/greptimedb that referenced this pull request Mar 22, 2024
* refactor: handle error for http format

Signed-off-by: tison <[email protected]>

* finish format handling

Signed-off-by: tison <[email protected]>

* simplify auth error

Signed-off-by: tison <[email protected]>

* fix

Signed-off-by: tison <[email protected]>

* clippy format

Signed-off-by: tison <[email protected]>

* no longer set greptime-db-format on influxdb error

Signed-off-by: tison <[email protected]>

---------

Signed-off-by: tison <[email protected]>
@tisonkun tisonkun deleted the handle-error-for-http-format branch May 3, 2024 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants