gue
gue copied to clipboard
panic recovery is broken
defer recoverPanic(ctx, ll, j) in worker.go:206 doesn't log the panic and populates lastError with an empty string, even tho it increases the errerCount value
I'm using the zap and pq adapter and
I spend some time looking into the issue but I couldn't find the reason
What version are you using?
Are you using hooks? If yes - can be related to https://github.com/vgarvardt/gue/issues/65 and should be fixed in the latest version. Can you pls check?
I've been using github.com/vgarvardt/gue/v3 v3.3.0 so far
is v4.0.0-alpha.9 the latest version ?
Yes, v4 is currently the latest version I'm working on. The main difference between v3 and v4 is some old adapters and deprecated functionality removal, all the core functionality remained unchanged. You can check the full changelog at https://github.com/vgarvardt/gue/blob/master/CHANGELOG.md
I upgraded to the latest commit github.com/vgarvardt/gue/v4 v4.0.0-alpha.9.0.20220607211303-a7e770730350 and tested it with and without WithPoolHooksJobDone.
The issue is still present.
Would it be an option to remove panic recovery, or is it required to requeue the job?
Yes, it is required to requeue the job. I would really appreciate if you could implement a test that will reproduce the behaviour so that I could fix it.
Tried to reproduce the issue with the test at https://github.com/vgarvardt/gue/pull/68 but could not.
I can't reproduce it either. I'll look further into it.
Will close the issue as it is pretty outdated. In case you'll be able to reproduce empty panic stacktrace feel free to reopen the issue.