[Bug]: Schema-version Mismatch Forces a DB wipe, Silently Breaking all RestApi Routes (404) with no Self-Healing
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Please select the area the issue is related to
Area/Management (Management API or Management Portal UI), Area/Operator (Kubernetes operator for AI Gateway or Regular Gateway)
Please select the aspect the issue is related to
Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)
Description
After a gateway-controller upgrade, the controller failed to start with
unsupported schema version N, expected 3; delete the database to recreate.
The controller's only offered remedy is to delete the database. So we deleted the PVC (default SQLite backend, DB on a PVC).
After it restarted on a fresh DB, all RestApi-backed routes started returning 404. The RestApi resources were all still present and showing Programmed=True, so from kubectl everything looked healthy while the gateway served 404s. Restarting the controller didn't also help; the only fix was deleting and recreating each RestApi.
It is also worth noting the default SQLite backend (single-file, single-writer, single RWO PVC, single replica) is also a single point of data loss with no HA, while the Postgres backend is implemented but still documented as "future".
Steps to Reproduce
- Deploy api-platform-operator and deploy APIGateway + few RestAPIs.
- Check the behavior of RestAPIs after PVC clean up and controller restart
Severity Level of the Issue
Severity/Blocker (Core functionality is broken and consumer is blocked. Need immediate attention)
Environment Details (with versions)
Gateway operator version: 0.8.0
api-platform/helm-charts/gateway chart version: 1.1.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in gateway/gateway-controller and reproduce the schema-version failure by cleaning the SQLite PVC and restarting the api-platform-operator with existing RestAPIs. Trace how the controller handles the mismatch and how RestAPI resources become programmed while serving 404s. Done should include a defined recovery path that avoids unnecessary data loss and verifies routes after controller restart; compare the documented PostgreSQL backend where relevant.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql, sqlite
- Domain
- api, database, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100