Skip to content

fix(core): honour http.nonProxyHosts in the Micronaut HTTP client (backport #22390) - #22392

Merged
nkwiatkowski merged 2 commits into
releases/v2.0.xfrom
backport/22390-v20
Nov 9, 2026
Merged

nkwiatkowski merged 2 commits into
releases/v2.0.xfrom
backport/22390-v20

Conversation

@nkwiatkowski

Copy link
Copy Markdown
Contributor

Closes https://github.com/kestra-io/kestra-ee/issues/12313.

Backport of #22390 to releases/v2.0.x, so the fix ships in 2.0.10. The issue was reported on 2.0.2 during an on-premises PoC.

✨ Description

Once micronaut.http.client.proxy-address is set, every Micronaut HTTP client ignores the JVM http.nonProxyHosts property, so the OIDC discovery of an internal identity provider goes to the corporate proxy and SSO login fails. NonProxyHostsListener installs a ProxySelector on every Micronaut client configuration that has a proxy address, sending hosts listed in http.nonProxyHosts direct and everything else to the configured proxy. See #22390 for the full description.

The cherry-pick applied cleanly. The branch uses the same Micronaut platform as develop (4.10.22).

πŸ› οΈ Backend Checklist

  • Code compiles and tests pass for the touched modules (./gradlew :core:test --tests NonProxyHostsListenerTest on this branch)
  • New behavior is covered by unit or integration tests

πŸ“ Additional Notes

Companion docs PR: kestra-io/docs#6271, updated to say 2.0.10.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor
πŸ“„ OpenAPI Spec Changes

❌ Failed to generate EE OpenAPI spec (EE branch: releases/v2.0.x).

Fetching distribution.
Downloading https://services.gradle.org/distributions/gradle-9.7.0-bin.zip
..............10%..............20%...............30%..............40%..............50%..............60%...............70%..............80%...............90%..............100%

Welcome to Gradle 9.7.0!

Here are the highlights of this release:
 - Isolated Projects graduates to incubating
 - Broader Configuration Cache compatibility
 - More source locations in problem reports

For more details see https://docs.gradle.org/9.7.0/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* Where:
Settings file '/home/runner/_work/kestra-ee/kestra-ee/settings.gradle' line: 10

* What went wrong:
Plugin [id: 'io.kestra.gradle.test-scheduling', version: '1.2.10'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (No included builds contain this plugin)
- Plugin Repositories (could not resolve plugin artifact 'io.kestra.gradle.test-scheduling:io.kestra.gradle.test-scheduling.gradle.plugin:1.2.10')
  Searched in the following repositories:
    Gradle Central Plugin Repository
    MavenRepo

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights from a Build Scan (powered by Develocity).
> Get more help at https://help.gradle.org.

BUILD FAILED in 11s
πŸ‹ Docker image
ghcr.io/kestra-io/kestra-pr:22392
docker run --pull=always --rm -it -p 8080:8080 --user=root -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp ghcr.io/kestra-io/kestra-pr:22392 server local
πŸ§ͺ Java Unit Tests ❌ (8 failed, 9159 passed, 32 skipped)
TestsPassed β˜‘οΈSkipped ⚠️Failed ❌️Time ⏱
Java Tests Report9199 ran9159 βœ…32 ⚠️8 ❌1h 6m 9s 239ms
TestResultTime ⏱
Java Tests Report
GrpcKVBackendTest.shouldRejectAStorageLocationThatIsNotValidOnTheController()❌ failure105ms
GrpcKVBackendTest.shouldGetListAndDeleteEntriesOfTheClusterStorage()❌ failure128ms
GrpcKVBackendTest.shouldWriteAnEntryThatTheClusterStorageServes()❌ failure221ms
GrpcKVBackendTest.shouldRefuseToOverwriteWhenAskedNotTo()❌ failure121ms
GrpcKVBackendTest.shouldFailWhenTheValueExpired()❌ failure24ms
GrpcKVBackendTest.shouldReadAValueSetOnTheClusterStorage()❌ failure95ms
GrpcKVBackendTest.shouldStopReadingAValueClosedBeforeItsEnd()❌ failure49ms
GrpcKVBackendTest.shouldReturnEmptyWhenNoValueIsStored()❌ failure13ms

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Tests report quick summary:

⚠️ 1 module(s) need investigation (test task failed or produced no results):

  • worker β€” test task FAILED and produced no complete results (JVM terminated β€” timeout β‰₯ 30m, out-of-memory, or runner crash). The results shown below for this module are partial and may not reflect every test.

failed ❌ > tests: 9199, success: 9159, skipped: 32, failed: 8 (πŸ”„ 9199 executed, πŸ“¦ 0 from cache)

Project Status Success Skipped Failed
cli success βœ… πŸ”„ 83 0 0
core success βœ… πŸ”„ 3761 8 0
executor success βœ… πŸ”„ 226 9 0
indexer success βœ… πŸ”„ 3 0 0
jdbc success βœ… πŸ”„ 93 12 0
jdbc-h2 success βœ… πŸ”„ 1077 1 0
jdbc-mysql success βœ… πŸ”„ 925 2 0
jdbc-postgres success βœ… πŸ”„ 936 0 0
processor success βœ… πŸ”„ 7 0 0
queue success βœ… πŸ”„ 43 0 0
repository-memory success βœ… πŸ”„ 1 0 0
runner-memory success βœ… πŸ”„ 1 0 0
scheduler success βœ… πŸ”„ 153 0 0
script success βœ… πŸ”„ 52 0 0
storage-local success βœ… πŸ”„ 73 0 0
tests success βœ… πŸ”„ 6 0 0
webserver success βœ… πŸ”„ 1404 0 0
worker failed ❌ πŸ”„ 121 0 8
worker-controller success βœ… πŸ”„ 194 0 0

Failed tests:

worker > io.kestra.worker.stores.GrpcKVBackendTest > shouldRejectAStorageLocationThatIsNotValidOnTheController() failed ❌ in 0.105
java.lang.AssertionError: 
Expecting actual throwable to be an instance of:
  java.lang.IllegalArgumentException
but was:
  io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:368)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:349)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:174)
	...(106 remaining lines not displayed - this can be changed with Assertions.setMaxStackTraceElementsDisplayed)

