[
https://issues.apache.org/jira/browse/FLINK-40375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Purushottam Sinha updated FLINK-40375:
--------------------------------------
Description:
Problem
Five test classes report Tests run: 0 while the build passes, so 10 test
methods provide no coverage. The download itself succeeds — extraction of the
apiserver binaries fails, and surefire discards the error.
Evidence
- flink-kubernetes-operator-api declares commons-io:2.17.0 directly, overriding
the 2.20.0 that commons-compress:1.28.0 (via io.fabric8:kube-api-test) needs →
IllegalAccessError at BinaryDownloader.extractFiles(BinaryDownloader.java:94).
- surefire 3.0.0-M4 drops beforeAll failures (fixed in 3.0.0-M5); the surefire
report contains no error record at all.
- kubernetes-server-mock declares kubernetes-client as optional, so
flink-kubernetes-standalone (shaded fabric8 only) fails with
NoClassDefFoundError: HasMetadata in KubernetesStandaloneClusterDescriptorTest
and Fabric8FlinkStandaloneKubeClientTest.
- Only reproduces with a cold ~/.kubeapitest cache — hence CI-only.
Proposed fix
- Bump surefire to 3.5.6 and commons-io to 2.22.0; update the operator NOTICE.
- Add unshaded kubernetes-client + an httpclient impl at test scope to
flink-kubernetes-standalone.
Acceptance
- Full build runs 2728 tests, up from 2718.
- Extraction failure yields BUILD FAILURE, not Tests run: 0.
was:
Problem
Test classes annotated @EnableKubeAPIServer report Tests run: 0 in CI and the
build passes. Startup failures of the embedded kube-apiserver are swallowed, so
these tests have provided no coverage while appearing green.
Evidence
- CI logs for maven build (17)/(21) show Downloading binaries with version:
1.36.2 then Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 for
FlinkConfigurationYamlSupportTest — in 10 failed runs and in passing control
run 31481007219.
- EventUtilsApiServerTest and FlinkOperatorTest are also affected — 5 @Test
methods total.
- KubeAPIServerExtension.beforeAll → startApiServer → kubeApiServer.start() has
no try/catch; surefire 3.0.0-M4 (pom.xml:69) swallows the container failure —
see SUREFIRE-1688.
- Forcing a startup failure locally gives Tests run: 0 + BUILD SUCCESS on
3.0.0-M4, and BUILD FAILURE on 3.5.2.
Proposed fix
- Bump maven-surefire-plugin.version from 3.0.0-M4 so container failures fail
the build.
- Investigate why the binary download fails on GitHub runners — <TBD: root
cause unconfirmed>.
Acceptance
- FlinkConfigurationYamlSupportTest reports Tests run: 1 in CI.
- A kube-apiserver startup failure fails the build instead of passing silently.
> Operator API tests: kube-API-server tests silently skipped in CI (Tests run:
> 0)
> -------------------------------------------------------------------------------
>
> Key: FLINK-40375
> URL: https://issues.apache.org/jira/browse/FLINK-40375
> Project: Flink
> Issue Type: Bug
> Components: Kubernetes Operator
> Reporter: Purushottam Sinha
> Priority: Major
>
> Problem
> Five test classes report Tests run: 0 while the build passes, so 10 test
> methods provide no coverage. The download itself succeeds — extraction of the
> apiserver binaries fails, and surefire discards the error.
> Evidence
> - flink-kubernetes-operator-api declares commons-io:2.17.0 directly,
> overriding the 2.20.0 that commons-compress:1.28.0 (via
> io.fabric8:kube-api-test) needs → IllegalAccessError at
> BinaryDownloader.extractFiles(BinaryDownloader.java:94).
> - surefire 3.0.0-M4 drops beforeAll failures (fixed in 3.0.0-M5); the
> surefire report contains no error record at all.
> - kubernetes-server-mock declares kubernetes-client as optional, so
> flink-kubernetes-standalone (shaded fabric8 only) fails with
> NoClassDefFoundError: HasMetadata in
> KubernetesStandaloneClusterDescriptorTest and
> Fabric8FlinkStandaloneKubeClientTest.
> - Only reproduces with a cold ~/.kubeapitest cache — hence CI-only.
> Proposed fix
> - Bump surefire to 3.5.6 and commons-io to 2.22.0; update the operator NOTICE.
> - Add unshaded kubernetes-client + an httpclient impl at test scope to
> flink-kubernetes-standalone.
> Acceptance
> - Full build runs 2728 tests, up from 2718.
> - Extraction failure yields BUILD FAILURE, not Tests run: 0.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)