WebBrokerAPI: Fix: Include webbroker_apis in GetAllConfigs UNION query
@senthuran16 is already working on this.
Since May 14, 2026.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Summary
The GetAllConfigs function in gateway/gateway-controller/pkg/storage/sql_store.go builds a UNION query across all artifact type tables but is missing the webbroker_apis table. This means WebBrokerApi artifacts are saved and retrievable via direct lookup, but are silently omitted from full-list scans and in-memory cache hydration paths.
Impact
Any code path that calls GetAllConfigs (e.g., cache reload on gateway restart) will not return WebBrokerApi configurations, potentially causing stale or incomplete state.
Fix
Add a UNION branch for webbroker_apis in GetAllConfigs, consistent with the existing branches for rest_apis, websub_apis, llm_providers, llm_proxies, and mcp_proxies. Also increment the parameter count passed to s.query.
UNION ALL
+ SELECT a.uuid, a.kind, a.handle, a.display_name, a.version, wb.configuration, a.desired_state,
+ a.deployment_id, a.origin, a.created_at, a.updated_at, a.deployed_at,
+ a.cp_sync_status, a.cp_sync_info, a.cp_artifact_id
+ FROM artifacts a
+ JOIN webbroker_apis wb ON a.uuid = wb.uuid AND a.gateway_id = wb.gateway_id
+ WHERE a.gateway_id = ?
+
+ UNION ALL
SELECT a.uuid, a.kind, a.handle, a.display_name, a.version, lp.configuration, a.desired_state,
And update the query call:
- rows, err := s.query(query, s.gatewayId, s.gatewayId, s.gatewayId, s.gatewayId, s.gatewayId)
+ rows, err := s.query(query, s.gatewayId, s.gatewayId, s.gatewayId, s.gatewayId, s.gatewayId, s.gatewayId)
References
- Identified in PR: https://github.com/wso2/api-platform/pull/1954
- Review comment: https://github.com/wso2/api-platform/pull/1954#discussion_r3239562683
- Requested by: @senthuran16
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.
Assessment
This issue has not been assessed yet.