Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix false indeterminate function warning (#757)
## Summary <!-- Succinctly describe your change, providing context, what you've changed, and why. --> Fixes a false indeterminate function warning when using edited inputs in step state. ``` =================================================⚠️ Function may be indeterminate This is expected if a function is updated in the middle of a run, but may indicate a bug if not. We found new steps before seeing all previous steps, which may indicate that the function is non-deterministic. This may cause unexpected behaviour as Inngest executes your function. ================================================= ``` We show this warning when finding a brand new step that the Executor doesn't yet know about. If we've found this and there's a difference between the number of steps we've previously found and the amount of steps the Executor has given us, we display the warning. The value we used for these counts was the `fulfilled` boolean, which tracks whether a step will resolve or reject based on Executor state. This, however, doesn't account for known steps when the Executor provides an `input` instead. This PR adds a small `hasStepState` boolean to each found step, such that we know if the Executor has any knowledge of the step without scoping it down to just resolve/reject. ## Checklist <!-- Tick these items off as you progress. --> <!-- If an item isn't applicable, ideally please strikeout the item by wrapping it in "~~"" and suffix it with "N/A My reason for skipping this." --> <!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" --> - [ ] ~Added a [docs PR](https://github.com/inngest/website) that references this PR~ N/A Bug fix - [ ] ~Added unit/integration tests~ N/A Warning log - [x] Added changesets if applicable ## Related <!-- A space for any related links, issues, or PRs. --> <!-- Linear issues are autolinked. --> <!-- e.g. - INN-123 --> <!-- GitHub issues/PRs can be linked using shorthand. --> <!-- e.g. "- inngest/inngest#123" --> <!-- Feel free to remove this section if there are no applicable related links.--> - Introduced in #748
- Loading branch information