Medplum v5.0.3 – Migration Failure & Missing AI Fe...
# support
d
🔧 We recently upgraded our self-hosted Medplum Server and App to v5.0.3 and are encountering two issues: 1. Blocking Migration Failure – data-migration-v31 Description: All migrations from v17–v30 ran successfully, but data-migration-v31 repeatedly fails and prevents the deployment from completing. Details: ▫️ The job fails in <600ms on every retry ▫️The failure occurs in the "Add output" step ▫️Error: "Parameters not implemented" This migration keeps retrying and never succeeds, blocking post-deployment tasks. 2. Missing AI Feature Flags in Project Settings Description: ▫️The AI feature flags are not visible in the Project > Settings > Features UI. ▫️We are therefore unable to enable any native AI functionality. Please let me know if any additional logs or configs would help. Thanks!! https://cdn.discordapp.com/attachments/1440236594392203325/1440236596162068561/Screenshot_2025-11-17_at_4.35.14_PM.png?ex=694104da&is=693fb35a&hm=dd4a7c4f9b041fb0fbbf69c3f43b54d6cdbbfb6e0bceb696c06cba90f1f3f6d6& https://cdn.discordapp.com/attachments/1440236594392203325/1440236597349187656/Screenshot_2025-11-17_at_4.34.57_PM.png?ex=694104db&is=693fb35b&hm=b46fbd51b0c002bc1f8baef94be55e3c2a55d9785c921a7d2e439a83edcc19e3&
i
@DevOps Demon , are you seeing anything in your logs while attempting to do the migration?
d
Will share the logs here
n
Also a GCP medplum self-hoster but I believe issue 2 is an artifact of issue 1. The failing
v31
job runs
rebuildR4ValueSets
and the dropdown is populated from a value set, which has not been rebuilt. 1. What does the
JSON
tab say on the failed
AsyncJob
. It should have more detail than the
Timeline
tab 2. What GCP infra do you run on? Are you using official medplum images or do you have your own CI?
d
Hi @nathan-watkins-unityai i have tried both my own CI and i used official images as well i am running it as container on VM and as pod on GKE too and the db is in cloud sql with Redis deployed on memory store
{"level":"ERROR","timestamp":"2025-11-20T06:06:27.470Z","msg":"Error processing post-commit callback","error":"Error: Gone","stack":["Error: Gone"," at _Repository.readResourceFromDatabase (file:///usr/src/medplum/packages/server/dist/index.js:36043:13)"," at process.processTicksAndRejections (node:internal/process/task_queues:103:5)"," at async _Repository.readResource (file:///usr/src/medplum/packages/server/dist/index.js:36000:46)"," at async file:///usr/src/medplum/packages/server/dist/index.js:36327:23"," at async _Repository.invokePostCommitCallback (file:///usr/src/medplum/packages/server/dist/index.js:37752:7)"," at async _Repository.postCommit (file:///usr/src/medplum/packages/server/dist/index.js:37740:7)"," at async _Repository.updateResourceImpl (file:///usr/src/medplum/packages/server/dist/index.js:36326:5)"," at async _Repository.createResource (file:///usr/src/medplum/packages/server/dist/index.js:35978:22)"," at async rebuildR4ValueSets (file:///usr/src/medplum/packages/server/dist/index.js:29227:7)"," at async AsyncJobExecutor.run (file:///usr/src/medplum/packages/server/dist/index.js:25158:20)"],"message":"Gone","outcome":{"resourceType":"OperationOutcome","id":"gone","issue":[{"severity":"error","code":"deleted","details":{"text":"Gone"}}]},"projectId":"019565fe-26bd-713c-9f0b-f92212a9ed24","profile":"Practitioner/019565fe-26ca-76fc-9280-4f3a341ae5a1","requestId":"51f26dae-417a-4823-87b9-bf5bd67103a8","traceId":"2b754dea-66e4-4b32-a397-a4284855707e"}
Above error is Error Processing Post-Commit Callback
And there is one more
—————————————————- {"level":"ERROR","timestamp":"2025-11-20T06:06:27.519Z","msg":"AsyncJob execution failed","name":"","asyncJobId":"db009ca7-cdf9-4ae5-b2ea-ca72422e1c95","error":"Gone","stack":"Error: Gone\n at _Repository.readResourceFromDatabase (file:///usr/src/medplum/packages/server/dist/index.js:36043:13)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async _Repository.readResource (file:///usr/src/medplum/packages/server/dist/index.js:36000:46)\n at async _Repository.deleteResource (file:///usr/src/medplum/packages/server/dist/index.js:36724:18)\n at async deleteExisting (file:///usr/src/medplum/packages/server/dist/index.js:29250:7)\n at async rebuildR4ValueSets (file:///usr/src/medplum/packages/server/dist/index.js:29226:7)\n at async AsyncJobExecutor.run (file:///usr/src/medplum/packages/server/dist/index.js:25158:20)","projectId":"019565fe-26bd-713c-9f0b-f92212a9ed24","profile":"Practitioner/019565fe-26ca-76fc-9280-4f3a341ae5a1","requestId":"51f26dae-417a-4823-87b9-bf5bd67103a8","traceId":"2b754dea-66e4-4b32-a397-a4284855707e"}
Async Job Execution Failed
n
The
Error: Gone
is a clue. Have you deleted the
R4
Project that gets automatically created on initial startup by chance? Not an expert but my guess is
rebuildR4ValueSets
passes in the [r4ProjectId](https://github.com/medplum/medplum/blob/cb7b29dfb61310298b8c778e9ccb8140466463f8/packages/server/src/seeds/valuesets.ts#L31) to each resource, so it's failing in this [postCommit](https://github.com/medplum/medplum/blob/cb7b29dfb61310298b8c778e9ccb8140466463f8/packages/server/src/fhir/repo.ts#L834) when it tries to call [readResource](https://github.com/medplum/medplum/blob/cb7b29dfb61310298b8c778e9ccb8140466463f8/packages/server/src/fhir/repo.ts#L341-L348) on the deleted project id, returning a 410
>We are therefore unable to enable any native AI functionality To resolve this immediately at least, you can update your Project directly via the
JSON
tab to add [ai](https://github.com/medplum/medplum/blob/cb7b29dfb61310298b8c778e9ccb8140466463f8/packages/definitions/src/fhir/r4/valuesets-medplum.json#L128) to your
Project.features
d
Ohh will look in to it. Thanks
Hey @nathan-watkins-unityai , just wanted to send a huge, massive thank you for solving the [Medplum v5.0.3 – Migration Failure & Missing AI Feature Flags] earlier. That was a truly critical time, and you saved the day—your fast help was absolutely clutch. Seriously appreciate you! 🙌
n
Nice - glad I could help!
52 Views