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: migrate feeds to use clickhouse client #3963

Merged
merged 1 commit into from Nov 6, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented Nov 6, 2023

What does this PR do?

🤖 Generated by Copilot at 665058f

This pull request updates the feeds worker to use the new @hey/clickhouse package for querying clickhouse data. This improves the performance and reliability of the feed algorithms and simplifies the configuration of the environment variables and the deployment. The old clickhouse REST client and the related code and files are removed.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

🤖 Generated by Copilot at 665058f

  • Replace the old clickhouse REST client with the new clickhouse TCP client from the @hey/clickhouse package (link, link)
  • Import the createClickhouseClient function from the @hey/clickhouse package in the algorithm files (link, link)
  • Delete the clickhouseQuery function that was a wrapper around the old REST client (link, link, link)
  • Update the heyMostInteracted and heyMostViewed algorithms to use the new clickhouse client and the JSONEachRow format for the query results (link, link, link)
  • Update the Env interface and the wrangler.toml file to use the CLICKHOUSE_PASSWORD environment variable instead of the CLICKHOUSE_REST_ENDPOINT (link, link)
  • Update the example file for the feeds worker to use the CLICKHOUSE_PASSWORD environment variable (link)

Emoji

🔐🚀📦

Copy link

height bot commented Nov 6, 2023

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link

vercel bot commented Nov 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview Nov 6, 2023 5:27am
web ✅ Ready (Inspect) Visit Preview Nov 6, 2023 5:27am

@bigint bigint merged commit 7ab25c6 into main Nov 6, 2023
6 of 9 checks passed
@bigint bigint deleted the migrate-feeds-to-ch-client branch November 6, 2023 05:23
@vercel vercel bot temporarily deployed to Preview – prerender November 6, 2023 05:23 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant