Admaing commented on PR #18667:
URL:
https://github.com/apache/dolphinscheduler/pull/18667#issuecomment-5903168704
> ### Use the task environment for cancellation.
> FlinkArgsUtils.buildFlinkCommand() only reads prepared parameters and
System.getenv(), while submission also loads shell.env_source_list and
TaskExecutionContext.environmentConfig. If FLINK_HOME is defined only in the
selected task environment, submission succeeds but cancellation attempts the
literal "${FLINK_HOME}/bin/flink" and fails. Please reuse the submission
environment and tenant context.
>
> ### Preserve cancellation failures and keep JobIDs separate from
application IDs.
> When the Flink CLI fails, FlinkTask.cancelApplication() falls back to
killing the client and performing resource-manager cleanup. This cannot cancel
a standalone/session Flink job. Moreover, cancelFlinkJob() has already
overwritten context.appIds with the Flink JobID, so the fallback passes it to
the YARN application manager. Please keep these identifiers separate and
propagate the failure when the remote job cannot be cancelled.
>
> ### Drain or redirect the CLI output.
> FlinkArgsUtils.executeCommand() waits for completion without consuming
stdout or stderr. If either pipe fills, the CLI blocks until the 30-second
timeout and is forcibly terminated. Please drain or redirect both streams and
retain the output for failure diagnostics.
@SbloodyS All three points are fixed in 691373a:
1. Cancel now runs in the same environment as the task
(shell.env_source_list + environmentConfig + tenant), so ${FLINK_HOME} is
resolved at runtime.
2. JobID and appId are kept separate, and a failed flink cancel now throws
instead of falling back silently.
3. CLI output is drained on a separate thread, so it cannot block, and the
output is kept for diagnostics.
Tests: flink 15 passed , flink-stream 9 passed; the Linux-only env test also
passes in a Linux container. Please take another look.
--
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]