fix(elasticsearch): add compression to Elasticsearch output generation#3339
Conversation
Signed-off-by: Vitalii Parfonov <vparfono@redhat.com>
📝 WalkthroughWalkthroughThe Elasticsearch output generator now explicitly sets the sink's Compression field from the tuning configuration. A new test case with an expected TOML fixture verifies gzip compression is correctly applied alongside existing tuning settings. ChangesElasticsearch Compression Configuration
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/generator/vector/output/elasticsearch/elasticsearch.go`:
- Line 41: Elasticsearch tuning validation is too permissive because
ElasticsearchTuningSpec.Compression can be set to a value that Vector’s
Elasticsearch sink does not support. Update the Elasticsearch generator path in
the Elasticsearch output code, especially the logic that assigns s.Compression
in the Elasticsearch sink builder, so only none and gzip are accepted and any
other compression value is rejected or mapped before rendering. Ensure the
validation matches the sink’s supported CompressionType values and prevents
invalid compression from reaching the rendered configuration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8bebac39-9e07-4833-bbda-3af1c3543cd9
📒 Files selected for processing (3)
internal/generator/vector/output/elasticsearch/elasticsearch.gointernal/generator/vector/output/elasticsearch/elasticsearch_test.gointernal/generator/vector/output/elasticsearch/es_with_tune_and_compression.toml
|
/assign @jcantrill |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jcantrill, vparfonov The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@vparfonov: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
296d8c4
into
openshift:master
Description
/cc @Clee2691
/assign @jcantrill
Links
Summary by CodeRabbit
New Features
Tests