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: upgrade gradle spring boot and support openjdk versions #9623

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

alphanota
Copy link
Contributor

@alphanota alphanota commented Dec 19, 2024

Fixes: #nnn
Related: Relevant tracking issues, for context
Merge before/after: Dependent or prerequisite PRs

Description

The skaffold integration test TestRun is failing, here is an example error:


* What went wrong:
Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
> Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 [in thread "Daemon worker"]

Upgrading the gradle and sprint boot versions seem to solve this issue.

User facing changes (remove if N/A)

Follow-up Work (remove if N/A)

@alphanota alphanota requested a review from a team as a code owner December 19, 2024 19:22
@alphanota alphanota requested a review from mattsanta December 19, 2024 19:22
Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi team,

I'm currently reviewing this pull request and will have a full review ready in a few minutes. In the meantime, here's a quick summary to help you and other reviewers get up to speed:

This pull request aims to upgrade the Gradle Spring Boot version and enhance support for OpenJDK versions within the Skaffold integration examples. The changes are focused on updating dependencies and build configurations to ensure compatibility and leverage the latest features.

Here's a breakdown of the changes:

  • integration/examples/jib-sync/build.gradle: This file has been modified to upgrade the Spring Boot dependency from version 2.0.5.RELEASE to 2.6.15.
    • Line 3: id 'org.springframework.boot' version '2.0.5.RELEASE' changed to id 'org.springframework.boot' version '2.6.15'
    • Line 25: jib.from.image = 'openjdk:17' changed to jib.from.image = 'openjdk:23'
  • integration/examples/jib-sync/gradle/wrapper/gradle-wrapper.properties: The Gradle wrapper has been updated from version 5.6.4 to 8.10.
    • Line 3: distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip changed to distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip

These updates ensure that the example projects remain current and compatible with newer Java versions and Gradle releases. This should improve the overall build process and maintainability of the examples.


And now, a little haiku to lighten the mood:

Code flows like a stream,
Upgrades bring a fresh new spring,
Bugs flee in the breeze.

Best,
Gemini

Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request upgrades Gradle, Spring Boot, and the base OpenJDK version for the jib-sync example. Upgrading dependencies is good practice for maintaining security and leveraging new features. The changes look correct, but there are a few minor suggestions and some points to consider for future updates.

I've referenced the implicit style guide used in the project when making suggestions.

Summary of Changes & Recommendations:

  • Gradle Upgrade: Upgrading from 5.6.4 to 8.10 is a significant jump. Ensure thorough testing to catch any compatibility issues. Consider incrementally upgrading Gradle to intermediate versions first before jumping directly to 8.10. This can help isolate any potential issues.
  • Spring Boot Upgrade: Upgrading from 2.0.5 to 2.6.15 is also substantial. Verify all Spring Boot features used in the project still function as expected. Similar to the Gradle upgrade, consider a staged upgrade approach if feasible.
  • OpenJDK Upgrade: Moving from OpenJDK 17 to 23 is a good move. OpenJDK 23 is not an LTS release. Consider using OpenJDK 21 (LTS) for long-term support and stability.
  • Dependency Management Plugin: Align the Spring Boot and dependency management plugin versions for better compatibility. See the Spring Boot 2.6.15 documentation for the recommended version.
  • JIB Plugin: While updating dependencies, consider upgrading the JIB plugin to the latest version for potential performance improvements and bug fixes.
  • Documentation: Update the project's README or documentation to reflect the new dependency versions.
  • Testing: Add or update integration tests to ensure compatibility with the upgraded dependencies.

integration/examples/jib-sync/build.gradle Outdated Show resolved Hide resolved
integration/examples/jib-sync/build.gradle Outdated Show resolved Hide resolved
integration/examples/jib-sync/build.gradle Outdated Show resolved Hide resolved
integration/examples/jib-sync/build.gradle Outdated Show resolved Hide resolved
@alphanota alphanota requested a review from plumpy December 19, 2024 19:53
Copy link
Collaborator

@plumpy plumpy left a comment

Choose a reason for hiding this comment

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

Thanks!! I was trying to fix this myself too in #9622 because I thought my PR caused it. But my attempt at fixing it didn't work, so thanks for figuring this out!

Can you copy these changes over to skaffold/examples/jib-sync (which is basically just a copy of this directory)

integration/examples/jib-sync/build.gradle Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants