Skip to content

Conversation

@dybyte
Copy link
Contributor

@dybyte dybyte commented Nov 30, 2025

Refer to: #9842

Purpose of this pull request

This PR implements the feature for reporting non-terminal job states.

Does this PR introduce any user-facing change?

Yes.
Users can receive non-terminal job state events by enabling the report-non-terminal-job-state option.

How was this patch tested?

Added a test in JobStateEventTest.

Check list

@dybyte dybyte marked this pull request as draft November 30, 2025 15:43
@github-actions github-actions bot added the Zeta label Nov 30, 2025
@dybyte dybyte marked this pull request as ready for review December 1, 2025 11:10
@dybyte
Copy link
Contributor Author

dybyte commented Dec 9, 2025

Hi @zhangshenghang , PTAL when you have time. Thanks!

Copy link
Contributor

@chl-wxp chl-wxp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/zh/concept/event-listener.md, please modify this document as well.

url: "http://example.com:1024/event/report"
headers:
Content-Type: application/json
report-non-terminal-job-state: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add parameter introduction, usage, and precautions.

log.info(
String.format(
"%s turned from state %s to %s.", jobFullName, current, targetState));
if (!targetState.isEndState()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The INITIALIZING and CREATED statuses will also be reported. Is this reasonable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the INITIALIZING and CREATED states are not reported by this method.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the INITIALIZING and CREATED states are not reported by this method.

Why? Did I read it wrong? But in the org.apache.seatunnel.engine.common.job.JobStatus enumeration, both INITIALIZING and CREATED are marked as EndState.NOT_END.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The INITIALIZING and CREATED states are not reported here, because the updateJobState method is not used to update those two states.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The INITIALIZING and CREATED states are not reported here, because the updateJobState method is not used to update those two states.

Got it, thank you for your patient answer.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants