[Bug]: Platform API on SQL Server intermittently returns 500 on deployments in the integration suite

Abierto
#4,376 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github-actions, go, sql

Línea de trabajo

Start in tests/framework and run the SQL Server integration leg with the command in Steps to Reproduce; repeat until a failure occurs. Use its tracking ID to find the Platform API log line in the block's container-logs-* artifact, then trace the reported error to its cause. Done when the intermittent 500s are resolved or concurrent conflicts return a documented non-500 response, with the SQL Server integration leg passing.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Area/Platform-API Aspect/API Severity/Major Type/Bug
Please select the area the issue is related to

Platform API

Please select the aspect the issue is related to

Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)

Description

In the integration suite, mostly in its platform-api-core block, Platform API calls intermittently fail with 500 INTERNAL_ERROR ("An unexpected error occurred."). In the 30 days from 2026-10-20 to 2026-11-19 this failed at least 34 integration suite jobs on 24 different branches (counted from each failed run's latest attempt, so a failure whose re-run passed is not included), and in every one of them Platform API was running on SQL Server (the block's api-sqlserver_* legs). One of those jobs (2026-10-29) also had the same failure on a leg where Platform API ran on Postgres; no other job did.

Most of the failing calls create a deployment:

Call Failures
POST /llm-providers/{id}/deployments 17
POST /subscriptions 4
POST /mcp-proxies/{id}/deployments 3
POST /agent-proxies/{id}/deployments 3
POST /graphql-apis/{id}/deployments 2
GET /me/api-keys?type=AgentProxy 2
PUT /agent-proxies/{id}, POST /rest-apis/{id}/deployments, POST /llm-proxies/{id}/deployments 1 each

An example response:

POST /api/v0.9/llm-providers/{id}/deployments -> 500
{"status":"error","code":"INTERNAL_ERROR","message":"An unexpected error occurred.","trackingId":"…"}

Cause: not known yet. The response carries a tracking id, but the Platform API log for these runs was not kept: the integration framework's block log capture stopped at the end of boot (fixed in #4375). One possibility is SQL Server lock contention or a deadlock between concurrent writes (the block runs two runners in parallel), but nothing confirms it yet. The next failure after #4375 will have the Platform API's log line for the tracking id in the run's container-logs-* artifact.

Expected

A deployment (and the other calls above) succeeds on SQL Server as it does on SQLite and Postgres. If a concurrent write genuinely conflicts, the Platform API retries it or returns a documented, non-500 error.

Failed jobs (34)
Date Branch Failing calls Job
2026-10-29 mcp_ui POST subscriptions https://github.com/wso2/api-platform/actions/runs/40833979005/job/123315639348
2026-10-30 fix/gateway-apikeys-on-recreate POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/41021055993/job/123949903650
2026-10-30 feat/platform-api-audit-sinks POST subscriptions https://github.com/wso2/api-platform/actions/runs/41037391714/job/124003298952
2026-10-30 aiw-llm-test-automation POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/41067305173/job/124103015477
2026-11-05 aiw-llm-test-automation POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/41966889707/job/127047551420
2026-11-05 fault-openai POST subscriptions https://github.com/wso2/api-platform/actions/runs/42058846571/job/127359043132
2026-11-06 binary-dist POST agent-proxies /deployments https://github.com/wso2/api-platform/actions/runs/42176112944/job/127759753390
2026-11-06 test-automation-deplc-dsync-apidef POST agent-proxies /deployments https://github.com/wso2/api-platform/actions/runs/42181496851/job/127773433730
2026-11-06 feat/pdk-count-project-artifacts POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/42221177254/job/127908612187
2026-11-08 version-bump-42481023624 POST agent-proxies /deployments https://github.com/wso2/api-platform/actions/runs/42481655078/job/128738099995
2026-11-09 binary-dist POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/42567160741/job/129002006629
2026-11-09 main GET me /api-keys https://github.com/wso2/api-platform/actions/runs/42577416347/job/129031145731
2026-11-09 feat/subscription-plan-conditions POST mcp-proxies /deployments https://github.com/wso2/api-platform/actions/runs/42586770167/job/129103330548
2026-11-09 binary-dist GET me /api-keys https://github.com/wso2/api-platform/actions/runs/42656669233/job/129301552399
2026-11-10 binary-dist POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/42750325765/job/129614121546
2026-11-10 test/api-portal-it-test-improvements POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/42765250306/job/129715570722
2026-11-10 main POST mcp-proxies /deployments https://github.com/wso2/api-platform/actions/runs/42830449236/job/129882232733
2026-11-10 console-test-automation POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/42766105991/job/130298840047
2026-11-11 valkey-semantic-caching POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/42998122740/job/130457477076
2026-11-12 azure-authentication-it POST llm-proxies /deployments https://github.com/wso2/api-platform/actions/runs/43176958278/job/131058061787
2026-11-12 feat/mcp-graphql-portals POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/43193400645/job/131105411780
2026-11-12 azure-authentication-it POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/43213314827/job/131181427570
2026-11-12 feat/001-model-failover-docs PUT agent-proxies https://github.com/wso2/api-platform/actions/runs/43216267911/job/131184208459
2026-11-13 fix-api-version-context-update POST rest-apis /deployments https://github.com/wso2/api-platform/actions/runs/43372602801/job/131716092001
2026-11-13 fix-dont-ship-listener-private-key POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/43391237508/job/131774688910
2026-11-13 helm/gateway-chart-2026.11.13-r1 POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/43486109592/job/132100057987
2026-11-14 feat/001-model-failover-docs POST graphql-apis /deployments https://github.com/wso2/api-platform/actions/runs/43652778929/job/132626904834
2026-11-15 feat/001-model-failover-docs POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/43720265101/job/132833043507
2026-11-15 feat/001-model-failover-docs POST subscriptions https://github.com/wso2/api-platform/actions/runs/43731264962/job/132866150077
2026-11-16 feature/global-dynamic-endpoints POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/43811671571/job/133116770804
2026-11-16 fault-flow-integration-tests POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/43882369794/job/133355823061
2026-11-16 fault-flow-integration-tests POST llm-providers /deployments https://github.com/wso2/api-platform/actions/runs/43882369794/job/133355823157
2026-11-16 operator-least-privilege-values-policy POST mcp-proxies /deployments https://github.com/wso2/api-platform/actions/runs/43927144099/job/133513573865
2026-11-18 improve/subscription-token-owner-scope POST graphql-apis /deployments https://github.com/wso2/api-platform/actions/runs/44228278260/job/134841642802
Steps to Reproduce
  1. From tests/framework, run the block's SQL Server legs: go test ./suites/it -run TestIntegrationSuite -count=1 -v -args -blocks=platform-api-core/api-sqlserver_gateway-sqlite -logs.
  2. Repeat until a scenario fails with -> 500 on a Platform API call, then look up the response's trackingId in the Platform API lines of the block log under IT_LOG_OUT.
Severity Level of the Issue

Severity/Major (Important functionality is broken. Should be prioritized. Doesn't need immediate attention)

Environment Details (with versions)

GitHub Actions, Integration Tests and Platform Tests workflows, integration suite jobs on pull request branches based on main, 2026-10-29 to 2026-11-18. Platform API built from source, on SQL Server.

Lenguaje dominante
Go
Estrellas
85
Forks
142
Merge medio
1 d 7 h
PR fusionados (30 d)
255

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de wso2/api-platform

Todos los issues de wso2/api-platform

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.