Skip to content

Comments

Fix GraalVM Dockerfile generation issues#842

Merged
anuruddhal merged 1 commit intoballerina-platform:masterfrom
anuruddhal:master
Mar 19, 2025
Merged

Fix GraalVM Dockerfile generation issues#842
anuruddhal merged 1 commit intoballerina-platform:masterfrom
anuruddhal:master

Conversation

@anuruddhal anuruddhal requested a review from Copilot March 19, 2025 04:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@anuruddhal anuruddhal merged commit 0705b4d into ballerina-platform:master Mar 19, 2025
2 checks passed
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.

3 participants