Skip to content
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

Document that system libraries are a reason to customize the builder and switch away from builder-jammy-java-tiny #43716

Closed
gbaso opened this issue Jan 7, 2025 · 2 comments
Labels
type: documentation A documentation update
Milestone

Comments

@gbaso
Copy link

gbaso commented Jan 7, 2025

Kafka Streams uses RocksDB to persist data into the state store, which requires system libraries for C/C++. libstdc++6 and libgcc-s1 are not provided by builder-jammy-java-tiny, which is the new default from Spring Boot 3.4, so any kafka streams application will crash at runtime when trying to access the state store for the first time.

Moreover, the HELP.md generated by the initializr references guides from 4(!) years ago, based on Spring Boot 2.4(!!).

Not only this creates a bad developer experience, where a simple app created by the initializr doesn't work out-of-the-box, the documentation is also unhelpful in guiding to a solution.

Reverting to builder-jammy-java-base solves the problem, but negates the benefits of having a slimmer image with a reduced attack surface (not having a shell in the image is the big one).

Creating a dedicated buildpack to add the C/C++ libraries cannot work because buildpacks are restricted to non-root and cannot install system dependencies. Creating a custom builder could work, but afaik it cannot be based on an existing builder, so you would need to maintain the whole builder and lose the peace of mind of having an official builder that keeps up with dependencies version upgrades.

Is there an easier solution to this conundrum?

@gbaso gbaso changed the title Default buildpack in 3.4 does not provide required dependencies for Kafka Streams Default paketo builder in 3.4 does not provide required dependencies for Kafka Streams Jan 7, 2025
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 7, 2025
@gbaso
Copy link
Author

gbaso commented Jan 7, 2025

Minimal reproducible sample: https://github.com/gbaso/spring-boot-43716

@wilkinsona wilkinsona changed the title Default paketo builder in 3.4 does not provide required dependencies for Kafka Streams Document that system libraries are a reason to customize the builder and switch away from builder-jammy-java-tiny Jan 8, 2025
@wilkinsona wilkinsona added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 8, 2025
@wilkinsona wilkinsona added this to the 3.4.x milestone Jan 8, 2025
@wilkinsona wilkinsona modified the milestones: 3.4.x, 3.4.2 Jan 8, 2025
@wilkinsona
Copy link
Member

wilkinsona commented Jan 8, 2025

I've updated the docs and the release notes to mention system libraries as a reason why it may be necessary to use the base or full builder rather than the tiny builder. I've also opened spring-io/start.spring.io#1695 to consider customizing the builder when Kafka Streams is selected.

Beyond this, things are out of Spring Boot's control. You may want to open issues in the appropriate places to see if the required libraries can be included in the tiny stack or if the Spring Cloud Stream samples can be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

3 participants