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

Fix #1027: properly detect new mysql connector #1028

Merged

Conversation

anthonydahanne
Copy link
Contributor

  • Mysql connector was renamed recently from mysql-connector-java to mysql-connector-j, and needs to be detected by the buildpack
  • Rephrase documentation to make it more obvious that if a maria db client or mysql connector exist, the buildpack should not add its own mariadb connector

@anthonydahanne
Copy link
Contributor Author

@pivotal-david-osullivan : tested with spring-music:

cf push -b java_buildpack_offline
[...]
Staging app and tracing logs...
   Downloading java_buildpack_offline...
   Downloaded java_buildpack_offline
   Cell e298fb9e-bbf1-4fab-82f4-73173334b79e creating container for instance cf7f4cc8-539c-47b0-8fde-d95a231a55fc
   Security group rules were updated
   Cell e298fb9e-bbf1-4fab-82f4-73173334b79e successfully created container for instance cf7f4cc8-539c-47b0-8fde-d95a231a55fc
   Downloading build artifacts cache...
   Downloading app package...
   Downloaded build artifacts cache (132B)
   Downloaded app package (59.2M)
   -----> Java Buildpack v4.60.0 (offline) | https://github.com/cloudfoundry/java-buildpack#9f8aba60
   -----> Downloading Jvmkill Agent 1.17.0_RELEASE from https://java-buildpack.cloudfoundry.org/jvmkill/jammy/x86_64/jvmkill-1.17.0-RELEASE.so (found in cache)
   -----> Downloading Open Jdk JRE 17.0.7_7 from https://java-buildpack.cloudfoundry.org/openjdk/jammy/x86_64/bellsoft-jre17.0.7%2B7-linux-amd64.tar.gz (found in cache)
   Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (4.0s)
   JVM DNS caching disabled in lieu of BOSH DNS caching
   -----> Downloading Open JDK Like Memory Calculator 3.13.0_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/jammy/x86_64/memory-calculator-3.13.0-RELEASE.tar.gz (found in cache)
   Loaded Classes: 28526, Threads: 250
   -----> Downloading Client Certificate Mapper 1.11.0_RELEASE from https://java-buildpack.cloudfoundry.org/client-certificate-mapper/client-certificate-mapper-1.11.0-RELEASE.jar (found in cache)
   -----> Downloading Container Security Provider 1.20.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-security-provider/container-security-provider-1.20.0-RELEASE.jar (found in cache)
   -----> Downloading Maria Db JDBC 2.7.9 from https://java-buildpack.cloudfoundry.org/mariadb-jdbc/mariadb-jdbc-2.7.9.jar (found in cache)

and then with:

 cf push -b https://github.com/anthonydahanne/java-buildpack.git\#fix-1027-mysql-name
[...]
Staging app and tracing logs...
   Cell 8cc5b721-601c-491e-b02f-39956e5cd18b creating container for instance a948622c-c196-4571-827f-9681f6b27907
   Security group rules were updated
   Cell 8cc5b721-601c-491e-b02f-39956e5cd18b successfully created container for instance a948622c-c196-4571-827f-9681f6b27907
   Downloading app package...
   Downloading build artifacts cache...
   Downloaded build artifacts cache (132B)
   Downloaded app package (59.2M)
   -----> Java Buildpack 2445d65 | https://github.com/anthonydahanne/java-buildpack.git#2445d65
   -----> Downloading Jvmkill Agent 1.17.0_RELEASE from https://java-buildpack.cloudfoundry.org/jvmkill/jammy/x86_64/jvmkill-1.17.0-RELEASE.so (0.1s)
   -----> Downloading Open Jdk JRE 17.0.8_7 from https://java-buildpack.cloudfoundry.org/openjdk/jammy/x86_64/bellsoft-jre17.0.8%2B7-linux-amd64.tar.gz (0.7s)
   Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.7s)
   JVM DNS caching disabled in lieu of BOSH DNS caching
   -----> Downloading Open JDK Like Memory Calculator 3.13.0_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/jammy/x86_64/memory-calculator-3.13.0-RELEASE.tar.gz (0.1s)
   Loaded Classes: 28526, Threads: 250
   -----> Downloading Client Certificate Mapper 1.11.0_RELEASE from https://java-buildpack.cloudfoundry.org/client-certificate-mapper/client-certificate-mapper-1.11.0-RELEASE.jar (0.0s)
   -----> Downloading Container Security Provider 1.20.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-security-provider/container-security-provider-1.20.0-RELEASE.jar (0.3s)

In both cases, the app was running fine, except in the first case the injected MariaDB connector was injected

* Mysql connector was renamed recently from mysql-connector-java to mysql-connector-j, and needs to be detected by the buildpack
* Rephrase documentation to make it more obvious that if a maria db client or mysql connector exist, the buildpack should not add its own mariadb connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants