-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add idempotency configuration #80
Add idempotency configuration #80
Conversation
@@ -82,8 +82,11 @@ internal class InternalFunctionConfig | |||
val throttle: Throttle? = null, | |||
@Json(serializeNull = false) | |||
val debounce: Debounce? = null, | |||
@Json(serializeNull = false) |
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 missed this when resolving merge conflicts for #71
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.
An observable side effect could a static count on the InngestFunction
right? I think this is good too though
Copied doc from https://github.com/inngest/inngest/blob/6594ccb692121bfe62b11676fe002416df13300b/docs/SDK_SPEC.md?plain=1#L534-L538 https://www.inngest.com/docs/guides/handling-idempotency#at-the-function-level-the-consumer The integration test validates idempotency by - checking an observable side effect, in this case incrementing a static counter variable - check that the second run of the same idempotency was ignored by the dev server
c025fbf
to
0bbeb8c
Compare
I thought I tried that (you'll notice I even named my test step |
Summary
Add
idempotency
as a top level optional string key to function configCopied doc from
https://github.com/inngest/inngest/blob/6594ccb692121bfe62b11676fe002416df13300b/docs/SDK_SPEC.md?plain=1#L534-L538
https://www.inngest.com/docs/guides/handling-idempotency#at-the-function-level-the-consumer
Ideally the integration test could use an observable side effect to seethat the function only ran once, but we are also able to use the return
value from the dev server to check that the second run was ignored.
The integration test validates idempotency by
Checklist
Related