Skip to content

Conversation

@ppatierno
Copy link
Member

@ppatierno ppatierno commented Jan 14, 2026

This PR adds the support for Apache Kafka 4.2.0.
Apart the usual changes, it has a change in:

  • KafkaConfigModelGenerator by removing the usage of the MetadataVersionValidator class because it was actually removed from Apache Kafka 4.2.0 codebase. Such validator wasn't needed since 4.0.0 (when ZooKeeper was removed) but it was still in the Apache Kafka codebase. It was used as validator for config fields like inter.broker.protocol.version and log.message.format.version that doesn't exist anymore since Apache Kafka 4.x.
  • several classes where the MetadataVersion.fromVersionString method is called with a second boolean unstableFeatureVersionsEnabled parameter. We are passing false for that because we don't want to include non production ready versions checks (i.e. we don't want that in our codebase the 4.3 version can be used as a valid version until it's production ready and release).
  • ConnectCluster used by ITs. Apache Kafka 4.2.0 doesn't allow a plugin.path to be empty. It can be null (not set) but not empty as we have been setting. The change leaves the possibility to set the plugin.path but in general we are not setting it for our tests.
  • ConfigModel to handle the validation for config parameters which are empty lists which now show up in the JSON model after a change in Apache Kafka 4.2.0. It also adds a check for non duplicates and non empty values in such lists. More details in the comment below Add support Apache Kafka 4.2.0 #12315 (comment)
  • test CruiseControlST.testCruiseControlRemoveDisksMode was fixed because the log segment deletion after partitions movement is asynchronous and we need to wait for it not just checking the disk size at the end of the rebalancing because the log segment would be still there and test fails (related to https://issues.apache.org/jira/browse/KAFKA-19571 backported into Apache Kafka 4.2.0 RC3)

@ppatierno ppatierno added this to the 0.51.0 milestone Jan 14, 2026
@ppatierno
Copy link
Member Author

Using this PR in an early stage to test the Apache Kafka 4.2.0 RCs

@ppatierno
Copy link
Member Author

ppatierno commented Jan 16, 2026

The failing tests within KafkaConnectApiIT :

[ERROR] Errors: 
[ERROR] io.strimzi.operator.cluster.operator.assembly.KafkaConnectApiIT.test
[ERROR]   Run 1: KafkaConnectApiIT.test » Completion java.lang.AssertionError: 
Expected: is "sink"
     but: was "SINK"
[ERROR]   Run 2: KafkaConnectApiIT.test » Completion java.lang.AssertionError: 
Expected: is "sink"
     but: was "SINK"
[ERROR]   Run 3: KafkaConnectApiIT.test » Completion java.lang.AssertionError: 
Expected: is "sink"
     but: was "SINK"

seem to be related to a regression in Apache Kafka. I opened a JIRA https://issues.apache.org/jira/browse/KAFKA-20076 and a PR to fix it apache/kafka#21318. I also raised this in the voting thread so I would expect a RC1 to continue testing.

@ppatierno ppatierno force-pushed the add-support-kafka-4.2.0 branch from a45d725 to ab2a7af Compare January 19, 2026 17:36
@ppatierno ppatierno force-pushed the add-support-kafka-4.2.0 branch from cfdbb84 to aa23f8c Compare January 20, 2026 12:47
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.99%. Comparing base (1b5fe72) to head (4a9d8b5).

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12315      +/-   ##
============================================
- Coverage     75.02%   74.99%   -0.03%     
  Complexity     6660     6660              
============================================
  Files           373      373              
  Lines         25385    25391       +6     
  Branches       3411     3414       +3     
============================================
- Hits          19044    19043       -1     
- Misses         4954     4957       +3     
- Partials       1387     1391       +4     
Files with missing lines Coverage Δ
...o/strimzi/operator/cluster/model/KafkaCluster.java 92.31% <100.00%> (ø)
...luster/operator/assembly/KRaftMetadataManager.java 96.07% <100.00%> (ø)
...ava/io/strimzi/kafka/config/model/ConfigModel.java 82.83% <100.00%> (+0.80%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ppatierno
Copy link
Member Author

/gha run pipeline=regression,upgrade

@github-actions
Copy link

github-actions bot commented Jan 20, 2026

⏳ System test verification started: link

The following 10 job(s) will be executed:

  • regression-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operands-arm64 (oracle-vm-8cpu-32gb-arm64)
  • upgrade-azp_kraft_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kafka_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kraft_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)
  • upgrade-azp_kafka_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

❌ System test verification failed: link

@ppatierno
Copy link
Member Author

/gha run pipeline=regression,upgrade

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

⏳ System test verification started: link

The following 10 job(s) will be executed:

  • regression-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operands-arm64 (oracle-vm-8cpu-32gb-arm64)
  • upgrade-azp_kraft_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kafka_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kraft_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)
  • upgrade-azp_kafka_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

❌ System test verification failed: link

@ppatierno
Copy link
Member Author

/gha run pipeline=regression-fg

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

⏳ System test verification started: link

