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: move database client to test #3820

Merged

Conversation

dimbtp
Copy link
Contributor

@dimbtp dimbtp commented Apr 27, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

Closes #3798

What's changed and what's your intention?

  • replace Database client in cli export
  • move Database to tests-integration

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.

@dimbtp dimbtp requested a review from a team as a code owner April 27, 2024 16:49
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 27, 2024
@dimbtp dimbtp marked this pull request as draft April 27, 2024 16:50
Cargo.toml Show resolved Hide resolved
src/client/src/client.rs Outdated Show resolved Hide resolved
src/cmd/src/cli.rs Show resolved Hide resolved
tests-integration/src/database.rs Show resolved Hide resolved
tests-integration/tests/grpc.rs Show resolved Hide resolved
tests/runner/src/env.rs Show resolved Hide resolved
@dimbtp dimbtp marked this pull request as ready for review April 27, 2024 17:26
@dimbtp
Copy link
Contributor Author

dimbtp commented Apr 27, 2024

@MichaelScofield PTAL

Copy link

codecov bot commented Apr 27, 2024

Codecov Report

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

Project coverage is 85.41%. Comparing base (e410192) to head (af71593).
Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3820      +/-   ##
==========================================
- Coverage   85.60%   85.41%   -0.19%     
==========================================
  Files         955      952       -3     
  Lines      163104   162881     -223     
==========================================
- Hits       139625   139127     -498     
- Misses      23479    23754     +275     

src/cmd/src/cli/export.rs Outdated Show resolved Hide resolved
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.

IIUC we'd letter use https://github.com/GreptimeTeam/greptimedb-ingester-rust.

Although we may not couple this patch with the migration to https://github.com/GreptimeTeam/greptimedb-ingester-rust, we can think of it.

Cargo.toml Show resolved Hide resolved
src/client/examples/logical.rs Outdated Show resolved Hide resolved
src/cmd/src/cli/export.rs Outdated Show resolved Hide resolved
tests-integration/src/database.rs Show resolved Hide resolved
src/client/src/client.rs Outdated Show resolved Hide resolved
@dimbtp
Copy link
Contributor Author

dimbtp commented Apr 29, 2024

@MichaelScofield It is ready for review, please take a look.

src/cmd/src/cli/export.rs Outdated Show resolved Hide resolved
src/cmd/src/error.rs Outdated Show resolved Hide resolved
src/cmd/src/cli/export.rs Outdated Show resolved Hide resolved
@MichaelScofield
Copy link
Collaborator

@tisonkun PTAL

@tisonkun tisonkun self-requested a review April 30, 2024 10: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.

Thank you! I'll try to delete methods unused in the Database struct.

For further development, I suppose we should make a utility to talk to the server in HTTP API and finally remove all these code. Because we're going to remove the Query variant in GreptimeRequest and most test purpose SQL should be able to run via HTTP API.

And ingestions depend on the Rust ingester library.

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.

The next step is replace Database with HTTP API, Rust ingester, or others.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun force-pushed the refactor/move-database-client-to-test branch from cd6f55a to af71593 Compare May 1, 2024 04:23
@tisonkun tisonkun enabled auto-merge May 1, 2024 05:54
@tisonkun tisonkun added this pull request to the merge queue May 1, 2024
Merged via the queue into GreptimeTeam:main with commit 3b89b9d May 1, 2024
23 checks passed
@dimbtp dimbtp deleted the refactor/move-database-client-to-test branch May 1, 2024 08:43
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.

Move internal grpc client to test crate
3 participants