From 4215e7fe6231f78935231fd18cd539cc3aef0a24 Mon Sep 17 00:00:00 2001 From: Kiril Keranov <114745615+kiril-keranov@users.noreply.github.com> Date: Wed, 20 May 2026 16:35:26 +0300 Subject: [PATCH 1/4] Correct RUBY_VS_GO_BUILDPACK_COMPARISON.md --- RUBY_VS_GO_BUILDPACK_COMPARISON.md | 31 ++---------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/RUBY_VS_GO_BUILDPACK_COMPARISON.md b/RUBY_VS_GO_BUILDPACK_COMPARISON.md index 6fe683e55..3f84eb964 100644 --- a/RUBY_VS_GO_BUILDPACK_COMPARISON.md +++ b/RUBY_VS_GO_BUILDPACK_COMPARISON.md @@ -551,9 +551,9 @@ cf set-env myapp JBP_CONFIG_TOMCAT '{tomcat: {version: 10.1.+}}' cf set-env myapp JBP_CONFIG_TOMCAT '{external_configuration_enabled: true, external_configuration: {version: "1.0.0"}}' ``` -#### External Configuration: Different Approaches +#### External Configuration: -**Ruby Buildpack**: Runtime repository_root override ✅ +Both buildpacks support repository_root override ✅ ```bash # ✅ Works: Specify custom repository at runtime @@ -566,33 +566,6 @@ cf set-env myapp JBP_CONFIG_TOMCAT '{ }' ``` -**Implementation**: -```ruby -# Ruby buildpack fetches index.yml from repository_root at staging time -def compile - download(@version, @uri) { |file| expand file } # Downloads from repository_root -end -``` - -**Go Buildpack**: Manifest-only configuration ⚠️ - -```bash -# ❌ DOES NOT WORK: repository_root via environment variable not supported -cf set-env myapp JBP_CONFIG_TOMCAT '{external_configuration_enabled: true, ...}' -``` - -**Required approach**: -1. Fork buildpack -2. Add external configuration to `manifest.yml`: - ```yaml - dependencies: - - name: tomcat-external-configuration - version: 1.0.0 - uri: https://my-repo.example.com/tomcat-config-1.0.0.tar.gz - sha256: abc123... - cf_stacks: - - cflinuxfs4 - ``` 3. Package and upload custom buildpack **Why the difference**: Go buildpack prioritizes security (mandatory SHA256 verification) and reproducibility (same manifest = same configs) over runtime flexibility. From c85884b07b7e9ca3bc0bcc203315215ccb43c8b7 Mon Sep 17 00:00:00 2001 From: Kiril Keranov Date: Wed, 20 May 2026 17:17:02 +0300 Subject: [PATCH 2/4] Adjust docs --- RUBY_VS_GO_BUILDPACK_COMPARISON.md | 32 +++++++++++++----------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/RUBY_VS_GO_BUILDPACK_COMPARISON.md b/RUBY_VS_GO_BUILDPACK_COMPARISON.md index 3f84eb964..799729cce 100644 --- a/RUBY_VS_GO_BUILDPACK_COMPARISON.md +++ b/RUBY_VS_GO_BUILDPACK_COMPARISON.md @@ -1214,13 +1214,13 @@ func (s *SpringBootCLIContainer) Detect() (string, error) { ### 3.1 Cloud Foundry API Versions -| Aspect | Ruby (V2 API) | Go (V3 API) | -|--------|---------------|-------------| -| **Phases** | detect → compile → release | detect → supply → finalize | -| **Multi-buildpack** | Not supported (needs workarounds) | Native support (multiple supply phases) | +| Aspect | Ruby (V2 API) | Go (V3 API) | +|--------|---------------|--------------------------------------------| +| **Phases** | detect → compile → release | detect → supply → finalize -> release | +| **Multi-buildpack** | Not supported (needs workarounds) | Native support (multiple supply phases) | | **Entrypoints** | `bin/detect`, `bin/compile`, `bin/release` | `bin/detect`, `bin/supply`, `bin/finalize` | -| **State Management** | Droplet object (in-memory) | Files in `/deps//` (persistent) | -| **Caching** | `$CF_BUILDPACK_BUILDPACK_CACHE` | Same + `/deps//` for dependencies | +| **State Management** | Droplet object (in-memory) | Files in `/deps//` (persistent) | +| **Caching** | `$CF_BUILDPACK_BUILDPACK_CACHE` | Same + `/deps//` for dependencies | ### 3.2 Phase Responsibilities @@ -1696,8 +1696,6 @@ func (t *Tomcat) Supply() error { **Key difference**: The Go buildpack **initially forgot to use strip_components**, requiring helper functions like `findTomcatHome()`. The correct approach is to use `crush.Extract()` with `strip=1` parameter (similar to Ruby's `--strip 1`). -See detailed analysis: `/ruby_vs_go_buildpack_comparison.md` (the OLD document focuses on this specific issue). - ### 5.3 Caching Strategies | Aspect | Ruby Buildpack | Go Buildpack | @@ -1714,13 +1712,13 @@ See detailed analysis: `/ruby_vs_go_buildpack_comparison.md` (the OLD document f ### 6.1 Test Framework Comparison -| Aspect | Ruby Buildpack | Go Buildpack | -|--------|---------------|--------------| -| **Unit Test Framework** | RSpec | Go testing + Gomega assertions | -| **Integration Tests** | Separate repo (java-buildpack-system-test) | In-tree (src/integration/) | -| **Test Runner** | Rake tasks | Switchblade framework | -| **Platforms** | Cloud Foundry only | CF + Docker (with GitHub token) | -| **Total Tests** | ~300+ specs | ~100+ integration tests | +| Aspect | Ruby Buildpack | Go Buildpack | +|--------|---------------|---------------------------------------| +| **Unit Test Framework** | RSpec | Go testing + Gomega assertions | +| **Integration Tests** | Separate repo (java-buildpack-system-test) | In-tree (src/integration/) | +| **Test Runner** | Rake tasks | Switchblade framework | +| **Platforms** | Cloud Foundry only | CF + Docker (with GitHub token) | +| **Total Tests** | ~300+ specs | ~800+ integration tests | | **Test Apps** | External repo (java-test-applications) | Embedded in src/integration/testdata/ | ### 6.2 Test Organization @@ -2286,8 +2284,6 @@ The Go-based Java buildpack is a **production-ready, feature-complete** migratio ## Appendix B: Further Reading - **ARCHITECTURE.md** - Detailed Go buildpack architecture -- **comparison.md** - Component-by-component feature parity analysis -- **ruby_vs_go_buildpack_comparison.md** - OLD document (focused on dependency extraction only, outdated) - **docs/custom-jre-usage.md** - Guide for custom JRE repositories in Go buildpack - **docs/DEVELOPING.md** - Development workflow and testing - **docs/IMPLEMENTING_FRAMEWORKS.md** - Framework implementation guide @@ -2296,5 +2292,5 @@ The Go-based Java buildpack is a **production-ready, feature-complete** migratio --- **Document Version**: 1.0 -**Last Updated**: January 5, 2026 +**Last Updated**: May 20, 2026 **Authors**: Cloud Foundry Java Buildpack Team From 0b80ae8f7ee40fc6f74b04007d96b27520512e84 Mon Sep 17 00:00:00 2001 From: Kiril Keranov Date: Wed, 20 May 2026 17:31:06 +0300 Subject: [PATCH 3/4] Add cflinuxfs5 for some dependencies --- manifest.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manifest.yml b/manifest.yml index 4674a82fc..fc2c6b36b 100644 --- a/manifest.yml +++ b/manifest.yml @@ -399,6 +399,7 @@ dependencies: sha256: e024103719ffa99a011607942ecddfd91c5681113e6cea27f5514bc9fa172875 cf_stacks: - cflinuxfs4 + - cflinuxfs5 - name: mariadb-jdbc version: 3.5.8 uri: https://buildpacks.cloudfoundry.org/dependencies/mariadb-jdbc/mariadb-jdbc_3.5.8_linux_noarch_any-stack_6127dc78.jar @@ -592,7 +593,7 @@ dependencies: sha256: b3452d5ffbf0652e0f44958a5cb306a961906280102e5fa1a15840d2ddb6bcc1 cf_stacks: - cflinuxfs4 - - cflinuxfs3 + - cflinuxfs5 source: https://repo1.maven.org/maven2/org/cloudfoundry/tomcat-access-logging-support/3.4.0.RELEASE/tomcat-access-logging-support-3.4.0.RELEASE.jar source_sha256: b3452d5ffbf0652e0f44958a5cb306a961906280102e5fa1a15840d2ddb6bcc1 - name: tomcat-lifecycle-support @@ -601,7 +602,7 @@ dependencies: sha256: 3861d32a91b58302fa936d6f84354e1874f71e59dd97b003efcc992a5a6f3c47 cf_stacks: - cflinuxfs4 - - cflinuxfs3 + - cflinuxfs5 source: https://repo1.maven.org/maven2/org/cloudfoundry/tomcat-lifecycle-support/3.4.0.RELEASE/tomcat-lifecycle-support-3.4.0.RELEASE.jar source_sha256: 3861d32a91b58302fa936d6f84354e1874f71e59dd97b003efcc992a5a6f3c47 - name: tomcat-logging-support @@ -610,7 +611,7 @@ dependencies: sha256: 07de9efe8dda4c67dec6183ec1d59953abf1372cd71fe276fc4598739bd70667 cf_stacks: - cflinuxfs4 - - cflinuxfs3 + - cflinuxfs5 source: https://repo1.maven.org/maven2/org/cloudfoundry/tomcat-logging-support/3.4.0.RELEASE/tomcat-logging-support-3.4.0.RELEASE.jar source_sha256: 07de9efe8dda4c67dec6183ec1d59953abf1372cd71fe276fc4598739bd70667 - name: your-kit-profiler From 32c98a627caf1b0c8c525b180b81c9468d72228e Mon Sep 17 00:00:00 2001 From: Kiril Keranov Date: Wed, 20 May 2026 17:51:35 +0300 Subject: [PATCH 4/4] Adjust doc --- RUBY_VS_GO_BUILDPACK_COMPARISON.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/RUBY_VS_GO_BUILDPACK_COMPARISON.md b/RUBY_VS_GO_BUILDPACK_COMPARISON.md index 799729cce..3afc3e43c 100644 --- a/RUBY_VS_GO_BUILDPACK_COMPARISON.md +++ b/RUBY_VS_GO_BUILDPACK_COMPARISON.md @@ -566,10 +566,6 @@ cf set-env myapp JBP_CONFIG_TOMCAT '{ }' ``` -3. Package and upload custom buildpack - -**Why the difference**: Go buildpack prioritizes security (mandatory SHA256 verification) and reproducibility (same manifest = same configs) over runtime flexibility. - ### 2A.5 Access Logging Configuration #### Default Behavior: Disabled (Parity)