From 200f7060eb2c3afb54d43bed1d281fc5495b0b51 Mon Sep 17 00:00:00 2001 From: jvukicev Date: Mon, 28 Oct 2024 10:15:45 +0100 Subject: [PATCH] Add assertions to native-image layer build command --- .github/workflows/ni-layers.yml | 2 +- .../NILayerTests/build_native_image_layer.py | 6 +++--- .../excluded-popular-maven-libraries.json | 14 ++++++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ni-layers.yml b/.github/workflows/ni-layers.yml index 40edf3cda31d..f3a5f7ce5faf 100644 --- a/.github/workflows/ni-layers.yml +++ b/.github/workflows/ni-layers.yml @@ -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 }}" \ No newline at end of file + python3 ${{ env.LIBRARY_METADATA_PATH }}/build_native_image_layer.py ${{ env.GRAALVM_HOME }}/bin/native-image "${{ matrix.coordinates }}" diff --git a/vm/tests/gh_workflows/NILayerTests/build_native_image_layer.py b/vm/tests/gh_workflows/NILayerTests/build_native_image_layer.py index f4c6bd0baa0b..75dba900132e 100644 --- a/vm/tests/gh_workflows/NILayerTests/build_native_image_layer.py +++ b/vm/tests/gh_workflows/NILayerTests/build_native_image_layer.py @@ -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) @@ -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) \ No newline at end of file + sys.exit(1) diff --git a/vm/tests/gh_workflows/NILayerTests/excluded-popular-maven-libraries.json b/vm/tests/gh_workflows/NILayerTests/excluded-popular-maven-libraries.json index 0d2235c2512c..ed5456a2c4d8 100644 --- a/vm/tests/gh_workflows/NILayerTests/excluded-popular-maven-libraries.json +++ b/vm/tests/gh_workflows/NILayerTests/excluded-popular-maven-libraries.json @@ -104,7 +104,7 @@ { "group_id": "io.quarkus", "artifact_id": "quarkus-junit5", - "version": "3.14.2", + "version": "3.14.3", "reason": "GR-57711" }, { @@ -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" }, { @@ -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" }, { @@ -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" }, { @@ -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" } ]