SEPURI-SAI-KRISHNA opened a new pull request, #29208:
URL: https://github.com/apache/flink/pull/29208
## What is the purpose of the change
`ArchivedExecutionGraphTest` sometimes errors in `@BeforeAll` with `BUG:
trying to schedule a region which is not in CREATED state`. The scheduler runs
on `forMainThread()` but gets a real future executor, so `Execution#deploy()`
hands back to the main-thread executor from that executor's thread and the
thread assertion throws. Normally that error is lost in the future chain. When
the test thread attaches `whenCompleteAsync` after it, the callback runs
inline, fails v1 with the `AssertionError`, and the job cancels the regions
`startScheduling()` has not reached yet. The CI log of the failing run shows v1
going from DEPLOYING to FAILED with `java.lang.AssertionError` right before the
error.
## Brief change log
- Have the class executor extension create a
`DirectScheduledExecutorService`, so the deployment callbacks run inline on the
test thread. The extension still shuts it down. FLINK-38536 used the same
executor for `FinalizeOnMasterTest` and `ExecutionGraphFinishTest`.
## Verifying this change
- With TDD creation delayed on the executor and `deploy()` delayed before
`whenCompleteAsync`, the old test fails every run with the CI error (12 of 12),
and the new test passes every run (5 of 5) with no main thread violations.
- Delaying only TDD creation, the old test passes 5 of 5, so both orderings
are needed.
- Breaking the FAILING timestamp or the job state in
`ArchivedExecutionGraph#createFrom` still fails `testArchive`.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): **no**
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: **no**
- The serializers: **no**
- The runtime per-record code paths (performance sensitive): **no**
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: **no**
- The S3 file system connector: **no**
## Documentation
- Does this pull request introduce a new feature? **no**
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code (Opus 5)
--
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]