[Bug]: An artifact removed from an immutable gateway's files still shows as deployed in the control plane
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Read gateway/gateway-controller/cmd/controller/main.go around line 168, pkg/immutable/loader.go, and pkg/controlplane/sync.go around line 695 to trace startup loading and deployment sync. Reproduce with immutable mode, deployment sync enabled, and two annotated REST API files; remove one and restart the controller. Done when the control plane reports that API as UNDEPLOYED after restart.
由索引模型根据 Issue 内容生成。
描述
Please select the area the issue is related to
Gateway
Please select the aspect the issue is related to
Aspect/Other (Anything else which does not match above categories)
Description
An immutable gateway pushes the artifacts it loads from files to the control plane, and they show as deployed there. When a file is removed and the gateway restarts, the gateway no longer serves that artifact, but it never tells the control plane. The control plane keeps showing the deployment as DEPLOYED with no undeploy.
Observed (deployment sync enabled)
- Two REST API files,
aandb, each with thegateway.api-platform.wso2.com/project-idannotation. After a restart, both appear in the control plane, andb's deployment isDEPLOYED. - I changed
a's display name, removedb's file, and restarted gateway-controller.- The control plane received
a's new display name, so the push after the restart did happen. - The gateway's
GET /rest-apis/banswers 404. - The control plane's
GET /api/v0.9/rest-apis/b/deploymentsstill listsDEPLOYEDand noUNDEPLOYED.
- The control plane received
Expected
After the restart, the control plane shows b's deployment on that gateway as undeployed.
Cause
- Immutable mode deletes the SQLite database on every boot (
gateway/gateway-controller/cmd/controller/main.go:168), so the gateway has no record of what it served before. - The loader only creates what is in the files (
pkg/immutable/loader.go). The connect-time push sends only the artifacts the gateway still has (pkg/controlplane/sync.go:695), so nothing reportsbas undeployed.
Steps to Reproduce
- Start an immutable gateway (SQLite,
[immutable_gateway] enabled = true) connected to platform-api with deployment sync on. Give it two REST API files with the project-id annotation of an existing project. - Check that both APIs show a
DEPLOYEDdeployment in the control plane. - Remove one file and restart gateway-controller.
- The control plane still shows that API's deployment as
DEPLOYED.
Severity Level of the Issue
Severity/Minor (Non-critical functionality. Can be fixed in future releases)
Environment Details (with versions)
Current main (0ee943ff4). Platform-api and gateway built from source and run by the IT suite (tests/framework), with the gateway on SQLite, on macOS with Rancher Desktop.
- 主要语言
- Go
- 星标
- 85
- 派生
- 137
- 平均合并
- 1 天 12 小时
- 30 天内合并 PR
- 247
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wso2/api-platform 的其他 Issue
-
Area/DeveloperPortal Aspect/UI Severity/Minor Type/Bug
难度 1/5 1 小时以内 新手友好度 88/100
wso2/api-platform#4369 ·
维护者通常 1 天内回复
-
[Bug]: host-rewrite policy documentation lists fewer allowed host characters than the policy accepts未关闭Area/Policies Aspect/Other Severity/Trivial Type/Bug
难度 1/5 1 小时以内 新手友好度 91/100
wso2/api-platform#4355 ·
维护者通常 1 天内回复
-
Area/Gateway Aspect/API Severity/Minor Type/Bug
难度 2/5 1-3 小时 新手友好度 78/100
wso2/api-platform#4348 ·
维护者通常 1 天内回复
-
Aspect/AI Aspect/API. Severity/Major
难度 2/5 1-3 小时 新手友好度 77/100
wso2/api-platform#4343 ·
维护者通常 1 天内回复
-
Area/Policies Aspect/Configuration Severity/Minor Type/Bug
难度 2/5 1-3 小时 新手友好度 74/100
wso2/api-platform#4330 ·
维护者通常 1 天内回复
查看 wso2/api-platform 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
progress-deadline annotation accepts "0s" although validation says it must be positive可能已有人在做 @BahaaMattar 今天认领。 未关闭area/API kind/bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
api cleanup
难度 1/5 1 小时以内 新手友好度 86/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
router-for-me/CLIProxyAPI#7708 ·
维护者通常 1 天内回复