java.lang.AssertionError: 
Expecting actual throwable to be an instance of:
  java.lang.IllegalArgumentException
but was:
  io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:368)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:349)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:174)
	...(106 remaining lines not displayed - this can be changed with Assertions.setMaxStackTraceElementsDisplayed)
	at io.kestra.worker.stores.GrpcKVBackendTest.shouldRejectAStorageLocationThatIsNotValidOnTheController(GrpcKVBackendTest.java:139)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:154)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:171)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:128)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:141)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

worker > io.kestra.worker.stores.GrpcKVBackendTest > shouldGetListAndDeleteEntriesOfTheClusterStorage() failed ❌ in 0.128
io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''

io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:368)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:349)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:174)
	at io.kestra.controller.grpc.KVStoreServiceGrpc$KVStoreServiceBlockingStub.get(KVStoreServiceGrpc.java:459)
	at io.kestra.worker.stores.GrpcKVBackend.lambda$get$0(GrpcKVBackend.java:101)
	at io.kestra.worker.stores.GrpcKVBackend.call(GrpcKVBackend.java:122)
	at io.kestra.worker.stores.GrpcKVBackend.get(GrpcKVBackend.java:101)
	at io.kestra.core.storages.kv.InternalKVStore.get(InternalKVStore.java:148)
	at io.kestra.worker.stores.GrpcKVBackendTest.shouldGetListAndDeleteEntriesOfTheClusterStorage(GrpcKVBackendTest.java:88)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:154)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:171)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:128)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:141)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

worker > io.kestra.worker.stores.GrpcKVBackendTest > shouldWriteAnEntryThatTheClusterStorageServes() failed ❌ in 0.221
io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''

io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.Status.asRuntimeException(Status.java:532)
	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:581)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:566)
	at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:72)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:734)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:715)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
	at java.base/java.util.concurrent.ThreadPerTaskExecutor$TaskRunner.run(ThreadPerTaskExecutor.java:291)
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:460)

worker > io.kestra.worker.stores.GrpcKVBackendTest > shouldRefuseToOverwriteWhenAskedNotTo() failed ❌ in 0.121
java.lang.AssertionError: 
Expecting actual throwable to be an instance of:
  io.kestra.core.storages.kv.KVStoreException
but was:
  io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.Status.asRuntimeException(Status.java:532)
	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:581)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:566)
	...(7 remaining lines not displayed - this can be changed with Assertions.setMaxStackTraceElementsDisplayed)

java.lang.AssertionError: 
Expecting actual throwable to be an instance of:
  io.kestra.core.storages.kv.KVStoreException
but was:
  io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.Status.asRuntimeException(Status.java:532)
	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:581)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:566)
	...(7 remaining lines not displayed - this can be changed with Assertions.setMaxStackTraceElementsDisplayed)
	at io.kestra.worker.stores.GrpcKVBackendTest.shouldRefuseToOverwriteWhenAskedNotTo(GrpcKVBackendTest.java:128)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:154)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:171)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:128)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:141)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

