Skip to content

Commit

Permalink
Add assertions to native-image layer build command
Browse files Browse the repository at this point in the history
  • Loading branch information
jormundur00 committed Oct 28, 2024
1 parent 6dab549 commit 200f706
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ni-layers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ jobs:
python-version: '${{ env.PYTHON_VERSION }}'
- name: Build layer
run: |
python3 ${{ env.LIBRARY_METADATA_PATH }}/build_native_image_layer.py ${{ env.GRAALVM_HOME }}/bin/native-image "${{ matrix.coordinates }}"
python3 ${{ env.LIBRARY_METADATA_PATH }}/build_native_image_layer.py ${{ env.GRAALVM_HOME }}/bin/native-image "${{ matrix.coordinates }}"
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ def build_layers(native_image_path, coordinates, delimiter):
os.chdir(library_path)
dependency_path = subprocess.check_output(['mvn', '-q', 'exec:exec', '-Dexec.executable=echo', '-Dexec.args=%classpath']).decode('utf-8').rstrip()
os.chdir(image_path)
command = [native_image_path, '-H:+UnlockExperimentalVMOptions', '-cp' ,f'{jar_path}:{dependency_path}', f'-H:LayerCreate=layer.nil,package={jar_path}', '-H:+ReportExceptionStackTraces', '--no-fallback' , '-o', f'{artifact_id}-{version}'] # Assertions currently excluded, see GR-57236
command = [native_image_path, '-J-ea', '-J-esa', '-H:+UnlockExperimentalVMOptions', '-cp' ,f'{jar_path}:{dependency_path}', f'-H:LayerCreate=layer.nil,package={jar_path}', '-H:+ReportExceptionStackTraces', '--no-fallback' , '-o', f'{artifact_id}-{version}']
print(f'Command: {' '.join(command)}')
subprocess.run(command)
subprocess.run(command, check=True)
os.chdir('..')

os.chdir(currDir)
Expand All @@ -125,4 +125,4 @@ def build_layers(native_image_path, coordinates, delimiter):
build_layers(sys.argv[1], sys.argv[2], delimiter)
else:
print("Error: Wrong number of arguments!")
sys.exit(1)
sys.exit(1)
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
{
"group_id": "io.quarkus",
"artifact_id": "quarkus-junit5",
"version": "3.14.2",
"version": "3.14.3",
"reason": "GR-57711"
},
{
Expand Down Expand Up @@ -212,7 +212,7 @@
{
"group_id": "io.opentelemetry",
"artifact_id": "opentelemetry-api",
"version": "1.42.0",
"version": "1.42.1",
"reason": "[Maven ERROR] Missing dependencies"
},
{
Expand Down Expand Up @@ -284,7 +284,7 @@
{
"group_id": "org.redisson",
"artifact_id": "redisson",
"version": "3.35.0",
"version": "3.36.0",
"reason": "Finishes generating, but requires user 'initialize-at-build-time' and 'initialize-at-run-time' input"
},
{
Expand All @@ -296,7 +296,7 @@
{
"group_id": "com.amazonaws",
"artifact_id": "aws-java-sdk",
"version": "1.12.771",
"version": "1.12.772",
"reason": "Finishes generating, but requires user 'initialize-at-build-time' and 'initialize-at-run-time' input"
},
{
Expand Down Expand Up @@ -502,5 +502,11 @@
"artifact_id": "jaxb-runtime",
"version": "4.0.5",
"reason": "GR-58503"
},
{
"group_id": "org.typelevel",
"artifact_id": "cats-effect_3",
"version": "3.6-0142603",
"reason": "GR-59420"
}
]

0 comments on commit 200f706

Please sign in to comment.