Skip to content

[CLI-3544] Only set consumer.interceptor.classes and producer.interceptor.classes for Confluent Platform 7.9 or lower#3086

Merged
Steven Gagniere (sgagniere) merged 1 commit intomainfrom
cli-3544
May 1, 2025
Merged

[CLI-3544] Only set consumer.interceptor.classes and producer.interceptor.classes for Confluent Platform 7.9 or lower#3086
Steven Gagniere (sgagniere) merged 1 commit intomainfrom
cli-3544

Conversation

@sgagniere
Copy link
Copy Markdown
Member

@sgagniere Steven Gagniere (sgagniere) commented Apr 26, 2025

Release Notes

Breaking Changes

  • PLACEHOLDER

New Features

  • PLACEHOLDER

Bug Fixes

  • confluent local services no longer sets consumer.interceptor.classes and producer.interceptor.classes configuration options by default when used with Confluent Platform 8.0

Checklist

  • I have successfully built and used a custom CLI binary, without linter issues from this PR.
  • I have clearly specified in the What section below whether this PR applies to Confluent Cloud, Confluent Platform, or both.
  • I have verified this PR in Confluent Cloud pre-prod or production environment, if applicable.
  • I have verified this PR in Confluent Platform on-premises environment, if applicable.
  • I have attached manual CLI verification results or screenshots in the Test & Review section below.
  • I have added appropriate CLI integration or unit tests for any new or updated commands and functionality.
  • I confirm that this PR introduces no breaking changes or backward compatibility issues.
  • I have indicated the potential customer impact if something goes wrong in the Blast Radius section below.
  • I have put checkmarks below confirming that the feature associated with this PR is enabled in:
    • Confluent Cloud prod
    • Confluent Cloud stag
    • Confluent Platform
    • Check this box if the feature is enabled for certain organizations only

What

For Confluent Platform.

These configs rely on a jar file that ships with Control Center, so we need to remove these configs when running with 8.0 (but keep them when running in 7.9 or lower).

Since we're using ZK for 7.9 or lower and KRaft for 8.0 and above, this PR implements this change by only setting these configs when running in ZK mode.

Blast Radius

This change is applied to the following local services: connect, kafka rest, ksql, and schema registry.

Blast radius should be minimal since these configuration options are optional.

References

Test & Review

Test results: https://docs.google.com/document/d/1ROkpDEMn_jcmLmnHFQ9dW6OvmS4cm9oV0a2W70JlunY/edit?usp=sharing

@confluent-cla-assistant
Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

@sonarqube-confluent
Copy link
Copy Markdown

Passed

Analysis Details

4 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 4 Code Smells

Coverage and Duplications

  • Coverage 100.00% Coverage (76.70% Estimated after merge)
  • Duplications No duplication information (0.00% Estimated after merge)

Project ID: cli

View in SonarQube

@sgagniere Steven Gagniere (sgagniere) marked this pull request as ready for review April 26, 2025 23:05
Copilot AI review requested due to automatic review settings April 26, 2025 23:05
@sgagniere Steven Gagniere (sgagniere) requested a review from a team as a code owner April 26, 2025 23:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adjusts the behavior of the CLI so that the monitoring interceptor configuration options are only set for services running on Confluent Platform 7.9 or lower (i.e. in Zookeeper mode).

  • Adds an extra condition to ensure interceptor configs are only applied in Zookeeper mode.
  • Updates the conditional in getConfig for services such as connect, kafka-rest, ksql-server, and schema-registry.
Comments suppressed due to low confidence (1)

internal/local/command_services.go:470

  • [nitpick] Consider extracting the overall condition into a well-named boolean variable (e.g. shouldSetInterceptors) to improve readability.
if isCP && slices.Contains([]string{"connect", "kafka-rest", "ksql-server", "schema-registry"}, service) && zookeeperMode {

@sgagniere Steven Gagniere (sgagniere) merged commit 0f528bb into main May 1, 2025
3 checks passed
@sgagniere Steven Gagniere (sgagniere) deleted the cli-3544 branch May 1, 2025 21:25
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.

3 participants