Skip to content

Conversation

@katheris
Copy link
Member

@katheris katheris commented Oct 9, 2025

Type of change

Select the type of your PR

  • Enhancement / new feature

Description

Add version field to KafkaConnector and KafkaMirrorMaker2 CR. This implements proposal #118

Checklist

Please go through this checklist and make sure all applicable tasks have been done

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Check RBAC rights for Kubernetes / OpenShift roles
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Reference relevant issue(s) and close them after merging
  • Update CHANGELOG.md
  • Supply screenshots for visual changes, such as Grafana dashboards

.onComplete(reconciliationResult -> {
// Extract warning conditions from reconciliation
List<Condition> warningConditions = kafkaMirrorMaker2Status.getConditions();
StatusUtils.setStatusConditionAndObservedGeneration(kafkaMirrorMaker2, kafkaMirrorMaker2Status, reconciliationResult.cause());
Copy link
Member Author

@katheris katheris Oct 9, 2025

Choose a reason for hiding this comment

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

Here the call to setStatusConditionAndObservedGeneration overwrites any of the conditions set in the status previously. Since in a future release the connector.plugin.version will be added to the forbidden list I decided not to add an additional method to StatusUtils to add the status condition and observed generation. Instead storing and adding the warning afterwards means we can more easily remove this new code when it is no longer needed.

We could of course change this behaviour to properly handle any status that has been set, but that is out of scope for this particular issue.

@katheris katheris force-pushed the 11009-multiple-connector-versions branch from 0f47387 to 9895074 Compare October 9, 2025 14:22
@katheris katheris force-pushed the 11009-multiple-connector-versions branch from 9895074 to 3fc343d Compare October 9, 2025 16:30
@katheris katheris added this to the 0.49.0 milestone Oct 9, 2025
@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.94%. Comparing base (089ecbb) to head (6b0d909).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
...ter/operator/assembly/AbstractConnectOperator.java 91.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12002      +/-   ##
============================================
+ Coverage     74.90%   74.94%   +0.03%     
- Complexity     6441     6448       +7     
============================================
  Files           343      343              
  Lines         24324    24337      +13     
  Branches       3196     3200       +4     
============================================
+ Hits          18221    18239      +18     
+ Misses         4829     4826       -3     
+ Partials       1274     1272       -2     
Files with missing lines Coverage Δ
...tor/cluster/model/KafkaMirrorMaker2Connectors.java 90.71% <100.00%> (+0.06%) ⬆️
...or/assembly/KafkaMirrorMaker2AssemblyOperator.java 86.09% <100.00%> (+0.22%) ⬆️
...ter/operator/assembly/AbstractConnectOperator.java 85.35% <91.66%> (+0.08%) ⬆️

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

@katheris
Copy link
Member Author

katheris commented Oct 9, 2025

/azp run regression

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

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

Some nits. LGTM otherwise.

CHANGELOG.md Outdated
* The `.spec.build.output.additionalKanikoOptions` field in the `KafkaConnect` custom resource is deprecated and will be removed in the future.
* Use `.spec.build.output.additionalBuildOptions` field instead.
* Kafka nodes are now configured with PEM certificates instead of P12/JKS for keystore and truststore.
* Configuring `connector.plugin.version` under `spec.config` in the `KafkaConnector` custom resource, and under `spec.mirrors[].sourceConnector.config`, `spec.mirrors[].checkpointConnector.config`, and `spec.mirrors[].heartbeatConnector.config` in the `KafkaMirrorMaker2` custom resource is deprecated and will be forbidden in the future.
Copy link
Member

Choose a reason for hiding this comment

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

Should you say right away that it will be forbidden from Strimzi 0.50 on?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah good point, I'll update it

CHANGELOG.md Outdated
* Use `.spec.build.output.additionalBuildOptions` field instead.
* Kafka nodes are now configured with PEM certificates instead of P12/JKS for keystore and truststore.
* Configuring `connector.plugin.version` under `spec.config` in the `KafkaConnector` custom resource, and under `spec.mirrors[].sourceConnector.config`, `spec.mirrors[].checkpointConnector.config`, and `spec.mirrors[].heartbeatConnector.config` in the `KafkaMirrorMaker2` custom resource is deprecated and will be forbidden in the future.
* Use `spec.version` in the `KafkaConnecter` custom resource, and `spec.mirrors[].sourceConnector.version`, `spec.mirrors[].checkpointConnector.version`, and `spec.mirrors[].heartbeatConnector.version` in the `KafkaMirrorMaker2` custom resource.
Copy link
Member

Choose a reason for hiding this comment

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

Would it be more readable as a single bullet point?

Suggested change
* Use `spec.version` in the `KafkaConnecter` custom resource, and `spec.mirrors[].sourceConnector.version`, `spec.mirrors[].checkpointConnector.version`, and `spec.mirrors[].heartbeatConnector.version` in the `KafkaMirrorMaker2` custom resource.
Use `spec.version` in the `KafkaConnecter` custom resource, and `spec.mirrors[].sourceConnector.version`, `spec.mirrors[].checkpointConnector.version`, and `spec.mirrors[].heartbeatConnector.version` in the `KafkaMirrorMaker2` custom resource.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure, it's quite a wall of text so the bullet point helps to distinguish the part that's deprecated from the new advice. Do you think we need to have the full description of the new fields? Does this make it more readable:

Suggested change
* Use `spec.version` in the `KafkaConnecter` custom resource, and `spec.mirrors[].sourceConnector.version`, `spec.mirrors[].checkpointConnector.version`, and `spec.mirrors[].heartbeatConnector.version` in the `KafkaMirrorMaker2` custom resource.
* Use `spec.version` in the `KafkaConnecter` custom resource, and the connector specific `version` fields in the `KafkaMirrorMaker2` custom resource.

Copy link
Member

Choose a reason for hiding this comment

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

TBH, I think too much formatting in the CHANGELOG makes it much harder to read as it makes it harder to process what the different changes are and what is part of the same change. Especially when you see it as raw markdown. That is why I see the second-level bullet point as a distraction rather than something that helps the readability.


I think the shorter description is fine over the long one. I understand that adding the version field to the MM2 connectors makes sense in the long term for symmetry with KafkaConnector. But we do not expect today any environments with different versions of the MM2 connectors, as they are built-in. So I think the MM2 part of this is mostly irrelevant and can be reduced to minimal text like this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was viewing in preview rather than raw markdown, but regardless I'm happy with removing the bullet point with the shorter text, so I've updated it. Take a look and see if that looks better

@scholzj scholzj added this to Roadmap Oct 12, 2025
@scholzj scholzj moved this to 0.49.0 (Work in Progress) in Roadmap Oct 12, 2025
The version fields are not expected to be used much in the
KafkaMirrorMaker2 CR since the connectors are part of the
Connect image already. Also the heartbeat connector is
being removed from the KafkaMirrorMaker2 CR. As a result
it seems unnecessary to fully list the new fields for
KafkaMirrorMaker2 CR.

Signed-off-by: Kate Stanley <[email protected]>
Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@katheris katheris merged commit cce6139 into strimzi:main Oct 13, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 0.49.0 (Work in Progress)

Development

Successfully merging this pull request may close these issues.

3 participants