-
Notifications
You must be signed in to change notification settings - Fork 413
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
[Bug]: Sandbox .updateData
unexpected behavior regarding job data
#2731
[Bug]: Sandbox .updateData
unexpected behavior regarding job data
#2731
Comments
it is unlikely a bug as trivial as this exists in the codebase, if you could please provide some minimal code to reproduce it we can certainly help you out. |
@manast I agree with your sentiment. But here's a gist of my issue. I've tried to reproduce my issue in a branch here: https://github.com/taskforcesh/bullmq/compare/master...tolgap:bullmq:chore/reproduce-issue-2731?expand=1 I'm trying to utilize the Step Pattern in your docs. But the only difference is: each step "builds on top of the jobData" of previous steps. But I keep losing the fields I've added in the step before. Its like $> yarn test
sandbox step pattern
1) should process steps and complete
0 passing (554ms)
1 failing
1) sandbox step pattern
should process steps and complete:
AssertionError: expected { step: 'FINISH', …(1) } to deeply equal { step: 'FINISH', …(2) }
+ expected - actual
{
"extraDataFinishedStep": "finish data"
+ "extraDataSecondStep": "second data"
"step": "FINISH"
}
at Worker.<anonymous> (tests/test_sandbox_step_pattern.ts:45:34)
at Worker.emit (node:events:513:28)
at Worker.emit (src/classes/queue-base.ts:111:20)
at Worker.emit (src/classes/worker.ts:323:18)
at handleCompleted (src/classes/worker.ts:757:14)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Worker.processJob (src/classes/worker.ts:806:14)
at Worker.retryIfFailed (src/classes/worker.ts:1007:16) |
.updateData
unexpected behavior regarding job data
Thanks for the extra information, we are looking into it. |
Version
v5.12.6
Platform
NodeJS
What happened?
I cannot get
job.updateData
andjob.moveToDelayed
methods working without having them fail the first couple of times. Then when the jobs are retried (like 2 or 3 times) it magically succeeds.I am using Sandboxed workers of course 😄.
I'm trying to utilize the Step Pattern in your docs. But the only difference is: each step "builds on top of the jobData" of previous steps. But I keep losing the fields I've added in the step before. Its like
job.updateData()
updates the data in a "delayed" fashion if it contains new keys.How to reproduce.
Here's a reproduction within
bullmq
tests in my forked repo: https://github.com/taskforcesh/bullmq/compare/master...tolgap:bullmq:chore/reproduce-issue-2731?expand=1Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: