manuzhang opened a new issue, #18891: URL: https://github.com/apache/iceberg/issues/18891
### Feature Request / Improvement `TestIcebergSinkTableMaintenance` (Flink 1.20, 2.2 and 2.3) has two tests that run a job with a blocking `env.execute()` and no time limit: `testCompactFileE2e` and `testAllMaintenanceE2e`. The MiniCluster in these tests has a single TaskManager. If an earlier test in the same JVM takes that TaskManager down, the job can never be scheduled, and `env.execute()` blocks until the workflow's 60-minute `timeout-minutes` cancels the whole CI job. When that happens: - The job is reported as **cancelled**, not failed, so the real failure is hard to find. - The `upload-artifact` step only runs on `failure()`, so it is skipped and the test reports are lost. - About 40 minutes of runner time are spent waiting on a job that can never run. This happened several times this week on Flink 2.2 and 2.3. Every one of these jobs shows the same sequence: `testConvertEqualityDeletesWithRewriteEnabledE2e` passes and cancels its job, both `testConvertEqualityDeletesE2e` cases fail after their 2-minute Awaitility wait, and then `testCompactFileE2e(jdbc)` hangs until the CI job is cancelled. - https://github.com/apache/iceberg/actions/runs/42990142430/job/130420727984 (Flink 2.2, Java 21) - https://github.com/apache/iceberg/actions/runs/42994039853/job/130459654426 (Flink 2.2, Java 21) - https://github.com/apache/iceberg/actions/runs/42967832350/job/130349067576 (Flink 2.2, Java 17) - https://github.com/apache/iceberg/actions/runs/42944696901/job/130274568989 (Flink 2.3, Java 17) The root cause was an exception thrown from `DataFileRewriteCommitter.close()` while a job was being cancelled. That is addressed by [Flink: Always reset commit service after watermark in DataFileRewriteCommitter](https://github.com/apache/iceberg/pull/18849) and its backport [Flink: Backport: Always reset commit service after watermark in DataFileRewriteCommitter (#18849)](https://github.com/apache/iceberg/pull/18888). [Flink: Make DataFileRewriteCommitter close idempotent fix ci timeout](https://github.com/apache/iceberg/pull/18850) is still open for the case where the job is cancelled before the watermark arrives. This issue is only about making the next hang of this kind fail fast with a clear error. **Proposal** Add a JUnit `@Timeout` to `TestIcebergSinkTableMaintenance` in all three Flink versions. `TestFlinkIcebergSinkV2` and `TestIcebergSinkV2` already do this with a class-level `@Timeout(value = 60)`. The limit must be longer than the 2-minute Awaitility wait in `testConvertEqualityDeletesE2e` and `testConvertEqualityDeletesWithRewriteEnabledE2e`. That means either a class-level limit of a few minutes, or a per-method `@Timeout` on just the two tests that call `env.execute()`. An alternative is to replace `env.execute()` in those two tests with `executeAsync()` followed by `jobClient.getJobExecutionResult().get(timeout, unit)`. ### Query engine Flink ### Willingness to contribute - [ ] I can contribute this improvement/feature independently - [ ] I would be willing to contribute this improvement/feature with guidance from the Iceberg community - [ ] I cannot contribute this improvement/feature at this time -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
