[
https://issues.apache.org/jira/browse/FLINK-41770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-41770:
-----------------------------------
Labels: pull-request-available (was: )
> Fix Flink 2.x savepoint failures in e2e operations tests
> --------------------------------------------------------
>
> Key: FLINK-41770
> URL: https://issues.apache.org/jira/browse/FLINK-41770
> Project: Flink
> Issue Type: Bug
> Components: Kubernetes Operator
> Affects Versions: 1.16.0
> Reporter: Luca Castelli
> Priority: Minor
> Labels: pull-request-available
>
> On Flink 2.0, 2.1, and 2.2, every savepoint fails in
> e2e-tests/test_application_operations.sh and
> e2e-tests/test_sessionjob_operations.sh.
> *2 bugs:*
> # .github/workflows/e2e.yaml runs StateMachineExample from
> flink-examples-streaming-2.0.0.jar, which uses the State V2 async API and
> breaks canonical savepoints (FLINK-39061; fixed in unreleased
> 2.0.3/2.1.4/2.2.2/2.3.1/2.4.0 while e2e.yaml still pins 2.0.0). Flink 2.x
> throws UnsupportedOperationException on canonical savepoints for async state
> operators. FLINK-38147 switched e2e-tests/test_snapshot.sh and
> e2e-tests/data/savepoint.yaml to NATIVE savepoints, but
> e2e-tests/data/flinkdep-cr.yaml and e2e-tests/data/sessionjob-cr.yaml still
> use CANONICAL.
> # Both scripts wait for savepointInfo.triggerId and triggerTimestamp to be
> null, then fail only if lastSavepoint.location is an empty string. triggerId
> is null before the operator writes it to status and after a failed savepoint
> clears it, and yq prints "null" when location is absent. Failed savepoints
> therefore pass unnoticed.
> *CI impact*
> On Flink 1.20, the manual savepoint in test_sessionjob_operations.sh finishes
> in about 15 seconds. On Flink 2.0, 2.1, and 2.2, such as GitHub Actions run
> https://github.com/apache/flink-kubernetes-operator/actions/runs/46013993883,
> the operator retries failed canonical savepoints for about 120 seconds until
> the grace period expires, and the following parallelism upgrade passes only
> because the crashed job falls back to last-state mode. If the script reads
> triggerId as null before the operator writes it, the job recovers to RUNNING
> before the upgrade reconciles, last-state fallback does not happen, and the
> test times out after 300 seconds retrying canonical stopWithSavepoint.
> *Proposed fix*
> # Set kubernetes.operator.savepoint.format.type to NATIVE in
> e2e-tests/data/flinkdep-cr.yaml and e2e-tests/data/sessionjob-cr.yaml.
> # In e2e-tests/test_application_operations.sh and
> e2e-tests/test_sessionjob_operations.sh, wait for
> .status.jobStatus.savepointInfo.lastSavepoint.triggerNonce to reach 123456
> before checking triggerId and triggerTimestamp, and reject an empty or "null"
> location.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)