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: wrong handler implementation of prometheus remote write #3826

Merged
merged 2 commits into from
Apr 28, 2024

Conversation

waynexia
Copy link
Member

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?

To be honest, this part is awful. Four almost identical functions with only two booleans different.

I tried to refactor them with const generic but axum doesn't support function handler with const generic yet tokio-rs/axum#1265. Using macro is another option but given this part is not likely to change and macro is also not perfect to my perspective, I leave it as is and only fix the wrong param.

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.

@waynexia waynexia requested a review from a team as a code owner April 28, 2024 08:13
@waynexia waynexia added the C-bug Category Bugs label Apr 28, 2024
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 28, 2024
Copy link

codecov bot commented Apr 28, 2024

Codecov Report

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

Project coverage is 85.49%. Comparing base (f29aebf) to head (05a046d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3826      +/-   ##
==========================================
- Coverage   85.77%   85.49%   -0.29%     
==========================================
  Files         952      952              
  Lines      162629   162686      +57     
==========================================
- Hits       139492   139084     -408     
- Misses      23137    23602     +465     

Signed-off-by: Ruihang Xia <[email protected]>
Copy link
Collaborator

@tisonkun tisonkun 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!

@waynexia waynexia added this pull request to the merge queue Apr 28, 2024
Merged via the queue into GreptimeTeam:main with commit c0b9093 Apr 28, 2024
40 checks passed
@waynexia waynexia deleted the fix-prom-remote-write-routing branch April 28, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants