feat: add CI workflow, linter configuration, and unit tests for ClickHouse Cloud check#1
Merged
Conversation
…House Cloud check
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds CI automation and developer tooling, and updates the ClickHouse Cloud check to improve log attribution by allowing a configurable service value in emitted log payloads.
Changes:
- Add GitHub Actions CI for Ruff linting/format checks and pytest runs across Python 3.10–3.12.
- Introduce Ruff configuration and dev dependency set for consistent linting and test execution.
- Add
cluster_nameconfiguration and use it as the Datadog logservicefield; update tests and example config accordingly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
Adds CI jobs for Ruff and pytest across multiple Python versions. |
.github/dependabot.yml |
Enables scheduled dependency update PRs for pip and GitHub Actions. |
requirements-dev.txt |
Adds dev/CI dependencies for running tests and linting locally/CI. |
ruff.toml |
Establishes Ruff lint/format configuration for the repo. |
checks/clickhouse_cloud.py |
Adds cluster_name config and uses it as log service; refactors formatting; updates log payload fields. |
conf.d/clickhouse_cloud.d/conf.yaml.example |
Documents cluster_name and includes a logs configuration example. |
tests/conftest.py |
Minor import ordering adjustments for tests. |
tests/test_logs.py |
Updates assertions and adds coverage for cluster_name service attribution; refactors some test constructs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces CI/CD automation, configuration improvements, and enhancements to log attribution for the ClickHouse Cloud integration. The most significant changes are the addition of GitHub Actions for continuous integration, improved configuration and documentation for log collection, and the ability to customize the Datadog "service" field for logs. Several code quality and test improvements are also included.
CI/CD and Tooling:
main. (.github/workflows/ci.yml).github/dependabot.yml)pytest,ruff,requests) torequirements-dev.txtand introduced a Ruff configuration for consistent linting and formatting. (requirements-dev.txt,ruff.toml) [1] [2]Configuration and Log Attribution Enhancements:
cluster_nameconfig option, allowing users to set the Datadog "service" field for logs (defaults to"clickhouse"), and updated log payloads to use this value. (checks/clickhouse_cloud.py,conf.d/clickhouse_cloud.d/conf.yaml.example) [1] [2] [3] [4]cluster_nameoption. (conf.d/clickhouse_cloud.d/conf.yaml.example) [1] [2]Code Quality and Style:
checks/clickhouse_cloud.py) [1] [2] [3]checks/clickhouse_cloud.py,tests/conftest.py,tests/test_logs.py) [1] [2] [3]Testing Improvements:
cluster_namebehavior, log payloads, and error handling. Refactored test code for clarity and conciseness. (tests/test_logs.py) [1] [2] [3] [4] [5] [6] [7] [8] [9]These changes collectively improve the maintainability, reliability, and configurability of the integration.