Skip to content

Merge 4.9.x #11866

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

Merged
merged 37 commits into from
Jun 15, 2025
Merged

Merge 4.9.x #11866

merged 37 commits into from
Jun 15, 2025

Conversation

yawkat
Copy link
Member

@yawkat yawkat commented Jun 14, 2025

Please don't squash :)

micronaut-build and others added 30 commits June 9, 2025 16:43
…tor` (#11809)

Adds a new API `TypeElementQuery` to limit visitation of elements in the type element visitor API
* gradel 8.14.2

* Fix test suite name

See https://docs.gradle.org/current/userguide/upgrading_version_8.html#changes_to_test_report_aggregation_and_jacoco_aggregation

---------

Co-authored-by: Cedric Champeau <cedric.champeau@gmail.com>
Match behavior of HTTP/1 PipeliningServerHandler.

I tried making a test, but IdleStateHandler does not have a hook for time, so it's not possible without extending test runtime further than I want.
The refresh endpoint doesn't work for `@EachProperty` beans. This means that datasource properties are not refreshed from the `/refresh` endpoint and other periodic refresh mechanisms. The reason this is broken is because:

* The `@ConfigurationProperties` stereotype is used instead of `@ConfigurationReader`
* The each property prefix is not handled
* The `inject` method of the bean context doesn't set the path.
* reproducer verifier error

* Fix boxing

* update to non-vulnerable netty versions

---------

Co-authored-by: Denis Stepanov <denis.s.stepanov@oracle.com>
* Add configurable active keys for environment endpoint (#11799)

* Update management/src/test/groovy/io/micronaut/management/endpoint/env/EnvironmentEndpointSpec.groovy

* Update management/src/test/groovy/io/micronaut/management/endpoint/env/EnvironmentEndpointSpec.groovy

* Update management/src/test/groovy/io/micronaut/management/endpoint/env/EnvironmentEndpointSpec.groovy

* Update management/src/test/groovy/io/micronaut/management/endpoint/env/EnvironmentEndpointSpec.groovy

* Update management/src/test/groovy/io/micronaut/management/endpoint/env/EnvironmentEndpointSpec.groovy

* Update management/src/test/groovy/io/micronaut/management/endpoint/env/EnvironmentEndpointSpec.groovy

* Update management/src/test/groovy/io/micronaut/management/endpoint/env/EnvironmentEndpointSpec.groovy

* Update src/main/docs/guide/management/providedEndpoints/environmentEndpoint.adoc

* Update src/main/docs/guide/management/providedEndpoints/environmentEndpoint.adoc

* Update src/main/docs/guide/management/providedEndpoints/environmentEndpoint.adoc

* active-key case

* default EnvironmentEndpointConfiguration

* make it private

* use active-keys not activeKeys

* use The active-keys instead of activeKeys

* use correct yaml list

---------

Co-authored-by: Sergio del Amo <sergio.delamo@softamo.com>
…ll are Secondary (#11766)

* improve error message

* fix compile + add test

* also assert message
One from OSS-Fuzz, one from manual debugging. Latter has no test case because it's apparently a race condition.
Files are already in test-suite/src/main/java
---------

Co-authored-by: Graeme Rocher <graeme.rocher@oracle.com>
Updates the Netty libraries for HTTP/3
* Netty 4.2

* Event loop loom carrier
Adds support for running loom threads on the event loop.

* fix continuation run

* implement client affinity for carrier thread

* update to final

* adjust reflect config

* adjust reflect config

* improve client pool

* new pool

* progress

* fix redispatch

* progress

* progress

* docs

* fixes

* fix merge

* avoid unnecessary wakeup

* add suppression

* fix todo

* set max concurrent http1 connection count

* checkstyle

* remove pointless try

* doc

* limit loom nesting depth

* changes

* progress

* move event loop to a dedicated virtual thread to avoid deadlocks

* add legacy pool implementation

* reimplement work spilling

* Move back to newThreadPerTaskExecutor conditionally

* separate io thread scheduler

* config options, sticky loop

* Netty 4.2.2.Final

* IdleStateHandler now supports ticker

* workaround for MemorySegment issue

* conditional

* better workaround

* update version range

* disable cleaner only until jdk 25

* cleanup

* cleanup

* cleanup

* docs

* thread names changed

* thread names changed
… don't really implement it. (#11856)

 Disable Loom support on JVMs that support the virtual threads API but don't really implement it.

This avoids a crash when a thread is cast to VirtualThread but is in fact a ThreadBuilder.BoundVirtualThread that uses a platform thread instead.

Espresso is an example of such a JVM.

* remove unused imports

---------

Co-authored-by: Sergio del Amo <sergio.delamo@softamo.com>
This PR adds a new interface, GracefulShutdownLifecycle, that parts of the framework can implement to provide graceful shutdown functionality. It is designed to complement LifeCycle.stop(), though the implementations are unrelated.

The netty HTTP server, on graceful shutdown, will stop accepting new connections, and wind down existing ones. HTTP/1 connections are closed as soon as in-progress requests have been served, while HTTP/2 and /3 connections send a GOAWAY packet to indicate to the client that no further requests will be processed.

There is also a readiness health indicator that turns DOWN when a graceful shutdown begins. To keep the health endpoint accessible, there is a new `micronaut.server.netty.listeners.*.support-graceful-shutdown` config option to disable graceful shutdown for a management port.

Graceful shutdown is triggered by application code through a new GracefulShutdownManager API.

Graceful shutdown is best-effort. In-progress requests may take too long, or HTTP/2 clients may refuse to shut down their connection. For this reason, GracefulShutdownLifecycle returns a CompletionStage. The stage will complete when a graceful shutdown has been achieved, but this may be never, so a user should always add a timeout. After a graceful shutdown (or timeout), a normal LifeCycle.stop should be performed.
* Reintroduce KSP test projects

* Remove test projects from jacoco aggregation
micronaut-build and others added 7 commits June 13, 2025 10:36
…ehand (#11864)

When checking `refCnt > 0`, make sure we're the exclusive owner beforehand
In `dataStream`, we still use the antipattern of a conditional release after onNext. The idea is that if the downstream consumer does not release the buffer, we'll do it for them after onNext.

However, if the downstream *does* release the buffer but the buffer is also still used elsewhere, this `refCnt` check did not work, and the buffer was released twice. This issue likely was exposed by the new netty allocator.

This patch makes sure the buffer refCnt is 1 so that we don't interfere with others.

Fixes micronaut-projects/micronaut-reactor#555
# Conflicts:
#	gradle.properties
#	inject-java/src/test/resources/META-INF/services/io.micronaut.inject.visitor.TypeElementVisitor
@yawkat yawkat requested a review from sdelamo June 14, 2025 09:03
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots
3 New Bugs (required ≤ 0)
6 New Critical Issues (required ≤ 0)
1 New Blocker Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@graemerocher graemerocher merged commit ed0da60 into 4.10.x Jun 15, 2025
21 of 22 checks passed
@graemerocher graemerocher deleted the 4.10.x-upd branch June 15, 2025 20:47
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.