Which jobs are flaking:
Which test(s) are flaking:
The observed failure was:
[EstimatorAssumption] ResourceQuota plugin assumption testing
[It] FlinkDeployment should be unschedulable when assumed workloads exhaust ResourceQuota
The test timed out in WaitResourceBindingFitWith while waiting for the first FlinkDeployment ResourceBinding to become scheduled:
[FAILED] Timed out after 420.000s.
In [It] at: test/e2e/framework/resourcebinding.go:47
test/e2e/suites/base/estimator_test.go:350
This is probably not limited to one It block. Several e2e suites create and delete the same flinkdeployments.flink.apache.org CRD:
test/e2e/suites/base/estimator_test.go
test/e2e/suites/base/schedule_multi_template_test.go
test/e2e/suites/base/federatedresourcequota_test.go
Reason for failure:
The scheduler log from the failed job shows that the ResourceBinding was rejected by the APIEnablement plugin because member1 did not report the FlinkDeployment API:
Cluster(member1) not fit as missing API(flink.apache.org/v1beta1, kind=FlinkDeployment)
ResourceBinding(karmadatest-6cw8j/flinkdeployment-5fc2b-flinkdeployment) scheduled to clusters []
0/3 clusters are available: 1 cluster(s) did not have the API resource, 2 cluster(s) did not match the placement cluster affinity constraint.
The current FlinkDeployment e2e cleanup path only waits for the source CRD to disappear from the Karmada control plane. CRD propagation/removal to member clusters and the Cluster.Status.APIEnablements collection are asynchronous.
I ran a local diagnostic that simulated the old cleanup boundary:
- Create
flinkdeployments.flink.apache.org on the Karmada control plane.
- Propagate the CRD to two member clusters.
- Wait until the member CRDs exist and
Cluster.Status.APIEnablements reports FlinkDeployment.
- Delete the
ClusterPropagationPolicy.
- Delete the source CRD from the control plane.
- Wait only for the control-plane CRD to disappear, which is what the old cleanup waited for.
- Poll member CRDs and
Cluster.Status.APIEnablements.
The diagnostic showed that the old cleanup can return before member-cluster CRD and APIEnablement state has converged:
control-plane CRD disappeared after 1s
after 00s: APIEnablements still reported FlinkDeployment and member CRDs still existed
after 01s: APIEnablements still reported FlinkDeployment; one member CRD was gone
after 02s: member CRDs were gone, but APIEnablements still reported FlinkDeployment
after 03s: member CRDs were gone, but APIEnablements still reported FlinkDeployment
after 04s: APIEnablements also converged
This gives a plausible race:
- A previous FlinkDeployment e2e deletes the CRD and returns after the control-plane CRD disappears.
Cluster.Status.APIEnablements can still report FlinkDeployment from the previous CRD for a short time.
- The next FlinkDeployment e2e starts and
WaitCRDPresentOnClusters() can pass on that stale enabled status instead of a fresh status update for the newly propagated CRD.
- The scheduler can then observe the member cluster as missing
flink.apache.org/v1beta1/FlinkDeployment, causing the ResourceBinding to remain unscheduled until the test times out.
So the cleanup should wait for all state that later tests depend on:
- the source CRD has disappeared from the Karmada control plane;
- the propagated CRD has disappeared from member clusters;
Cluster.Status.APIEnablements no longer reports FlinkDeployment as enabled.
This follows the same synchronization-barrier idea as #7692, but for the FlinkDeployment CRD/APIEnablements cleanup path.
Anything else we need to know:
I tested a small e2e-only candidate fix that waits for member-cluster CRD disappearance and for Cluster.Status.APIEnablements to stop reporting FlinkDeployment during cleanup.
Validation branch:
Local validation:
git diff --check
go test ./test/e2e/suites/base -run '^$' -count=0
Fork push CI:
- CI run 28774018375: passed
- Jobs:
lint, codegen, compile, unit test, e2e v1.34.0, e2e v1.35.0, and e2e v1.36.1 all passed.
I can send this as a focused e2e flake fix if this issue direction makes sense.
Which jobs are flaking:
CI Workflow / e2e test (v1.34.0)152ab454265ac683f55f04a166e9de9aedaad94c.Which test(s) are flaking:
The observed failure was:
The test timed out in
WaitResourceBindingFitWithwhile waiting for the firstFlinkDeploymentResourceBinding to become scheduled:This is probably not limited to one
Itblock. Several e2e suites create and delete the sameflinkdeployments.flink.apache.orgCRD:test/e2e/suites/base/estimator_test.gotest/e2e/suites/base/schedule_multi_template_test.gotest/e2e/suites/base/federatedresourcequota_test.goReason for failure:
The scheduler log from the failed job shows that the ResourceBinding was rejected by the APIEnablement plugin because
member1did not report theFlinkDeploymentAPI:The current FlinkDeployment e2e cleanup path only waits for the source CRD to disappear from the Karmada control plane. CRD propagation/removal to member clusters and the
Cluster.Status.APIEnablementscollection are asynchronous.I ran a local diagnostic that simulated the old cleanup boundary:
flinkdeployments.flink.apache.orgon the Karmada control plane.Cluster.Status.APIEnablementsreportsFlinkDeployment.ClusterPropagationPolicy.Cluster.Status.APIEnablements.The diagnostic showed that the old cleanup can return before member-cluster CRD and APIEnablement state has converged:
This gives a plausible race:
Cluster.Status.APIEnablementscan still reportFlinkDeploymentfrom the previous CRD for a short time.WaitCRDPresentOnClusters()can pass on that stale enabled status instead of a fresh status update for the newly propagated CRD.flink.apache.org/v1beta1/FlinkDeployment, causing the ResourceBinding to remain unscheduled until the test times out.So the cleanup should wait for all state that later tests depend on:
Cluster.Status.APIEnablementsno longer reportsFlinkDeploymentas enabled.This follows the same synchronization-barrier idea as #7692, but for the FlinkDeployment CRD/APIEnablements cleanup path.
Anything else we need to know:
I tested a small e2e-only candidate fix that waits for member-cluster CRD disappearance and for
Cluster.Status.APIEnablementsto stop reportingFlinkDeploymentduring cleanup.Validation branch:
Local validation:
git diff --checkgo test ./test/e2e/suites/base -run '^$' -count=0Fork push CI:
lint,codegen,compile,unit test,e2e v1.34.0,e2e v1.35.0, ande2e v1.36.1all passed.I can send this as a focused e2e flake fix if this issue direction makes sense.