Skip to content

Ruby: Make work_begin/work_end behave more like Go hooks - #1520

Merged
brandur merged 1 commit into
masterfrom
brandur-ruby-work-end-fix
Oct 19, 2026
Merged

brandur merged 1 commit into
masterfrom
brandur-ruby-work-end-fix

Conversation

@brandur

@brandur brandur commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

A few tweaks to Ruby's work_begin/work_end:

  • work_begin failures skip the worker and end hooks.

  • Returning an error from work_end preserves or replaces the failure.
    nil clears it.

  • Each hook receives the previous hook's result.

@brandur
brandur requested a review from bgentry October 18, 2026 19:56
A few tweaks to Ruby's `work_begin`/`work_end`:

* `work_begin` failures skip the worker and end hooks.

* Returning an error from `work_end` preserves or replaces the failure.
  `nil` clears it.

* Each hook receives the previous hook's result.
@brandur
brandur force-pushed the brandur-ruby-work-end-fix branch from ce30e53 to c5c842f Compare October 19, 2026 07:11
@brandur
brandur merged commit 1354a05 into master Oct 19, 2026
33 checks passed
@brandur
brandur deleted the brandur-ruby-work-end-fix branch October 19, 2026 18:47
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