Skip to content

feat: custom version for Kafka #1171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 18, 2025
Merged

Conversation

dervoeti
Copy link
Member

Description

Part of #1068

This PR enables custom versions (with a suffix like -stackable0.0.0-dev) for Kafka.

In the SBOM, the custom version is replaced by the original one (using sed), so vulnerabilities filed directly against Kafka are still detected by scanners when scanning the SBOM.

I built Kafka 3.9.0, tested it with the smoke test and manually validated that it reported the correct version.

Definition of Done Checklist

Note

Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant.

Please make sure all these things are done and tick the boxes

  • Changes are OpenShift compatible
  • All added packages (via microdnf or otherwise) have a comment on why they are added
  • Things not downloaded from Red Hat repositories should be mirrored in the Stackable repository and downloaded from there
  • All packages should have (if available) signatures/hashes verified
  • Add an entry to the CHANGELOG.md file
  • Integration tests ran successfully
TIP: Running integration tests with a new product image

The image can be built and uploaded to the kind cluster with the following commands:

bake --product <product> --image-version <stackable-image-version>
kind load docker-image <image-tagged-with-the-major-version> --name=<name-of-your-test-cluster>

See the output of bake to retrieve the image tag for <image-tagged-with-the-major-version>.

@dervoeti dervoeti self-assigned this Jun 13, 2025
@dervoeti dervoeti changed the title feat: support custom product versions feat: custom version for Kafka Jun 13, 2025
@dervoeti dervoeti moved this to Development: Waiting for Review in Stackable Engineering Jun 13, 2025
@razvan razvan self-requested a review June 17, 2025 14:14
@razvan razvan moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Jun 17, 2025
Copy link
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

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

Have you thought of any possibility to integrate the version patching in patchable?

This would ensure reproducibility outside the docker build and allow for a dev to check that the version update is actually correct.

@dervoeti
Copy link
Member Author

Have you thought of any possibility to integrate the version patching in patchable?

This would ensure reproducibility outside the docker build and allow for a dev to check that the version update is actually correct.

I thought about that as well, but didn't find a good solution yet. But now that I think about it again... I could create a patch file that appends -stackable0.0.0-dev to all the versions and then replace that placeholder with -stackable${RELEASE} before building Kafka. Maybe that's better, it would still require replacing before running Gradle, but could just replace -stackable0.0.0-dev across all files. So at least we'd have separate patch files for each Kafka version which adapt the original version in different source files (which files exactly can depend on the Kafka version), that would be an improvement. Currently the files that get changed are static for all Kafka versions. And you get the final source code for the dev build when running patchable checkout.
I could implement that, I think it would improve things.

@razvan
Copy link
Member

razvan commented Jun 18, 2025

I could implement that, I think it would improve things.

So do you still want this PR merged as is first?

@dervoeti
Copy link
Member Author

I could implement that, I think it would improve things.

So do you still want this PR merged as is first?

No, I'll adapt it later today

@dervoeti dervoeti force-pushed the feat/custom-product-versions-kafka branch from 10b9e70 to 856c6ab Compare June 18, 2025 11:18
@dervoeti dervoeti force-pushed the feat/custom-product-versions-kafka branch from 856c6ab to b06732c Compare June 18, 2025 11:19
@dervoeti
Copy link
Member Author

@razvan I updated the process now, seems to work

Copy link
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

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

lgtm assuming the hive patch in this pr was intentional :)

@dervoeti dervoeti added this pull request to the merge queue Jun 18, 2025
@dervoeti
Copy link
Member Author

lgtm assuming the hive patch in this pr was intentional :)

The Hive patch was already merged in main, I just rebased it into this PR

Merged via the queue into main with commit fd6d61f Jun 18, 2025
3 checks passed
@dervoeti dervoeti deleted the feat/custom-product-versions-kafka branch June 18, 2025 12:17
@dervoeti dervoeti moved this from Development: In Review to Development: Done in Stackable Engineering Jun 19, 2025
@lfrancke lfrancke moved this from Development: Done to Done in Stackable Engineering Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants