Skip to content

Github Actions Improvements#594

Open
darklight3it wants to merge 6 commits intomainfrom
dmelfi/fix-testing-actions
Open

Github Actions Improvements#594
darklight3it wants to merge 6 commits intomainfrom
dmelfi/fix-testing-actions

Conversation

@darklight3it
Copy link
Contributor

@darklight3it darklight3it commented Mar 19, 2026

Issue #, if available:

N/A

Description of changes:

Fix multi-JDK test compatibility for UnsafeUtilTest and ClasspathLoaderTest in the Runtime Interface Client, and upgrade JUnit Jupiter from 5.9.2 to 5.14.3.

UnsafeUtilTest — testDisableIllegalAccessWarning:

  • The original test used setAccessible(true) (standard reflection) to verify a field that production code accesses via Unsafe — this broke on JDKs where the production code works fine.
  • Silently passed on JDK 8 and 17+ through catch blocks, so it was never actually testing anything.
  • Fix: replaced with Unsafe.getObjectVolatile/staticFieldOffset to mirror production code (no --add-opens needed), and added @EnabledForJreRange(min = JAVA_9, max = JAVA_16) since IllegalAccessLogger only exists on JDK 9-16.

ClasspathLoaderTest — testLoadAllClassesWithEmptyClasspath:

  • On JDK 25, new File("").exists() now returns true (resolves to cwd) due to JDK-8024695. This means ClasspathLoader no longer throws FileNotFoundException for an empty classpath entry — it hits the directory-skip path instead.
  • Fix: split into two JRE-ranged variants using @DisabledForJreRange(min = JAVA_25) / @EnabledForJreRange(min = JAVA_25).
  • Reference: JDK 25: Consistent Behavior of 'new File("")'

JUnit upgrade: 5.9.2 → 5.14.3 to get JRE.JAVA_25 enum support for precise test targeting.

Tests verified passing on JDK 8, 11, 17, and 21.

CI workflow improvements:

  • Restructured all 11 workflow files to follow "each workflow owns one module" philosophy with dependency-aware path triggers — when an upstream module changes, all downstream workflows trigger automatically.
  • Added JDK version matrix (8, 11, 17, 21, 25) to the RIC PR workflow.
  • Added Maven dependency caching (actions/cache) to all workflows.
  • Added workflow_dispatch to all workflows for manual triggering.

CI dependency graph for reference:

aws-lambda-java-core (no deps)
├── aws-lambda-java-log4j2
└── aws-lambda-java-runtime-interface-client (also depends on serialization)

aws-lambda-java-events (no deps)
├── aws-lambda-java-serialization
│   ├── aws-lambda-java-tests (also depends on events)
│   └── aws-lambda-java-runtime-interface-client (also depends on core)
├── aws-lambda-java-events-sdk-transformer
└── aws-lambda-java-tests (also depends on serialization)

samples (depends on events, serialization, tests)

Design principles:

  • Each workflow builds and tests exactly one module.
  • Each workflow triggers on changes to its own code and its upstream dependencies.
  • No workflow builds downstream modules — that's the downstream workflow's job.
  • All downstream workflows run in parallel when an upstream dependency changes.

Target (OCI, Managed Runtime, both):

Both

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@darklight3it darklight3it changed the title Github Actions Improvemtns Github Actions Improvements Mar 19, 2026
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.38%. Comparing base (ac9e6e4) to head (2c29a69).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #594   +/-   ##
=========================================
  Coverage     65.38%   65.38%           
  Complexity      211      211           
=========================================
  Files            34       34           
  Lines           988      988           
  Branches        142      142           
=========================================
  Hits            646      646           
  Misses          290      290           
  Partials         52       52           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@darklight3it darklight3it requested review from maxday and rarepolz March 20, 2026 00:21
@darklight3it darklight3it marked this pull request as ready for review March 20, 2026 00:21
@darklight3it darklight3it force-pushed the dmelfi/fix-testing-actions branch 2 times, most recently from 992cf9f to ad53eb0 Compare March 20, 2026 01:29
@darklight3it darklight3it force-pushed the dmelfi/fix-testing-actions branch from ad53eb0 to 4c81a80 Compare March 20, 2026 16:40
@darklight3it darklight3it self-assigned this Mar 20, 2026
ClasspathLoaderTest (JDK 25 split), UnsafeUtilTest (Unsafe.getObjectVolatile
rewrite), and the JDK version matrix in the RIC PR workflow are moved to the
dmelfi/improve-action-speed branch. This branch keeps only CI/workflow
improvements and the JUnit 5.14.3 upgrade.
@darklight3it darklight3it force-pushed the dmelfi/fix-testing-actions branch from 0b032a6 to 2c29a69 Compare March 22, 2026 13:15
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