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(promql): parameterize lookback #3630

Merged

Conversation

etolbakov
Copy link
Collaborator

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

#3453

What's changed and what's your intention?

Parameterize lookback and allow it to propagate from TQL

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 Apr 2, 2024
Copy link
Contributor

@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.

Seems we need some integration tests.

Does this patch still need some changes on the parser side?

@etolbakov
Copy link
Collaborator Author

I think it's more or less ready.
Good point about an intergration test (I was planning to add sqlness as well).
Hopefully will push it in the end of this week

@etolbakov etolbakov marked this pull request as ready for review April 10, 2024 14:41
Copy link

codecov bot commented Apr 10, 2024

Codecov Report

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

Project coverage is 85.04%. Comparing base (8779524) to head (934bbcf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3630      +/-   ##
==========================================
- Coverage   85.38%   85.04%   -0.34%     
==========================================
  Files         963      963              
  Lines      160719   160730      +11     
==========================================
- Hits       137231   136700     -531     
- Misses      23488    24030     +542     

@etolbakov
Copy link
Collaborator Author

@waynexia @tisonkun
Could you please take a look when you have time?

@etolbakov etolbakov requested review from evenyag and a team as code owners April 11, 2024 07:53
Copy link
Contributor

@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.

Generally looks good. Suggest we convey to the HTTP endpoints so we don't leave more TODOs.

Copy link
Contributor

@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.

LGTM.

Further update gRPC codepath and lift step param in HTTP param can be follow-ups.

@etolbakov
Copy link
Collaborator Author

etolbakov commented Apr 12, 2024

Generally looks good. Suggest we convey to the HTTP endpoints so we don't leave more TODOs.

@tisonkun Thank you for the general feedback! I reflected on that and I'd like to spend a bit more time and deliver something useful rather then a half-baked solution.

As for grpc change I'll try making adjustment in greptime-proto repo

@tisonkun
Copy link
Contributor

@etolbakov Cool! You can ping me as a reviewer when you submit a patch there.

Cargo.toml Outdated Show resolved Hide resolved
src/client/src/database.rs Outdated Show resolved Hide resolved
@tisonkun
Copy link
Contributor

error: the lock file /home/runner/work/greptimedb/greptimedb/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.

@etolbakov you may update the lock file locally. This should be automatically updated if you're using VSCode or RustRover. Or you can run cargo build without --locked.

@tisonkun
Copy link
Contributor

Will this patch close #3453?

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

This is very neat, thanks @etolbakov 🚀

Let's merge this after CI passes.

src/servers/src/http/prometheus.rs Show resolved Hide resolved
@tisonkun tisonkun added this pull request to the merge queue Apr 15, 2024
Merged via the queue into GreptimeTeam:main with commit bbea651 Apr 15, 2024
19 checks passed
@etolbakov etolbakov deleted the feat-promql-parameterize-lookback branch April 19, 2024 05:12
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.

None yet

5 participants