worker > io.kestra.worker.stores.GrpcKVBackendTest > shouldFailWhenTheValueExpired() failed ❌ in 0.024
java.lang.AssertionError: 
Expecting actual throwable to be an instance of:
  io.kestra.core.exceptions.ResourceExpiredException
but was:
  io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.Status.asRuntimeException(Status.java:532)
	at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:731)
	at io.kestra.controller.grpc.streaming.ChunkedStreamReader.open(ChunkedStreamReader.java:66)
	...(105 remaining lines not displayed - this can be changed with Assertions.setMaxStackTraceElementsDisplayed)

java.lang.AssertionError: 
Expecting actual throwable to be an instance of:
  io.kestra.core.exceptions.ResourceExpiredException
but was:
  io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.Status.asRuntimeException(Status.java:532)
	at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:731)
	at io.kestra.controller.grpc.streaming.ChunkedStreamReader.open(ChunkedStreamReader.java:66)
	...(105 remaining lines not displayed - this can be changed with Assertions.setMaxStackTraceElementsDisplayed)
	at io.kestra.worker.stores.GrpcKVBackendTest.shouldFailWhenTheValueExpired(GrpcKVBackendTest.java:119)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:154)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:171)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:128)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:141)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

worker > io.kestra.worker.stores.GrpcKVBackendTest > shouldReadAValueSetOnTheClusterStorage() failed ❌ in 0.095
io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''

io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.Status.asRuntimeException(Status.java:532)
	at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:731)
	at io.kestra.controller.grpc.streaming.ChunkedStreamReader.open(ChunkedStreamReader.java:66)
	at io.kestra.worker.stores.GrpcKVBackend.getRawValue(GrpcKVBackend.java:86)
	at io.kestra.core.storages.kv.InternalKVStore.getRawValue(InternalKVStore.java:113)
	at io.kestra.core.storages.kv.InternalKVStore.getValue(InternalKVStore.java:100)
	at io.kestra.worker.stores.GrpcKVBackendTest.shouldReadAValueSetOnTheClusterStorage(GrpcKVBackendTest.java:75)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:154)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:171)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:128)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:141)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

worker > io.kestra.worker.stores.GrpcKVBackendTest > shouldStopReadingAValueClosedBeforeItsEnd() failed ❌ in 0.049
io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''

io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.Status.asRuntimeException(Status.java:532)
	at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:731)
	at io.kestra.controller.grpc.streaming.ChunkedStreamReader.open(ChunkedStreamReader.java:66)
	at io.kestra.worker.stores.GrpcKVBackend.getRawValue(GrpcKVBackend.java:86)
	at io.kestra.worker.stores.GrpcKVBackendTest.shouldStopReadingAValueClosedBeforeItsEnd(GrpcKVBackendTest.java:101)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:154)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:171)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:128)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:141)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

worker > io.kestra.worker.stores.GrpcKVBackendTest > shouldReturnEmptyWhenNoValueIsStored() failed ❌ in 0.013
io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''

io.grpc.StatusRuntimeException: UNAVAILABLE: Health-check stream unexpectedly closed with Status{code=CANCELLED, description=io.grpc.Context was cancelled without error, cause=null} for ''
	at io.grpc.Status.asRuntimeException(Status.java:532)
	at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:731)
	at io.kestra.controller.grpc.streaming.ChunkedStreamReader.open(ChunkedStreamReader.java:66)
	at io.kestra.worker.stores.GrpcKVBackend.getRawValue(GrpcKVBackend.java:86)
	at io.kestra.core.storages.kv.InternalKVStore.getRawValue(InternalKVStore.java:113)
	at io.kestra.core.storages.kv.InternalKVStore.getValue(InternalKVStore.java:100)
	at io.kestra.worker.stores.GrpcKVBackendTest.shouldReturnEmptyWhenNoValueIsStored(GrpcKVBackendTest.java:110)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:154)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:171)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:128)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:141)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)


Develocity build scan: https://develocity.kestra.io/s/bxpaxfdnbrdkc


Flaky tests report quick summary:

success βœ… > tests: 11, success: 11, skipped: 0, failed: 0

unfold for details
Project Status Success Skipped Failed
cli success βœ… 1 0 0
script success βœ… 1 0 0
webserver success βœ… 9 0 0

…once

A pattern with a wildcard at both ends (*.corp.*) now matches hosts that
contain it, as the JDK does, instead of never matching. http.nonProxyHosts is
read once when the class loads rather than on every request.
@nkwiatkowski
nkwiatkowski merged commit e09c3d6 into releases/v2.0.x Nov 9, 2026
12 of 14 checks passed
@nkwiatkowski
nkwiatkowski deleted the backport/22390-v20 branch November 9, 2026 13:31
@github-project-automation github-project-automation Bot moved this from To review to Done in Pull Requests Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant