Feature/java21#52
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request upgrades Forge’s runtime/tooling baseline to Java 21 + Gradle 8.8 and aligns build/CI, Docker, and infrastructure configuration with that modernization, while also adjusting footprint handling code to be more testable.
Changes:
- Upgraded Java/Gradle across the build (Gradle wrapper + toolchains), Docker image, and GitHub Actions workflows.
- Refactored
FootprintHandlerenv access (added getters) and updated tests to use a real writable output path. - Modernized Terraform provider declarations to the
source =syntax.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
terraform/main.tf |
Updates provider declarations to modern Terraform provider source syntax. |
src/test/java/gov/nasa/podaac/forge/FootprintHandlerTest.java |
Adjusts footprint handler tests to use a writable temporary output file path. |
src/main/java/gov/nasa/podaac/forge/FootprintHandler.java |
Adds env-var getter methods and routes output config usage through them. |
README.md |
Updates local runtime requirement to Java 21. |
gradle/wrapper/gradle-wrapper.properties |
Upgrades Gradle wrapper distribution to 8.8. |
docker/Dockerfile |
Moves base image to Corretto 21 and updates bundled Gradle/CMA versions. |
CHANGELOG.md |
Documents the Java 21 modernization in Unreleased notes. |
build.gradle |
Migrates build to Java 21 toolchains, refreshes dependencies/plugins, and updates tasks/reporting config for Gradle 8+. |
.github/workflows/release-created.yml |
Updates release-branch automation to JDK 21 and newer Gradle action. |
.github/workflows/build.yml |
Updates CI to JDK 21/Gradle 8.8 and refreshes action versions. |
.github/workflows/add-to-project.yml |
Refreshes action versions for project automation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+51
to
+65
| // 1. Initialize the temp folder | ||
| tempFolder.create(); | ||
|
|
||
| @Test | ||
| public void testPerformFunctionURL() throws Exception { | ||
| ClassLoader classLoader = getClass().getClassLoader(); | ||
|
|
||
| // 1. Handle Inputs (Existing logic) | ||
| File inputJsonFile = new File(classLoader.getResource("input.json").getFile()); | ||
| inputMessageStr = new String(Files.readAllBytes(inputJsonFile.toPath())); | ||
| String inputMessageStr = new String(Files.readAllBytes(inputJsonFile.toPath())); | ||
|
|
||
| File granuleFile = new File(classLoader.getResource("20200101152000-JPL-L2P_GHRSST-SSTskin-MODIS_A-D-v02.0-fv01.0.nc").getFile()); | ||
| File configFile = new File(classLoader.getResource("MODIS_A-JPL-L2P-v2019.0.cfg").getFile()); | ||
| File outputFile = new File(classLoader.getResource("footprint.txt").getFile()); | ||
| granuleFilePath = granuleFile.getAbsolutePath(); | ||
| cfgFilePath = configFile.getAbsolutePath(); | ||
| outputFootprintFilePath = outputFile.getAbsolutePath(); | ||
|
|
||
| // 2. FIX: Create a real, writable path for the output instead of a resource | ||
| File tempOutputFile = tempFolder.newFile("footprint.txt"); | ||
| String outputFootprintFilePath = tempOutputFile.getAbsolutePath(); |
Comment on lines
+12
to
+17
| aws = { | ||
| source = "hashicorp/aws" | ||
| } | ||
| null = { | ||
| source = "hashicorp/null" | ||
| } |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jamesfwood
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #51
This pull request upgrades the project from Java 11 to Java 21 and updates related dependencies, build tools, and CI/CD workflows accordingly. It also improves test reliability by fixing file path handling in tests and modernizes the Docker and Gradle configurations. Below are the most important changes grouped by theme:
Java and Gradle Upgrade:
README.md,CHANGELOG.md) to reflect these requirements. [1] [2] [3] [4] [5] [6] [7]CI/CD and Workflow Modernization:
actions/checkout,actions/setup-java,gradle/actions/setup-gradle,docker/build-push-action,hashicorp/setup-terraform,actions/add-to-project,actions/github-script,ncipollo/release-action) for improved reliability and compatibility. [1] [2] [3] [4] [5] [6]Code Improvements and Test Reliability:
FootprintHandlerto add getter methods for environment variables and updated internal usage for better maintainability and testability. [1] [2]FootprintHandlerTestby usingTemporaryFolderto create real, writable temporary files instead of relying on resource files, making tests more robust and portable. [1] [2]Docker and Dependency Updates:
amazoncorretto:11toamazoncorretto:21, upgraded the Cumulus Message Adapter, and ensured Gradle and related paths are consistent with the new version. [1] [2] [3]Terraform Provider Modernization: