Foundation: Java 21 baseline + migration status by devin-ai-integration[bot] · Pull Request #16 · hitomimimi/cloudstack · GitHub
Skip to content

Foundation: Java 21 baseline + migration status#16

Open
devin-ai-integration[bot] wants to merge 3 commits into
demo/java-21-foundation-v10from
devin/1778508309-java-21-foundation
Open

Foundation: Java 21 baseline + migration status#16
devin-ai-integration[bot] wants to merge 3 commits into
demo/java-21-foundation-v10from
devin/1778508309-java-21-foundation

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Description

This PR establishes the foundation for migrating Apache CloudStack from JDK 11 to JDK 21. It contains three atomic changes:

  1. JDK version bump (pom.xml): cs.jdk.version changed from 11 to 21.
  2. CI workflow updates (.github/workflows/):
    • build.yml: JDK 1721 in the setup-java step.
    • trigger-package-and-publish.yml: Added missing Apache License header; fixed trailing whitespace on the chmod line.
  3. Migration status document (JAVA_21_MIGRATION_STATUS.md): Module-by-module inventory (7,597+ Java files across 11 modules), deprecated API scan (263 hits across 9 categories), known blockers, effort estimates (12–18 dev-days), and a 6-phase rollout plan.

No application source code is modified. The build command in build.yml (mvn -B -P developer,systemvm -Dsimulator -DskipTests install) is intentionally unchanged.

Sandbox verification: 25 modules compiled successfully with OpenJDK 21.0.10 via mvn install -DskipTests -Dcheckstyle.skip=true -pl server -am.

Known blocker identified: cglib-nodep:3.3.0 is a compile dependency in engine/schema (via Spring). While Mockito-based unit tests pass (using ByteBuddy), cglib 3.3.0 is unmaintained (last release 2019) and poses a risk for Spring CGLIB proxy generation with JDK 21 class files (major version 65). A follow-up PR is needed to migrate to ByteBuddy.

Items for reviewer attention

  • pom.xml argLine (not changed in this PR): The existing flags include -noverify (ignored since JDK 13) and several --add-opens/--add-exports. These may need revisiting for JDK 21 in a follow-up.
  • Migration doc numbers: The deprecated API total is 263 from the combined regex scan, while the per-module column sums to 253. The difference comes from files in directories outside the listed modules (e.g., test/, developer/). Both numbers are from production code only (test directories excluded from scan).
  • Other CI workflows (ci.yml, codecov.yml, sonar-check.yml) still reference JDK 17 but are gated by github.repository == 'apache/cloudstack' and won't execute on this fork.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

BUILD SUCCESS — 25 modules compiled with JDK 21:

BUILD SUCCESS screenshot

Unit test verification — engine/schema VMInstanceDaoImplTest (9/9 passed):

Test result screenshot

How Has This Been Tested?

  • Sandbox build: mvn install -DskipTests -Dcheckstyle.skip=true -pl server -am with OpenJDK 21.0.10 — BUILD SUCCESS (25 modules, ~64s).
  • Unit test: mvn test -pl engine/schema -Dtest=VMInstanceDaoImplTest -Dcheckstyle.skip=true — 9 tests passed.
  • CI: GitHub Actions build.yml workflow with JDK 21.

How did you try to break this feature and the system with this change?

  • Ran the cglib-dependent DAO test (VMInstanceDaoImplTest) to verify whether cglib 3.3.0 causes Unsupported class file major version 65 errors. Tests passed (Mockito uses ByteBuddy), but cglib remains a compile dependency and a runtime risk — documented in the migration status.

Link to Devin session: https://app.devin.ai/sessions/ade9c90352034c45b5fd8251bd45eade
Requested by: @hitomimimi

devin-ai-integration Bot and others added 3 commits May 11, 2026 14:06
Co-Authored-By: hitomi.sawamura@gmail.com <hitomi.sawamura@gmail.com>
… issues

Co-Authored-By: hitomi.sawamura@gmail.com <hitomi.sawamura@gmail.com>
Co-Authored-By: hitomi.sawamura@gmail.com <hitomi.sawamura@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

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.

1 participant