Fix GraalVM Dockerfile generation issues#842
Merged
anuruddhal merged 1 commit intoballerina-platform:masterfrom Mar 19, 2025
Merged
Fix GraalVM Dockerfile generation issues#842anuruddhal merged 1 commit intoballerina-platform:masterfrom
anuruddhal merged 1 commit intoballerina-platform:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses GraalVM Dockerfile generation issues by updating the native-image command flags and base images used in both the plugin code and its tests.
- Replaces the deprecated "-H:Name=" flag with the new "-o" flag in Docker command constructions.
- Updates Docker base image references from "gcr.io/distroless/base" to "gcr.io/distroless/cc".
- Adjusts test assertions to reflect the updated Docker command and image references.
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| compiler-plugin/src/main/java/io/ballerina/c2c/utils/KubernetesUtils.java | Updated Docker command builder from "-H:Name=" to "-o". |
| compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/docker/DockerGeneratorTests.java | Modified test assertions to check for the updated command flag and base image. |
| compiler-plugin/src/main/java/io/ballerina/c2c/DockerGenConstants.java | Changed runtime base image constant to "gcr.io/distroless/cc". |
| compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/samples/NativeTest.java | Changed container/port retrieval to use "getFirst()" and updated command string check. |
| compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/samples/NativeJobTest.java | Updated Docker command and base image assertions to use new references. |
| compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/samples/NativeImplicitArgsTest.java | Updated Docker build command to use "-o" flag instead of "-H:Name=". |
| compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/samples/NativeBaseTest.java | Revised Dockerfile assertions to match updated base image and command format. |
| examples/graalvm-custom-builder/Cloud.toml | Updated custom builder command to use "-o" flag as well. |
| compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/samples/NativeBuilderConfigTest.java | Altered assertions for Docker command and runtime image in builder config tests. |
| compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/samples/NativeArgsTest.java | Adjusted Docker command tests to check for the new flag format. |
Files not reviewed (1)
- docker-images/native-builder/build-native.sh: Language not supported
tharindu-nw
approved these changes
Mar 19, 2025
keizer619
approved these changes
Mar 19, 2025
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.
Purpose