You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "spuru9 (via GitHub)" <gi...@apache.org> on 2026/08/12 13:27:31 UTC
[PR] [FLINK-40375] Fix kube-apiserver and mock-server tests silently skipped in CI [flink-kubernetes-operator]
spuru9 opened a new pull request, #1177:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1177
## What is the purpose of the change
Five test classes report `Tests run: 0` while the build passes, so 10 test methods
contribute no coverage. This fixes the underlying failures and makes such failures
fail the build instead of passing silently.
The cause is not a binary *download* failure — the download succeeds and extraction
then fails. Two independent problems compound:
**1. Binary extraction crashes.** `flink-kubernetes-operator-api` declares
`commons-io:2.17.0` directly, which by Maven's nearest-definition rule overrides the
`2.20.0` that `commons-compress:1.28.0` (pulled in by `io.fabric8:kube-api-test`) is
built against:
```
java.lang.IllegalAccessError: class org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream
tried to access protected method 'java.io.InputStream org.apache.commons.io.build.AbstractStreamBuilder.getInputStream()'
at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.<init>(GzipCompressorInputStream.java:265)
at io.fabric8.kubeapitest.binary.BinaryDownloader.extractFiles(BinaryDownloader.java:94)
at io.fabric8.kubeapitest.junit.KubeAPIServerExtension.beforeAll(KubeAPIServerExtension.java:48)
```
This only reproduces on a cold `~/.kubeapitest` cache, which is why it appears on CI
runners but not on developer machines with a warm cache.
**2. The failure is swallowed.** Both failures occur in `beforeAll`, and
maven-surefire-plugin 3.0.0-M4 discards those — fixed in 3.0.0-M5
([SUREFIRE-1741](https://issues.apache.org/jira/browse/SUREFIRE-1741), of which
[SUREFIRE-1688](https://issues.apache.org/jira/browse/SUREFIRE-1688) is a duplicate).
The surefire XML report contains no error record at all.
Bumping surefire then turned the build red on two further classes with the same
suppressed-`beforeAll` pattern but a different cause: `kubernetes-server-mock`
declares `kubernetes-client` as `<optional>true</optional>` so it is not inherited
transitively, and `flink-kubernetes-standalone` only has the fabric8 client shaded
into `flink-kubernetes`. Its mock-server tests failed with
`NoClassDefFoundError: io/fabric8/kubernetes/api/model/HasMetadata`. Supplying the
unshaded client then surfaced a second layer, since `kubernetes-client` is managed
with every httpclient implementation excluded. Both were pre-existing — confirmed
reporting `Tests run: 0` on surefire 3.0.0-M4.
## Brief change log
- Bump `maven-surefire-plugin` from 3.0.0-M4 to 3.5.6 so `beforeAll` failures fail the build
- Bump `commons-io` from 2.17.0 to 2.22.0 (latest stable in the major), with a comment recording the constraint
- Add unshaded `io.fabric8:kubernetes-client` and an httpclient implementation at test scope to `flink-kubernetes-standalone`
- Update the operator `NOTICE` for the bundled `commons-io` version
`maven-failsafe-plugin` needs no change — it is already on 3.0.0-M5, which contains the fix.
## Verifying this change
Verified locally with a cold `~/.kubeapitest` cache and all quality checks enabled.
Before (at the previous base commit), the build was **green while running 2718 tests**,
with these classes silently at `Tests run: 0`:
| Test class | Before | After |
|---|---|---|
| `FlinkConfigurationYamlSupportTest` | 0 | 1 |
| `EventUtilsApiServerTest` | 0 | 2 |
| `FlinkOperatorTest` | 0 | 2 |
| `KubernetesStandaloneClusterDescriptorTest` | 0 | 3 |
| `Fabric8FlinkStandaloneKubeClientTest` | 0 | 2 |
`mvn clean install` now passes and runs 10 more tests than before. Reverting only the
`commons-io` bump correctly produces `BUILD FAILURE` (exit 1) rather than
`Tests run: 0` + `BUILD SUCCESS`, confirming the failure is no longer silent.
Note: `ScalingExecutorTest` also reports `Tests run: 0` because its `@Nested` class is
credited with the full count. That is a reporting artifact present identically on both
surefire versions, not a skipped test, and is unaffected by this change.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): **yes** — `commons-io` 2.17.0 -> 2.22.0 (bundled, `NOTICE` updated); two test-scope dependencies added to `flink-kubernetes-standalone`; `maven-surefire-plugin` 3.0.0-M4 -> 3.5.6
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: **no**
- Core observer or reconciler logic that is regularly executed: **no**
## Documentation
- Does this pull request introduce a new feature? **no**
- If yes, how is the feature documented? **not applicable**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-40375] Fix kube-apiserver and mock-server tests silently skipped in CI [flink-kubernetes-operator]
Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora merged PR #1177:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1177
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-40375] Fix kube-apiserver and mock-server tests silently skipped in CI [flink-kubernetes-operator]
Posted by "spuru9 (via GitHub)" <gi...@apache.org>.
spuru9 commented on PR #1177:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1177#issuecomment-5271488514
CI passed earlier
<img width="814" height="381" alt="image" src="https://github.com/user-attachments/assets/edf3602f-251a-43fa-8197-ca4bed5ad702" />
Have made comments precise as per the review from @Dennis-Mircea
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-40375] Fix kube-apiserver and mock-server tests silently skipped in CI [flink-kubernetes-operator]
Posted by "spuru9 (via GitHub)" <gi...@apache.org>.
spuru9 commented on PR #1177:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1177#issuecomment-5271326334
After
```
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.157 s -- in org.apache.flink.kubernetes.operator.kubeclient.Fabric8FlinkStandaloneKubeClientTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.640 s -- in org.apache.flink.kubernetes.operator.standalone.KubernetesStandaloneClusterDescriptorTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.62 s -- in org.apache.flink.kubernetes.operator.api.FlinkConfigurationYamlSupportTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.942 s -- in org.apache.flink.kubernetes.operator.utils.EventUtilsApiServerTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.188 s -- in org.apache.flink.kubernetes.operator.FlinkOperatorTest
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-40375] Fix kube-apiserver and mock-server tests silently skipped in CI [flink-kubernetes-operator]
Posted by "spuru9 (via GitHub)" <gi...@apache.org>.
spuru9 commented on PR #1177:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1177#issuecomment-5271296163
Before:
```
[INFO] Running org.apache.flink.kubernetes.operator.kubeclient.Fabric8FlinkStandaloneKubeClientTest
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s - in org.apache.flink.kubernetes.operator.kubeclient.Fabric8FlinkStandaloneKubeClientTest
[INFO] Running org.apache.flink.kubernetes.operator.standalone.KubernetesStandaloneClusterDescriptorTest
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.apache.flink.kubernetes.operator.standalone.KubernetesStandaloneClusterDescriptorTest
[INFO] Running org.apache.flink.kubernetes.operator.api.FlinkConfigurationYamlSupportTest
2026-08-12 13:43:42,584 i.f.k.b.BinaryDownloader [INFO ] Downloading binaries with version: 1.36.2
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.805 s - in org.apache.flink.kubernetes.operator.api.FlinkConfigurationYamlSupportTest
[INFO] Running org.apache.flink.kubernetes.operator.utils.EventUtilsApiServerTest
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 s - in org.apache.flink.kubernetes.operator.utils.EventUtilsApiServerTest
[INFO] Running org.apache.flink.kubernetes.operator.FlinkOperatorTest
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in org.apache.flink.kubernetes.operator.FlinkOperatorTest
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-40375] Fix kube-apiserver and mock-server tests silently skipped in CI [flink-kubernetes-operator]
Posted by "spuru9 (via GitHub)" <gi...@apache.org>.
spuru9 commented on PR #1177:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1177#issuecomment-5271476667
Thanks for the review @Dennis-Mircea! Trimmed the three new pom comments down (9 lines -> 5), keeping just the reason each dependency/version is pinned so they don't get dropped later as unused:
- `commons-io`: why it must stay ahead of what `commons-compress` needs
- `kubernetes-client`: why it isn't inherited from `kubernetes-server-mock`
- `kubernetes-httpclient-*`: now a single line
No functional change — rebased on latest `main` and re-verified with a cold `~/.kubeapitest` cache, and all five previously-silent test classes still report non-zero.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org