-
Notifications
You must be signed in to change notification settings - Fork 14
feat: step failed opcode #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: b96bf23 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for the StepFailed opcode to handle permanent step failures when retries are exhausted or explicitly disabled. This aligns with the upstream Inngest changes for improved error handling.
- Introduces
OpcodeStepFailedfor non-retriable step errors - Adds
MaxAttemptsfield to track retry limits - Updates error handling logic to distinguish between retriable and permanent failures
Reviewed Changes
Copilot reviewed 4 out of 67 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| step/run.go | Implements step failure logic with new opcode and retry detection |
| internal/sdkrequest/request.go | Adds MaxAttempts field to CallCtx for retry tracking |
| handler.go | Updates error handling to process StepFailed opcodes and preserve StepError panics |
| go.mod | Updates Go version and dependency versions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ba3df00 to
a0b9a1b
Compare
go.mod
Outdated
| github.com/gosimple/slug v1.12.0 | ||
| github.com/gowebpki/jcs v1.0.0 | ||
| github.com/inngest/inngest v1.11.11-0.20250903154644-c3be9c4c8b45 | ||
| github.com/inngest/inngest v1.11.14-0.20250926175522-7a60b676feb8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I did the vendoring correctly, but note that running go mod tidy does result in the go version on line three becoming 1.24.0 instead of just 1.24 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe re-vendor w/ new latest?
rhino1998
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing blocking
go.mod
Outdated
| github.com/gosimple/slug v1.12.0 | ||
| github.com/gowebpki/jcs v1.0.0 | ||
| github.com/inngest/inngest v1.11.11-0.20250903154644-c3be9c4c8b45 | ||
| github.com/inngest/inngest v1.11.14-0.20250926175522-7a60b676feb8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe re-vendor w/ new latest?
|
Looks like our retry-related test coverage is lacking. Could you add some tests? At
Also:
|
884e821 to
2c4d679
Compare
rhino1998
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable
tests/step_retry_test.go
Outdated
| inngestgo.EventTrigger(eventName, nil), | ||
| func(ctx context.Context, input inngestgo.Input[any]) (any, error) { | ||
| runID.Store(input.InputCtx.RunID) | ||
| attempts.Append(input.InputCtx.Attempt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think attempt resets when the step ultimately fails, so we may not be able to put this out here. @jpwilliams to confirm that.
Instead, maybe we put a counter inside step.Run to ensure it isn't run more than once
e95f140 to
2da1a15
Compare
baf52af to
a559a37
Compare
Add support for the `StepFailed` opcode, which denotes a permanent, non-retriable failure.
Adds support for the
StepFailedopcode, a la inngest/inngest#2992