Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move core configuration to @ConfigMapping #44079

Merged
merged 2 commits into from
Nov 14, 2024
Merged

Conversation

radcortez
Copy link
Member

@radcortez radcortez commented Oct 24, 2024

Copy link

quarkus-bot bot commented Oct 24, 2024

/cc @brunobat (opentelemetry), @gsmet (elasticsearch), @loicmathieu (elasticsearch), @marko-bekhta (elasticsearch), @yrodiere (elasticsearch)

Copy link

github-actions bot commented Oct 24, 2024

🙈 The PR is closed and the preview is expired.

@radcortez radcortez force-pushed the fix-42114 branch 2 times, most recently from 5c95a2c to a3f69aa Compare October 25, 2024 16:25
@radcortez radcortez marked this pull request as ready for review October 25, 2024 16:26

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@gsmet
Copy link
Member

gsmet commented Oct 28, 2024

@radcortez the failures look related.

BTW, maybe we could tackle #43149 at the same time, while we're at it?

@radcortez
Copy link
Member Author

Yes, I was already expecting something to fail, and I also wanted to implement #43149, which is why I added "not merge" in the description.

I'll complete this in the meantime.

@radcortez
Copy link
Member Author

Alternatively, we can hold the move of the related configuration, but I would prefer to disable the test :)

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@zakkak zakkak self-requested a review November 11, 2024 09:46
@zakkak
Copy link
Contributor

zakkak commented Nov 11, 2024

@radcortez I am on the road today, but I plan to test this PR and report back any potential changes in binary size (probably tomorrow or the day after). As discussed in #39748 (comment), the changes are not expected to have a huge impact but it's worth having a look before moving forward. Thank you.

For reference, this should also help us with #44312

@radcortez
Copy link
Member Author

@radcortez I am on the road today, but I plan to test this PR and report back any potential changes in binary size (probably tomorrow or the day after). As discussed in #39748 (comment), the changes are not expected to have a huge impact but it's worth having a look before moving forward. Thank you.

For reference, this should also help us with #44312

Sure. I'm also taking some measurements of RSS and startup time. There is a slight increase, but these are related to some additional checks that I'll address in a separate PR.

@zakkak
Copy link
Contributor

zakkak commented Nov 13, 2024

@radcortez I compared the results from a run of this PR (3f69fd3) versus a run based on 901675f

In terms of binary size I see that:

  • the image size increased in 173 builds and only decreased in 1.
  • the max image size increase is 3.14% (which translates to ~1.3MB) in picocli-native
  • the next most affected tests, in the ballpark of ~2% are vertx-graphql, test-extension, amazon-lambda and grpc-test-random
  • in total 53 binaries have an increased size > 1%

In terms of RSS usage at build time I see mixed results (which I attribute to noise) so I can't draw a conclusion out of them. The largest increase (10% or 330 MB) appears to be in resteasy-client-oidc-token-propagation, with the next interesting case being micrometer-prometheus with an increase of (8.4% or 595MB). On the other hand we can't really tell whether these differences are due to the changes in this PR or due to external factors, as I observe this kind of variations between runs in general (see below).

image

@radcortez
Copy link
Member Author

Thanks!

I guess that a slight increase in the image size may occur due to the following factors:

  • The old implementation uses a plain POJO, where the config logic to populate the values is a centralized piece that deals with all the details. We also generate some code for each POJO to handle a few specific cases. This code goes away when replaced with the new implementation.
  • The new implementation doubles the class usages (for each interface we generate an implementation)
  • Each implementation contains the logic to populate itself
  • Each implementation contains an equals and hashcode

So compared to the old approach, we are adding x2 classes, and each class contains and equals and hashcode with the populate code. Apparently, the delta between both does cause a slight increase in the native binary, but it may be possible to further optimize these. I already did some improvements here:

Regarding the RSS usage, I really have no idea what would be the cause. We are now extensively using mappings in a lot of other places and we never had such problem.

Copy link

quarkus-bot bot commented Nov 13, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 2afeda0.

✅ 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.

@gsmet
Copy link
Member

gsmet commented Nov 13, 2024

I think it would still be interesting to get a diff of the list of classes in the case of picocli-native to make sure it's expected and there's nothing we don't expect.

Copy link

quarkus-bot bot commented Nov 13, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 2afeda0.

✅ 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 Tests - JDK 17

📦 extensions/opentelemetry/deployment

io.quarkus.opentelemetry.deployment.metrics.HttpServerMetricsTest.collectsHttpRouteFromEndAttributes - History

  • Assertion condition defined as a Lambda expression in io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter expected: <true> but was: <false> within 5 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a Lambda expression in io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter expected: <true> but was: <false> within 5 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:790)
	at io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter.assertCountPointsAtLeast(InMemoryMetricExporter.java:131)
	at io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter_ClientProxy.assertCountPointsAtLeast(Unknown Source)
  • Assertion condition defined as a Lambda expression in io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter expected: <true> but was: <false> within 5 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a Lambda expression in io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter expected: <true> but was: <false> within 5 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:790)
	at io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter.assertCountPointsAtLeast(InMemoryMetricExporter.java:131)
	at io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter_ClientProxy.assertCountPointsAtLeast(Unknown Source)
  • Assertion condition defined as a Lambda expression in io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter expected: <true> but was: <false> within 5 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a Lambda expression in io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter expected: <true> but was: <false> within 5 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:790)
	at io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter.assertCountPointsAtLeast(InMemoryMetricExporter.java:131)
	at io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter_ClientProxy.assertCountPointsAtLeast(Unknown Source)

io.quarkus.opentelemetry.deployment.traces.OpenTelemetryReactiveRoutesTest.nonRoot - History

  • event executor terminated - java.util.concurrent.RejectedExecutionException
java.util.concurrent.RejectedExecutionException: event executor terminated
	at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:931)
	at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:350)
	at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:343)
	at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:833)
	at io.netty.util.concurrent.SingleThreadEventExecutor.execute0(SingleThreadEventExecutor.java:824)
	at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:814)
	at io.vertx.core.impl.EventLoopExecutor.execute(EventLoopExecutor.java:35)

📦 integration-tests/opentelemetry-vertx-exporter

io.quarkus.it.opentelemetry.vertx.exporter.grpc.SimpleGrpcWithTLSNoCompressionTest.test - History

  • No value present - java.util.NoSuchElementException
java.util.NoSuchElementException: No value present
	at java.base/java.util.Optional.get(Optional.java:143)
	at io.quarkus.it.opentelemetry.vertx.exporter.AbstractExporterTest.getMetric(AbstractExporterTest.java:145)
	at io.quarkus.it.opentelemetry.vertx.exporter.AbstractExporterTest.verifyMetrics(AbstractExporterTest.java:101)
	at io.quarkus.it.opentelemetry.vertx.exporter.AbstractExporterTest.test(AbstractExporterTest.java:53)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:966)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:816)

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Let's merge this as it's where we want to go.

We will need to make sure we improve things as much as possible though.

@gsmet gsmet merged commit 0e67055 into quarkusio:main Nov 14, 2024
55 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.18 - main milestone Nov 14, 2024
Copy link

quarkus-bot bot commented Nov 14, 2024

Milestone is already set for some of the items:

We haven't automatically updated the milestones for these items.

This message is automatically generated by a bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment