Skip to content
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

Improves the retry behavior of functions by returning retry headers #39

Merged
merged 6 commits into from
Feb 28, 2024

Conversation

KiKoS0
Copy link
Collaborator

@KiKoS0 KiKoS0 commented Feb 27, 2024

  • Add support for retriable/non-retriable errors in steps by returning X-Inngest-No-Retry and Retry-After headers as required.
  • Improve how we are creating functions in tests by DRYing out the ids.
  • Add tests cases for retriable/non-retriable functions.

@KiKoS0 KiKoS0 self-assigned this Feb 27, 2024
@KiKoS0 KiKoS0 marked this pull request as draft February 27, 2024 23:52
@KiKoS0 KiKoS0 marked this pull request as ready for review February 28, 2024 00:28
Copy link
Contributor

@darwin67 darwin67 left a comment

Choose a reason for hiding this comment

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

Looking good!

inngest-core/src/main/kotlin/com/inngest/Function.kt Outdated Show resolved Hide resolved
@@ -33,6 +33,7 @@ enum class OpCode {
enum class ResultStatusCode(val code: Int, val message: String) {
StepComplete(206, "Step Complete"),
FunctionComplete(200, "Function Complete"),
NonRetriableError(400, "Bad Request"),
Error(500, "Function Error"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we rename this one RetriableError just to be explicit?

@KiKoS0 KiKoS0 merged commit cf9e627 into main Feb 28, 2024
11 checks passed
@KiKoS0 KiKoS0 deleted the implement-function-retries branch February 28, 2024 01:56
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.

3 participants