lxbme opened a new pull request, #3450: URL: https://github.com/apache/apisix-dashboard/pull/3450
Please answer these questions before submitting a pull request, **or your PR will get closed**. **Why submit this pull request?** - [x] Bugfix **What changes will this PR take into?** The gateway accepts `scheme: "kafka"` on an upstream — the Admin API upstream schema lists `kafka` alongside the L7 (grpc/grpcs/http/https) and L4 (tcp/tls/udp) values, "for specific protocols". The dashboard's zod `UpstreamScheme` enum and the scheme dropdown only offered the L7/L4 values, so a kafka-scheme upstream could not be created through the form (the resolver would reject it). This gap was surfaced by the gateway-schema contract test (the "hand-written zod transcription" item of #3417). Changes: - `src/types/schema/apisix/upstreams.ts` — add a `UpstreamSchemeSpecific` (`kafka`) member to `UpstreamScheme` and export it, so the schema accepts `kafka`. - `src/components/form-slice/FormPartUpstream/index.tsx` — the scheme `Select` gains a "Specific" option group offering `kafka` alongside the existing L7 / L4 groups. **Related issues** Part of #3417 **Checklist:** - [x] Did you explain what problem does this PR solve? Or what new features have been added? - [x] Have you added corresponding test cases? - [ ] Have you modified the corresponding document? - [x] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first Test: `e2e/tests/regression/upstreams.scheme-kafka.spec.ts` creates an upstream through the form with the kafka scheme and asserts the stored resource has `scheme: "kafka"`. Verified with `tsc`, ESLint, the unit suite, and the full e2e suite; the scheme dropdown was also checked manually (kafka appears under a "Specific" group, selects, and submits). Note: the gateway-schema contract test (PR #3449, if it lands) carries a temporary `ENUM_ALLOWLIST` entry documenting this gap (`upstream scheme="kafka"`). Once both land, that entry becomes obsolete and should be dropped when #3449 is rebased. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
