Skip to content

Conversation

zakkak
Copy link
Contributor

@zakkak zakkak commented May 15, 2025

Closes: #47762

Copy link
Contributor

@Copilot 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 adds support for an additional native image build argument property, "quarkus.native.additional-build-args-append", along with documentation updates and test coverage.

  • Updates the AsciiDoc file to explain the new property and its intended usage.
  • Introduces a new method in the NativeConfig interface and corresponding tests.
  • Modifies the native image build step to incorporate the newly added property.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
docs/src/main/asciidoc/building-native-image.adoc Updates documentation to explain both additional-build-args and additional-build-args-append.
core/deployment/src/test/java/io/quarkus/deployment/pkg/TestNativeConfig.java Adds a new test method for additional-build-args-append.
core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java Modifies build steps to iterate over both additional build args properties.
core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java Introduces a new interface method for additional-build-args-append.
Comments suppressed due to low confidence (1)

core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java:1066

  • Using a raw array for Optionals may lead to type safety warnings; consider using a List of Optionals (e.g. List<Optional<List>>) to improve clarity and type safety.
Optional<List<String>>[] additionalBuildArgs = new Optional[] { nativeConfig.additionalBuildArgs(), nativeConfig.additionalBuildArgsAppend() };

[TIP]
====
You can provide custom options for the `native-image` command using the `<quarkus.native.additional-build-args>` property.
You can provide custom options for the `native-image` command using the `quarkus.native.additional-build-args` and `quarkus.native.additional-build-args-append` properties.
Copy link

Copilot AI May 15, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a brief example of how to use the new quarkus.native.additional-build-args-append property on the command line in this documentation section to aid users in understanding its usage.

Copilot uses AI. Check for mistakes.

private void handleAdditionalProperties(List<String> command) {
if (nativeConfig.additionalBuildArgs().isPresent()) {
List<String> strings = nativeConfig.additionalBuildArgs().get();
Optional<List<String>>[] additionalBuildArgs = new Optional[] { nativeConfig.additionalBuildArgs(),
Copy link
Contributor

@geoand geoand May 15, 2025

Choose a reason for hiding this comment

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

Optional<List<String>>[] is quite the type 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes :), even co-pilot noticed it (for different reasons though).

See "Comments suppressed due to low confidence (1)" in #47883 (review)

Copy link

quarkus-bot bot commented May 15, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 54cbe3a.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

github-actions bot commented May 15, 2025

🙈 The PR is closed and the preview is expired.

@zakkak zakkak added the triage/waiting-for-ci Ready to merge when CI successfully finishes label May 15, 2025
Copy link

quarkus-bot bot commented May 15, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 54cbe3a.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Integration Tests - JDK 17

📦 integration-tests/opentelemetry

io.quarkus.it.opentelemetry.LoggingResourceTest.testException - History

  • Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.it.opentelemetry.LoggingResourceTest.testException(LoggingResourceTest.java:113)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)

⚙️ JVM Integration Tests - JDK 21

📦 integration-tests/opentelemetry

io.quarkus.it.opentelemetry.LoggingResourceTest.testException - History

  • Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.it.opentelemetry.LoggingResourceTest.testException(LoggingResourceTest.java:113)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)

📦 integration-tests/opentelemetry-grpc-only

io.quarkus.it.opentelemetry.grpc.HelloGrpcClientTest.testHello - History

  • java.lang.RuntimeException: Failed to start quarkus - java.lang.RuntimeException
java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:667)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:762)
	at java.base/java.util.Optional.orElseGet(Optional.java:364)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)

@zakkak
Copy link
Contributor Author

zakkak commented May 15, 2025

CI failures are unrelated.

@zakkak zakkak merged commit ddd0ebc into quarkusio:main May 15, 2025
60 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.24 - main milestone May 15, 2025
@zakkak zakkak deleted the 2025-05-15-implement-47762 branch May 15, 2025 16:46
@quarkus-bot quarkus-bot bot added kind/enhancement New feature or request and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow "appending" quarkus.native.additional-build-args

2 participants