storage icon indicating copy to clipboard operation
storage copied to clipboard

feat: Clickhouse Storage Driver

Open luk3skyw4lker opened this issue 2 months ago • 11 comments

Adding clickhouse implementation, attending #1204 request

Summary by CodeRabbit

  • New Features

    • Introduced a Clickhouse storage driver for Go applications, enabling interaction with Clickhouse databases.
    • Added configuration options for Clickhouse database connections, including host, port, credentials, and table details.
  • Tests

    • Implemented tests for key operations such as setting, getting, and deleting data in Clickhouse.
    • Set up GitHub Actions workflows for automated testing of Clickhouse and Cloudflare KV projects.
  • Documentation

    • Updated README and configuration files to provide guidance on setting up and using the new Clickhouse storage driver.
  • Chores

    • Modified GitHub Actions workflows to enhance CI/CD processes, including adjustments in the triggering conditions for better automation.

luk3skyw4lker avatar Apr 09 '24 16:04 luk3skyw4lker

Walkthrough

This update introduces enhancements to Clickhouse storage driver for Go applications, including new configurations, GitHub workflows for testing and benchmarking, and improvements for seamless operation with ClickHouse and Cloudflare KV systems.

Changes

Files Summary
clickhouse/README.md, .../clickhouse.go, .../clickhouse_test.go Introduce Clickhouse storage driver for Go with functions for database operations and tests.
clickhouse/config.go Adds configuration handling for ClickHouse connections, including parameters and default settings.
.github/workflows/test-clickhouse.yml, .github/workflows/test-cloudflarekv.yml, .github/workflows/benchmark.yml Updates GitHub Actions workflows for testing Clickhouse and Cloudflare KV, and adds benchmarking steps.

🐇✨
In the burrow of code, new tunnels we weave,
Clickhouse connections, in Go, we achieve.
With tests and configs, so deftly spun,
Through GitHub Actions, our checks are run.
Hoppily crafting, under moon's soft gleams,
In the land of code, we chase our dreams. 🌙
🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Apr 09 '24 16:04 coderabbitai[bot]

Taking a look at the failing checks already

luk3skyw4lker avatar Apr 10 '24 16:04 luk3skyw4lker

@luk3skyw4lker The go.mod files are still broken. You edited the root one

gaby avatar Apr 11 '24 03:04 gaby

@gaby fixed it, sorry to take so long!

luk3skyw4lker avatar Apr 16 '24 17:04 luk3skyw4lker

@luk3skyw4lker The benchmark yml has to be updated to run clickhouse

gaby avatar Apr 17 '24 00:04 gaby

@gaby I added the clickhouse startup command, should be ok right now

luk3skyw4lker avatar Apr 18 '24 18:04 luk3skyw4lker

@gaby the latest commit should fix the error in the benchmark, I changed the clickhouse port to 9001

luk3skyw4lker avatar Apr 22 '24 14:04 luk3skyw4lker

@gaby the latest commit should fix the error in the benchmark, I changed the clickhouse port to 9001

Few comments, benchmarks are working now 💪

gaby avatar Apr 22 '24 14:04 gaby

I'm almost done with all the comments, probably will send some code by end of the week. Sorry to not do it sooner!

luk3skyw4lker avatar Apr 29 '24 19:04 luk3skyw4lker

@luk3skyw4lker Thanks!

gaby avatar Apr 30 '24 03:04 gaby

@luk3skyw4lker thanks, just ping us when you are done

ReneWerner87 avatar May 01 '24 15:05 ReneWerner87