Skip to content

v0.5.9

Choose a tag to compare

@hi-pender hi-pender released this 23 Oct 08:01
87edeb1

BugFix

Fixed State Access in Graph Callbacks​

In v0.5.4, while introducing the Graph Cancel Interrupt feature, we inadvertently moved the execution point of Graph Callbacks. This caused ProcessState to fail when retrieving state content inside a callback, resulting in the following error during ProcessState execution:

err := ProcessState[*State](ctx, func(_ context.Context, state *testStruct) error {
	// your code here
	return nil
})
if err != nil {
	// error: "get state from context fail: have not set state"
}

This release fixes the state access issue and includes ​comprehensive unit tests​ to prevent future regressions. Graph callbacks now correctly access state via ProcessState as intended.

What's Changed

Full Changelog: v0.5.8...v0.5.9