Skip to content

fix(elasticsearch): add compression to Elasticsearch output generation#3339

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
vparfonov:log9634
Jul 7, 2026
Merged

fix(elasticsearch): add compression to Elasticsearch output generation#3339
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
vparfonov:log9634

Conversation

@vparfonov

@vparfonov vparfonov commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

/cc @Clee2691
/assign @jcantrill

Links

Summary by CodeRabbit

  • New Features

    • Elasticsearch output now respects compression settings, including gzip, when generating sink configuration.
    • Added support for generated Elasticsearch configuration with tuning plus compression enabled.
  • Tests

    • Expanded coverage for Elasticsearch output generation to verify the new compression-enabled configuration.

Signed-off-by: Vitalii Parfonov <vparfono@redhat.com>
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The 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.

Changes

Elasticsearch Compression Configuration

Layer / File(s) Summary
Sink compression wiring and test verification
internal/generator/vector/output/elasticsearch/elasticsearch.go, internal/generator/vector/output/elasticsearch/elasticsearch_test.go, internal/generator/vector/output/elasticsearch/es_with_tune_and_compression.toml
Sets s.Compression from o.GetTuning().Compression in the sink constructor, adds a new test case with Compression: "gzip" and tlsSpec, and adds the expected generated TOML fixture with a remap transform and full elasticsearch sink configuration.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested labels: lgtm

Suggested reviewers: cahartma

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description has the required sections and commands, but it lacks a real summary of the change and most link fields are empty. Add a concise implementation/context summary and fill in the related PR, issue, or proposal links.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding compression to Elasticsearch output generation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot requested review from Clee2691 and alanconway July 7, 2026 16:08

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between bd1f2f4 and 23037e9.

📒 Files selected for processing (3)
  • internal/generator/vector/output/elasticsearch/elasticsearch.go
  • internal/generator/vector/output/elasticsearch/elasticsearch_test.go
  • internal/generator/vector/output/elasticsearch/es_with_tune_and_compression.toml

Comment thread internal/generator/vector/output/elasticsearch/elasticsearch.go
@vparfonov

Copy link
Copy Markdown
Contributor Author

/assign @jcantrill

@jcantrill

Copy link
Copy Markdown
Contributor

/approve
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2026
@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 7, 2026
@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@vparfonov: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-using-bundle 23037e9 link false /test e2e-using-bundle

Full PR test history. Your PR dashboard.

Details

Instructions 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.

@openshift-merge-bot openshift-merge-bot Bot merged commit 296d8c4 into openshift:master Jul 7, 2026
9 of 10 checks passed
@vparfonov vparfonov deleted the log9634 branch July 7, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release/6.6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants