Closed andeplane closed 4 years ago
Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide.
Tip: if you only have one commit so far then run: git commit --amend --signoff
and then git push --force
.
If function call ends up giving 503,
nats-queue-worker
crashes withpanic: runtime error: invalid memory address or nil pointer dereference
when trying to do callback.Description
If
X-Callback-Url
is set, and the function call gives 503,functionRes
isnil
, but we try to evaluatefunctionRes.Header.Get("X-Duration-Seconds")
in thepostResult
function. This leads to null pointer error and a dying pod. The call is then being retried multiple times on any new queue-worker pod starting.This PR adds the timeout directly to the headers instead.
Motivation and Context
Crashing queue worker in the state mentioned above.
How Has This Been Tested?
I have patched the worker and tried with and without the change and verified that it does not crash with this patch. I tested this with the following images
Types of changes
Checklist:
git commit -s