Skip to content

fix(job): close RecorderIO at session end if session close was interrupted#5927

Merged
longcw merged 1 commit into
mainfrom
longc/fix-session-end-cleanup
Jun 2, 2026
Merged

fix(job): close RecorderIO at session end if session close was interrupted#5927
longcw merged 1 commit into
mainfrom
longc/fix-session-end-cleanup

Conversation

@longcw
Copy link
Copy Markdown
Contributor

@longcw longcw commented Jun 2, 2026

Complements #5926.

When session.aclose() is cancelled during job shutdown (e.g. by the aclose timeout), it can return before RecorderIO.aclose() is reached, leaving the recorder still recording. make_session_report() then raises and the error propagates out of _on_session_end, preventing the registered shutdown callbacks from running.

This closes RecorderIO at session end if it is still recording, and wraps _on_session_end() so a failure there no longer blocks the shutdown callbacks.

…upted

Complements #5926.

When session.aclose() is cancelled during job shutdown (e.g. by the aclose timeout), it can return before RecorderIO.aclose() is reached, leaving the recorder still recording. make_session_report() then raises and the error propagates out of _on_session_end, preventing the registered shutdown callbacks from running.

This closes RecorderIO at session end if it is still recording, and wraps _on_session_end() so a failure there no longer blocks the shutdown callbacks.
@chenghao-mou chenghao-mou requested a review from a team June 2, 2026 01:51
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@longcw longcw merged commit 982ae50 into main Jun 2, 2026
26 checks passed
@longcw longcw deleted the longc/fix-session-end-cleanup branch June 2, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants