The GitHub Actions job "Flink Kubernetes Operator CI" on 
flink-kubernetes-operator.git/FLINK-39559 has failed.
Run started by GitHub user palkakrzysiek (triggered by gyfora).

Head commit for run:
a3a401aa3888ead7fc6dcffb90cb8f2841fff2dc / Krzysztof Palka 
<[email protected]>
[FLINK-39559] Set ownerReferences on JM Deployment recreated during session 
recovery

SessionReconciler.recoverSession() called submitSessionCluster() with the
observe config but did not first invoke setOwnerReference(). Because the
JOB_MANAGER_OWNER_REFERENCE Flink config option is set transiently per
deploy and is never persisted to spec.flinkConfiguration, the observe
config never carries it. As a result, the JM Deployment recreated by
recovery had no ownerReferences. JOSDK uses ownerReferences to map the
secondary Deployment back to its FlinkDeployment primary; without them
getSecondaryResource(Deployment.class) returns empty on the next observe,
the operator sets jobManagerDeploymentStatus = MISSING, recovery runs
again and fails with 409 AlreadyExists, the catch path calls
stopAndCleanupCluster() which deletes the orphan, and the cycle repeats
indefinitely.

This is a regression of the same fix applied for the deploy() path in
FLINK-28979 (commit 62eb68c8) - the recoverSession() path was simply
missed when ownerReferences were originally introduced.

Add the missing setOwnerReference() call and a regression test in
SessionReconcilerTest that simulates a MISSING JM Deployment, triggers
reconcile, and asserts that the configuration passed to
submitSessionCluster() during recovery contains the expected
JOB_MANAGER_OWNER_REFERENCE entry.

Report URL: 
https://github.com/apache/flink-kubernetes-operator/actions/runs/25054398717

With regards,
GitHub Actions via GitBox

Reply via email to