[Bug]: WebSub deployments to an event gateway built from main fail: platform-api sends a v1alpha1 artifact
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start with the version comparison in platform-api/internal/gatewaytranslator/gwversion/versions.go and the artifact rewrite in platform-api/internal/gatewaytranslator/translate/run.go. Trace how the event gateway's reported version reaches that comparison, then check the WebSub and WebBroker translation paths. Done means event gateway deployments from the same main commit use an API version the gateway accepts; verify with the WebSub reproduction steps in the issue.
索引モデルが issue の本文から書いたものです。
説明
Please select the area the issue is related to
Event Gateway, Platform API
Please select the aspect the issue is related to
Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)
Description
A WebSub API deployed from platform-api to an event gateway built from the same main commit always fails with GATEWAY_PROCESSING_ERROR.
The cause:
- The event gateway reports its own product version,
0.10.0-SNAPSHOT, and platform-api stores that as the gateway's version. - platform-api compares that value with the API gateway's LTS boundary. Below
1.2.0(MinGatewayV1Version,platform-api/internal/gatewaytranslator/gwversion/versions.go:34), it rewrites every artifact'sapiVersiontogateway.api-platform.wso2.com/v1alpha1(platform-api/internal/gatewaytranslator/translate/run.go:42). - The event gateway accepts only
gateway.api-platform.wso2.com/v1, so it rejects the artifact.
What the event gateway controller logged:
level=WARN source=pkg/utils/api_deployment.go:550 msg="Validation error" field=version message="Unsupported API version (must be 'gateway.api-platform.wso2.com/v1')"
level=ERROR source=/build/pkg/controlplanehooks/hooks.go:106 msg="Failed to create WebSub API from YAML" ... error="failed to deploy API configuration from YAML: configuration validation failed with 1 errors"
level=INFO source=pkg/controlplane/client.go:804 msg="Deployment ack sent" ... resource_type=websub action=deploy status=failed
The first line of the artifact platform-api stored for that deployment: apiVersion: gateway.api-platform.wso2.com/v1alpha1.
After the stored gateway version was cleared in platform-api's database, so that no translation ran, the same API deployed and served traffic. That confirms the version comparison is the cause.
WebBroker deployments go through the same translation (platform-api/plugins/eventgateway/service/webbroker_api_deployment.go:210), so they are expected to fail the same way. I only ran the WebSub case.
Expected: an event gateway built from the same commit accepts the deployment. Event-gateway versions should not be compared with the API gateway's LTS release line, or the two should agree on one scheme.
Related: #1951.
Steps to Reproduce
- Build platform-api from
mainwith-tags experimental(this enables the WebSub/WebBroker plugin) and start it. - Build the event gateway from
main(make buildinevent-gateway/). - Register a gateway in platform-api:
POST /api/v0.9/gatewayswith{"id":"gw-event","displayName":"Event gateway","functionalityType":"event","version":"1.0","endpoints":["http://localhost"]}. Mint a token withPOST /api/v0.9/gateways/gw-event/tokens. - Start the event gateway stack (
event-gateway/docker-compose.dev.yaml) with that token and platform-api as its control plane. - Once it connects, call
GET /api/v0.9/gateways/gw-event. It returns"version":"0.10.0-SNAPSHOT". - Create a WebSub API:
POST /api/v0.9/websub-apiswith{"id":"b01-ws","displayName":"b01-ws","version":"v1","projectId":"default","context":"/b01ws","channels":{"orders":{}}}. - Deploy it:
POST /api/v0.9/websub-apis/b01-ws/deploymentswith{"name":"d1","base":"current","gatewayId":"gw-event"}. - The deployment ends
FAILEDwithGATEWAY_PROCESSING_ERROR, and the controller logs the lines shown above.
Severity Level of the Issue
Severity/Blocker (Core functionality is broken and consumer is blocked. Need immediate attention)
Environment Details (with versions)
- Source:
mainatf5c93849;event-gateway/VERSION=0.10.0-SNAPSHOT. - platform-api built from source with
-tags experimental(SQLite). - Event gateway images built from that commit, started from
event-gateway/docker-compose.dev.yaml. - macOS with Rancher Desktop.
- 主要言語
- Go
- スター
- 85
- フォーク
- 137
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 247
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
benchmark
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
mozilla-ai/cq#601 ·
メンテナーはふだん 1 日以内に返信
-
documentation migration
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信