[Bug]: An artifact removed from an immutable gateway's files still shows as deployed in the control plane
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 57/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Go
- Star
- 85
- Fork
- 137
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 247
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của wso2/api-platform
-
Area/DeveloperPortal Aspect/UI Severity/Minor Type/Bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
wso2/api-platform#4369 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: host-rewrite policy documentation lists fewer allowed host characters than the policy acceptsĐang mởArea/Policies Aspect/Other Severity/Trivial Type/Bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
wso2/api-platform#4355 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Area/Gateway Aspect/API Severity/Minor Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
wso2/api-platform#4348 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Aspect/AI Aspect/API. Severity/Major
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
wso2/api-platform#4343 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: content-length-guardrail policy accepts a non-string streamingJsonPath at API creationĐang mởArea/Policies Aspect/Configuration Severity/Minor Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
wso2/api-platform#4330 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của wso2/api-platform
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
needs discussion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openfga/openfga.dev#1436 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
都道府県を指定すると区名から始まる住所に市名を補わないĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
digital-go-jp/abr-geocoder#457 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
benchmark
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
mozilla-ai/cq#601 ·
Maintainer thường phản hồi trong vòng 1 ngày