[FLINK-39846][tests] Restore IPv6 guard and config in IPv6HostnamesITCase under AdaptiveScheduler#28312
Merged
MartijnVisser merged 1 commit intoJun 5, 2026
Conversation
Collaborator
d56d016 to
7760489
Compare
1996fanrui
reviewed
Jun 5, 2026
Comment on lines
192
to
194
| } catch (Exception | LinkageError e) { | ||
| LOG.debug("No bindable non-loopback IPv6 address available", e); | ||
| return null; |
Member
There was a problem hiding this comment.
Why widen to LinkageError? This silently turns a class-loading failure into a "skip" — was it actually hit somewhere, or can it stay catch (Exception e)?
Contributor
Author
There was a problem hiding this comment.
Good point, reverted to catch (Exception e) in 8ece954. The LinkageError was speculative (never actually observed) and, as you say, would turn a genuine class-loading failure into a silent skip — if RpcSystem.load() ever throws one it should surface, not be swallowed. Kept the LOG.debug so a skip stays explainable.
…Case under AdaptiveScheduler The JUnit5 migration (FLINK-39124, apache#27669) converted the JUnit4 '@rule MiniClusterWithClientResource(... setConfiguration(getConfiguration()) ...)' to a static '@RegisterExtension MiniClusterExtension' with a hardcoded configuration, dropping the call to getConfiguration(). That method bound the cluster to a local IPv6 address and skipped the test (via an IPv6 assumption) when no non-loopback IPv6 address is available. After the migration the guard became dead code, so the test ran unconditionally without IPv6 configuration and failed in the test_cron_adaptive_scheduler nightly leg on master (the job uses GlobalWindows.createWithEndOfStreamTrigger() -> a blocking data exchange the AdaptiveScheduler does not support). Resolve the IPv6 address once at class load and configure the MiniCluster with it when present; use a class-level @EnabledIf condition to skip the class (before the MiniCluster is started) when no usable IPv6 address is available, restoring the pre-migration skip behavior. Also tag the test with FailsWithAdaptiveScheduler so it is excluded from the adaptive profile even when an IPv6 address is available, since the blocking exchange is genuinely incompatible with the AdaptiveScheduler. Generated-by: Claude Code (Claude Opus 4.8)
7760489 to
8ece954
Compare
1996fanrui
approved these changes
Jun 5, 2026
Member
1996fanrui
left a comment
There was a problem hiding this comment.
Thanks for the fix and update, LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
The JUnit5 migration (FLINK-39124, #27669) converted
IPv6HostnamesITCasefrom a JUnit4@Rule MiniClusterWithClientResource(... .setConfiguration(getConfiguration()) ...)to a static@RegisterExtension MiniClusterExtension(...)with a hardcoded configuration, dropping the call togetConfiguration(). That method (a) bound the cluster to a local IPv6 address and (b) skipped the test (via an IPv6 assumption) when no non-loopback IPv6 address is available.After the migration
getConfiguration()became dead code, so the test runs unconditionally and without IPv6 configuration, and fails under the AdaptiveScheduler because the job usesGlobalWindows.createWithEndOfStreamTrigger()-- a blocking (non-pipelined) data exchange the AdaptiveScheduler does not support. It has failed every nightlytest_cron_adaptive_schedulerbuild onmastersince ~2026-04-15.release-2.0/release-2.1still callgetConfiguration(), so they skip the test when IPv6 is unavailable and stay green.This restores the IPv6 configuration and the skip behavior, and additionally tags the test so it is excluded from the adaptive profile even when an IPv6 address is available.
Brief change log
MiniClusterExtensionwith it when present (restoring IPv6 binding).@EnabledIf("hasBindableIpv6Address")condition so the class is skipped before the MiniCluster is started when no usable IPv6 address is available (this is evaluated before the extension'sbeforeAll, unlike an in-testassumeThat).@Tag("org.apache.flink.testutils.junit.FailsWithAdaptiveScheduler"), since the blocking exchange is genuinely incompatible with the AdaptiveScheduler.Verifying this change
This change is already covered by the existing
IPv6HostnamesITCase.testClusterWithIPv6host. It was verified locally:Tests run: 1, Failures: 0, Errors: 0(the test again exercises IPv6 binding); on a host without IPv6 the class is disabled by@EnabledIf(skipped).-Penable-adaptive-scheduler: the test is excluded by the tag (Tests run: 0), so the adaptive nightly leg is green.checkstyle:checkandspotless:checkpass.Note on coverage: the IPv6 binding is exercised only under the default scheduler on an IPv6-capable host. Under the adaptive profile the test is excluded by design (the blocking exchange cannot run there); this exclusion is intentional and tracked in FLINK-39846, it should not be removed without also reworking the job to use a pipelined exchange.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 4.8)