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 tests/common #4057

Conversation

sunng87
Copy link
Member

@sunng87 sunng87 commented May 27, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

Resolves dependencies issue introduced in #3820

What's changed and what's your intention?

This patch extract database.rs to standalone module to avoid introducing whole dependency tree of tests-integration.

Also it removes dependency from benchmarks which is obsolete.

Checklist

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

@sunng87 sunng87 requested review from MichaelScofield and a team as code owners May 27, 2024 18:32
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label May 27, 2024
@@ -61,7 +61,7 @@ url = "2.3"

[dev-dependencies]
chrono.workspace = true
client = { workspace = true, features = ["testing"] }
Copy link
Member Author

Choose a reason for hiding this comment

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

another question about this: because we already have testing feature in client, is it really necessary to move database.rs out of client?

Copy link
Member Author

Choose a reason for hiding this comment

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

and we do have only one testing function in client for which we can't remove testing from client at the moment.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree we can move this struct to client crate behind the testing feature.

IIRC previously it's in the client crate without testing feature in control.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can close this one, revert #3820, and create a new patch to feature-gate database.rs

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah. This is possible. Would you follow these changes?

Copy link

codecov bot commented May 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.10%. Comparing base (097f62f) to head (fb51741).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4057      +/-   ##
==========================================
- Coverage   85.41%   85.10%   -0.31%     
==========================================
  Files         985      985              
  Lines      170616   170616              
==========================================
- Hits       145724   145205     -519     
- Misses      24892    25411     +519     

@sunng87 sunng87 closed this May 27, 2024
@tisonkun
Copy link
Collaborator

I'm manually reverting this. The related files changed a bit .

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.

2 participants