Skip to content

Conversation

@chris-olszewski
Copy link
Member

What was changed

Added has_last_result? to determine if there was a previous workflow result

Why?

Adding has_last_result? allow to differentiate between no previous result and a nil previous result.

This was the same approach taken by the Python SDK temporalio/sdk-python#1067 to differentiate between no previous result and a nil/None result. I think this makes sense, but unsure if there's a more idiomatic Ruby way of approaching this.

Checklist

  1. Closes [Feature Request] Provide last result and last failure to workflows #281

  2. How was this tested:
    Added unit tests using last_failure, last_result and has_last_result?. These tests were adapted from the Python SDK tests.

  3. Any docs updates needed?
    I believe the YARD docs should be sufficient

@chris-olszewski chris-olszewski force-pushed the olszewski/feat_last_result branch from e0d808d to a6654a1 Compare October 14, 2025 20:00
@chris-olszewski chris-olszewski marked this pull request as ready for review October 14, 2025 20:32
@chris-olszewski chris-olszewski requested a review from a team as a code owner October 14, 2025 20:32
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

In retrospect I probably should have exposed last_result as a raw value or something instead of eagerly converting it, but meh.

@chris-olszewski chris-olszewski merged commit 6c46bce into main Oct 15, 2025
7 checks passed
@chris-olszewski chris-olszewski deleted the olszewski/feat_last_result branch October 15, 2025 13:01
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.

[Feature Request] Provide last result and last failure to workflows

3 participants