Skip to content

[Fix-18311][TaskPlugin] Fix task process kill status check#18312

Open
zhuxiangyi wants to merge 2 commits into
apache:devfrom
zhuxiangyi:Fix-18311
Open

[Fix-18311][TaskPlugin] Fix task process kill status check#18312
zhuxiangyi wants to merge 2 commits into
apache:devfrom
zhuxiangyi:Fix-18311

Conversation

@zhuxiangyi
Copy link
Copy Markdown

Was this PR generated or assisted by AI?

YES. Codex/ChatGPT assisted with debugging, code changes, tests, issue drafting, and PR draft preparation. I reviewed the changes and verified them locally.

Purpose of the pull request

Fix task kill status checking when kill -0 returns Operation not permitted for an unkillable sudo parent process or when tenant login shell emits stderr with exit code 0.

Closes #18311.

Brief change log

  • Add exit code accessor to ExitCodeException.
  • Distinguish alive, not-alive, and no-permission process states in ProcessUtils.
  • Continue killing permitted child processes instead of reporting success when only the sudo parent check is denied.
  • Add unit coverage for sudo parent denied plus killable child processes.

Verify this pull request

This change added tests and can be verified as follows:

  • ./mvnw -pl dolphinscheduler-common,dolphinscheduler-task-plugin/dolphinscheduler-task-api -DskipTests -Djacoco.skip=true spotless:check
  • ./mvnw -pl dolphinscheduler-task-plugin/dolphinscheduler-task-api -am -Dspotless.check.skip=true -Djacoco.skip=true -Dsurefire.failIfNoSpecifiedTests=false -Dtest=ProcessUtilsTest test

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 60%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Workflow remains READY_STOP when task kill status check misclassifies child processes

2 participants