The following 6 job(s) will be executed:

  • regression-fg-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-fg-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-fg-operands-arm64 (oracle-vm-8cpu-32gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

❌ System test verification failed: link

@github-actions
Copy link

❌ System test verification failed: link

@ppatierno
Copy link
Member Author

ppatierno commented Jan 22, 2026

The failing tests within DynamicConfSharedST and SecurityST :

io.strimzi.operator.common.model.InvalidResourceException: Kafka test-suite-namespace/cluster-46464747 has invalid spec.kafka.config: ssl.enabled.protocols contains values [TLSv1.1] which are not in the allow │              
   at io.strimzi.operator.cluster.model.KafkaCluster.validateConfiguration(KafkaCluster.java:581) 

Are all related to a change made in Kafka 4.2.0 where some broker configurations with LIST type, let's take ssl.enabled.protocols as an example, were changed in their definition by adding something like ConfigDef.ValidList.anyNonDuplicateValues(true, false).
With this validator, now the corresponding JSON model contains the "items" field (which was not before because null without a validator) but it's an empty array now (because it's what Kafka returns) like:

"ssl.enabled.protocols" : {
  "items" : [ ],
  "scope" : "PER_BROKER",
  "type" : "LIST"
}

but then the validation logic in the operator fails because doesn't handle empty lists.

The mentioned anyNonDuplicateValues() validator also adds two checks that didn't exist before: no duplicates (so "TLSv1.2,TLSv1.2" is now invalid) and no empty individual values ("TLSv1.2,,TLSv1.3" is now invalid) but it still allows ANY protocol names.
The PR fixes the handling of an empty list as well together with the two above checks as well.

@ppatierno
Copy link
Member Author

/gha run pipeline=regression,upgrade

@github-actions
Copy link

github-actions bot commented Jan 22, 2026

⏳ System test verification started: link

The following 10 job(s) will be executed:

  • regression-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operands-arm64 (oracle-vm-8cpu-32gb-arm64)
  • upgrade-azp_kraft_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kafka_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kraft_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)
  • upgrade-azp_kafka_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

🎉 System test verification passed: link

@ppatierno
Copy link
Member Author

/gha run pipeline=regression-fg

@github-actions
Copy link

github-actions bot commented Jan 22, 2026

⏳ System test verification started: link

The following 6 job(s) will be executed:

  • regression-fg-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-fg-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-fg-operands-arm64 (oracle-vm-8cpu-32gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

🎉 System test verification passed: link

@ppatierno
Copy link
Member Author

/gha run pipeline=regression,upgrade

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

⏳ System test verification started: link

The following 10 job(s) will be executed:

  • regression-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operands-arm64 (oracle-vm-8cpu-32gb-arm64)
  • upgrade-azp_kraft_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kafka_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kraft_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)
  • upgrade-azp_kafka_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

🎉 System test verification passed: link

@ppatierno
Copy link
Member Author

/gha run pipeline=regression-fg

@github-actions
Copy link

github-actions bot commented Jan 28, 2026

⏳ System test verification started: link

The following 6 job(s) will be executed:

  • regression-fg-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-fg-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-fg-operands-arm64 (oracle-vm-8cpu-32gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

❌ System test verification failed: link

@ppatierno
Copy link
Member Author

/gha run tests=CruiseControlST#testAutoKafkaRebalanceScaleUpScaleDown

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

⏳ System test verification started: link

The following 1 job(s) will be executed:

  • custom-all-amd64 (ubuntu-latest)

Tests will start after successful build completion.

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

🎉 System test verification passed: link

@ppatierno
Copy link
Member Author

ppatierno commented Feb 6, 2026

Failed tests are for the testAutoKafkaRebalanceScaleUpScaleDown and related to #11296. I am looking into the issue to fix it in main and porting into this branch as well.
It's fixed by #12395. Once it's merged, I will rebase and restart regressions.

@ppatierno ppatierno force-pushed the add-support-kafka-4.2.0 branch from 09b7938 to 75ac81b Compare February 7, 2026 16:42
@ppatierno
Copy link
Member Author

/gha run pipeline=regression,upgrade

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

⏳ System test verification started: link

The following 10 job(s) will be executed:

  • regression-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operands-arm64 (oracle-vm-8cpu-32gb-arm64)
  • upgrade-azp_kraft_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kafka_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kraft_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)
  • upgrade-azp_kafka_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

🎉 System test verification passed: link

@ppatierno
Copy link
Member Author

/gha run pipeline=regression-fg

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

⏳ System test verification started: link

The following 6 job(s) will be executed:

  • regression-fg-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-fg-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-fg-operands-arm64 (oracle-vm-8cpu-32gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

🎉 System test verification passed: link

Signed-off-by: Paolo Patierno <[email protected]>
Added validation check for non empty values and not duplicates in list
parameters

Signed-off-by: Paolo Patierno <[email protected]>
Signed-off-by: Paolo Patierno <[email protected]>
@ppatierno ppatierno force-pushed the add-support-kafka-4.2.0 branch from 75ac81b to 02dc2db Compare February 10, 2026 15:35
@ppatierno
Copy link
Member Author

/gha run pipeline=regression,upgrade

@github-actions
Copy link

github-actions bot commented Feb 10, 2026

⏳ System test verification started: link

The following 10 job(s) will be executed:

  • regression-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operands-arm64 (oracle-vm-8cpu-32gb-arm64)
  • upgrade-azp_kraft_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kafka_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kraft_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)
  • upgrade-azp_kafka_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

🎉 System test verification passed: link

@ppatierno
Copy link
Member Author

/gha run pipeline=regression-fg

@github-actions
Copy link

github-actions bot commented Feb 11, 2026

⏳ System test verification started: link

The following 6 job(s) will be executed:

  • regression-fg-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-fg-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-fg-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-fg-operands-arm64 (oracle-vm-8cpu-32gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

🎉 System test verification passed: link

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