Scheduled function incorrect response value (unexpected `jobId` property)
When I run
const jobId = await ctx.scheduler.runAfter(...);
from a mutation then jobId
has the correct type of Id<'_scheduled_functions'>
and correct value.
However, when I run const jobId = await ctx.scheduler.runAfter(...);
from an internal action, then jobId
has the correct type of Id<'_scheduled_functions'>
but it's value is of type { jobId: Id<'_scheduled_functions'>}
(ie it has a nested jobId
property).
Convex v1.13.010 Replies
Thanks for reporting, will look into this and if it's a npm issue can have a fix out tomorrow
Just wanted to check the status of this @ballingt?
Sorry for the delay here! It turned out not to be an npm issue but rather a server issue, so no npm release was necessary. This fix was out within a day, let me look for the issue.
Hm I'm not seeing the discord message, but this was fixed three weeks ago by https://github.com/get-convex/convex-backend/commit/2c204a131847b218a4f75baa87079532ab5f902a
Apologies for the delay, I think this was mentioned in another Discord thread and we updated that one but not this one.
GitHub
Fix return type of ctx.scheduler.run* in node actions (#28009) · ge...
These should return the job ID but instead were returning
{ jobId: string }
GitOrigin-RevId: 82c27ac8e6fc908a702fd22e3ae25b1ede6459c1Thanks @ballingt this is now working as expected.
This server change would have broken my production code unexpectedly (as the shape of the response was changed).
It’s unexpected in the sense that I didn’t make any npm or code changes on my side.
Is there some way that I can keep track of Convex server changes and know what has changed and when?
Yes this was a regression for a day, this type of change to a serer API is not supposed to happen.
You can follow changes to the Convex backend by watching these commits https://github.com/get-convex/convex-backend
Ok, thanks. Does the main branch always map to what is in production?
It does not, we do not deploy every commit.
Is there any way to know what has been deployed and when?
@adam Deploys happen all the time and we're always working on making them more seamless; e.g. currently you can detect one by the latency spike or downtime during the deploy, but we'd looking forward to making these deploys without any downtime.
We could provide a feed of this if it were helpful to paid customers, want to email support@convex.dev with what your needs are? It's hard to answer generally because the rollout process is gradual.