agenda/agendash

[Bug] Agenda 4.2.1 produces an error on Agendash when rescheduling a job

mg-83 opened this issue · 11 comments

mg-83 commented

With the latest Version of Agendash there is an error (404 should be 500) thrown, when trying to do a reschedule on a job. It's working with Agenda 4.1.3 and 4.2.0 without problems.

Hmm, it looks like anything both requeing or deleting jobs are affected. I drilled down into the issue, and it looks like the pkFactory is not a function anymore, but instead an object with an additional createPk function as a property. Agendash is assuming that pkFactory is a function and failing whenever it tries to modify or delete a job.

_id: { $in: jobIds.map((jobId) => collection.s.pkFactory(jobId)) },

_id: { $in: jobIds.map((jobId) => collection.s.pkFactory(jobId)) },

Here are the two references to the broken function.

Edit: I am having this issue with version 4.1.3 of Agenda which you mentioned was ok...
Edit again: No, I'm just jumping the gun, I was looking at package.json instead of package-lock.json. It indeed works on both versions you mentioned.

When trying to reschedule a job in the UI you will get a 404 indeed. Quite blocking :(

image

Same here error 404 not found.

TypeError: collection.s.pkFactory is not a function

It doesn't work

Hmm, it looks like anything both requeing or deleting jobs are affected. I drilled down into the issue, and it looks like the pkFactory is not a function anymore, but instead an object with an additional createPk function as a property. Agendash is assuming that pkFactory is a function and failing whenever it tries to modify or delete a job.

_id: { $in: jobIds.map((jobId) => collection.s.pkFactory(jobId)) },

_id: { $in: jobIds.map((jobId) => collection.s.pkFactory(jobId)) },

Here are the two references to the broken function.

Edit: I am having this issue with version 4.1.3 of Agenda which you mentioned was ok...
Edit again: No, I'm just jumping the gun, I was looking at package.json instead of package-lock.json. It indeed works on both versions you mentioned.

can you confirm it works for you with older versions please?

Agenda is using new mongodb driver now, see ObjectId

fix: #193

Is there anything planned to make this move forward?

@santiq Sorry for pinging you directly but you seem to be the most active contributor.
Can you help on this maybe?

Noticing this issue now. Following to see if it ever gets fixed. Otherwise Agendash is effectively a read-only tool now.

Same here.

Merged the PR. Expect v3.0.0 soon.