Change Tomcat selection to be driven by manifest pin.#1181
Change Tomcat selection to be driven by manifest pin.#1181mshlyukarski wants to merge 1 commit intocloudfoundry:feature/go-migrationfrom
Conversation
Code ReviewThanks for this PR — the root cause is correctly identified and the fix is well-scoped. We also confirm we already had JDK-based Tomcat selection in place (the 🔴 Critical:
|
| Input | Expected output |
|---|---|
"" |
"" |
"{tomcat: { version: \"9.+\" }}" |
"9.x" |
"{access_logging_support: {access_logging: enabled}}" |
"" ← currently broken |
"{tomcat: {external_configuration_enabled: true}}" |
"" ← currently broken |
"{tomcat: { version: \"10.+\" }}" |
"10.x" |
✅ What the PR does well
- Correctly identifies and targets the root cause
- Minimal change — doesn't refactor unrelated code
- The fallback chain is preserved: explicit pin → JDK-based selection →
DefaultVersion - Integration tests are meaningful and test the right scenario
- Log message now consistently shows both Tomcat version and Java version
The fix is on the right track, but the DetermineTomcatVersion regex needs to be made precise before merge to avoid silently breaking users who set other JBP_CONFIG_TOMCAT options without a version pin.
Related to issue: #1155.