status omits API_URL when [api] enabled = false, although Kong is still started (same class as #5332)
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Bắt đầu trong apps/cli/src/commands/start/start.gates.ts và so sánh cơ chế gating của Kong với apps/cli/src/command-internal/legacy-status-values.ts và status-values.ts. Theo dõi cách kongEnabled điều khiển API_URL so với REST_URL và GRAPHQL_URL. Hoàn tất khi status -o env báo cáo API_URL bất cứ khi nào Kong đang chạy, trong khi các URL API dữ liệu vẫn tuân theo api.enabled; tái hiện với [api] enabled = false và xác minh đầu ra.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Affected area
Local development
Supabase CLI version
v2.117.0 (the same gating is still on develop and in v2.120.0-beta.7)
Operating system
macOS 26.3.1 (Apple silicon)
Installation method
npm (npx supabase)
Command
supabase start
supabase status -o env
with [api] enabled = false in supabase/config.toml.
Actual output
supabase status -o env prints no API_URL (nor REST_URL / GRAPHQL_URL). The keys it prints are:
ANON_KEY DB_URL INBUCKET_URL JWT_SECRET MAILPIT_URL PUBLISHABLE_KEY SECRET_KEY SERVICE_ROLE_KEY
Kong is nevertheless running and serving the other services through the same address:
$ curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:<api.port>/auth/v1/health
200
$ curl -si http://127.0.0.1:<api.port>/rest/v1/ | head -1
HTTP/1.1 503 Service Temporarily Unavailable # Server: kong/2.8.1, {"message":"name resolution failed"}
Expected behavior
API_URL is printed whenever Kong is running, because it is the gateway for Auth, Storage and Functions, not only for the Data API. Only REST_URL / GRAPHQL_URL should depend on api.enabled.
This is the same class of problem as #5332 (fixed by #5335 for supabase start -x postgrest), but reached through [api] enabled = false instead of -x:
apps/cli/src/commands/start/start.gates.ts(v2.117.0, line 160):kong: !isExcluded("kong")— Kong starts regardless ofapi.enabled; onlypostgrestis gated onapiEnabled(line 164).apps/cli/src/command-internal/legacy-status-values.ts(v2.117.0, line 392) andstatus-values.tsondevelop(line 340):const kongEnabled = apiEnabled && !isExcluded(containerIds.kong) && !isExcluded(KONG_IMAGE_NAME);— soAPI_URLis hidden wheneverapi.enabledis false.
A possible fix is to gate kongEnabled the same way start does (on Kong's own exclusion only), and keep apiEnabled for postgrestEnabled / REST_URL / GRAPHQL_URL.
Steps to reproduce
- In
supabase/config.toml, set[api] enabled = false(the app uses Auth but not the Data API). - Run
supabase start. - Run
supabase status -o env—API_URLis missing. - Run
curl http://127.0.0.1:<api.port>/auth/v1/health— returns 200, so the gateway is up at the addressstatusdid not print.
Additional context
We close the Data API both locally and in production so that the local stack has the same shape as production. Because status no longer names the gateway, local tooling that reads API_URL from supabase status -o env (for NEXT_PUBLIC_SUPABASE_URL) has to rebuild the URL from [api] port instead.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.4k
- Fork
- 537
- Merge trung bình
- 21 giờ 24 phút
- Pull request đã merge (30 ngày)
- 378
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọ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 supabase/cli
-
config push: changing auth.oauth_server.authorization_url_path fails with 400 (enabled and path must be sent together)Có thể đã có người làm @itz-puneet đã nhận hôm nay. Đang mở🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
supabase/cli#7087 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
db schema declarative sync: no way to fail (non-zero exit) when the generated migration is destructiveCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở✨ Feature supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
stack: the HTTP gateway closes idle keep-alive connections after 5 s, so a client whose event loop is blocked gets ECONNRESET (`fetch failed`) on its next requestCó thể đã có người làm @7ttp đã nhận 15 ngày trước. Đang mở🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
supabase/cli#6975 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
📘 Docs supabase/cli
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
supabase/cli#6974 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Migration error caret is missing or misplaced when the statement contains multibyte charactersĐang mở🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
components-web-app/docs#260 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
521xueweihan/HelloGitHub#4025 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ctrf-io/playwright-ctrf-json-reporter#117 ·
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 82/100
voidzero-dev/void#478 ·
Maintainer thường phản hồi trong vòng 1 ngày