Bundle-upload origin should default to the platform upload service — preflight accepts app hosts and fails late with a bare 404
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
- 42/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
Hướng nghiên cứu
Start with services/deploy/cdn.ts and trace how resolveCdnDeployInputs chooses storageOrigin; compare that with the cdn.origin mapping described in the issue. Read probeStorageOrigin and the login flow in handlers/keys.ts, then check the relevant deploy tests and docs/self-deploy.md. Done means deploy selects the upload service for the platform runtime and rejects an app-site origin before the build with an actionable message.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment
- CLI:
everything-dev2.0.0-rc.27(bos deploy, interactive, macOS) - Session created by
bos login --key --site https://everything.dev - Runtime: child (
extends: bos://dev.everything.near/everything.dev), publishing gatewaypreview.nearbuilders.org(first publish)
Symptom
bos deploy builds all 12 workspaces, passes preflight, then fails at the first upload leg:
✗ Deploy failed
Error: [upload] bundle upload for ui failed: 404 Not Found
The uploads went to the app site, not the upload service. Resolution chain in services/deploy/cdn.ts (resolveCdnDeployInputs):
BOS_STORAGE_ORIGIN env → session.siteUrl → https://<gateway>
With no env var and a login session pinned to --site https://everything.dev, storageOrigin becomes https://everything.dev. Preflight passes because probeStorageOrigin() only checks GET /health → "OK"/empty and GET /.well-known/mcp.json — an app host running the platform API answers both. But bundle uploads POST /api/storage/bundles, which per ADR 0027 is served only by the standalone upload service (https://upload.everything.dev); the app host returns a bare 404 Not Found (non-retryable, non-JSON body, no hint about the actual problem).
BOS_STORAGE_ORIGIN set on the bos login command does not help — the CLI's login flow (handlers/keys.ts) never reads or persists it; only siteUrl (from --site) is stored, and it silently becomes the deploy's upload origin.
Impact
- Interactive/self-deployed uploads require a per-command
BOS_STORAGE_ORIGIN=https://upload.everything.devprefix (andbos deploydoes not load.env— only dev/start flows do), so it is easy to lose and easy to misunderstand. - The failure surfaces late (after the full build) with a body of
404 Not Foundand no actionable hint. - The same weakness applies to the resolved-fallback
https://<gateway>— a gateway origin upload is refused per the docs, but only at this late stage.
Asks
- Default the upload origin to the platform upload service. When the runtime extends the base platform / inherits
cdn.origin: https://cdn.everything.dev, defaultstorageOrigintohttps://upload.everything.dev(the standalone write/control service for that CDN) instead of the sessionsiteUrl. Interactive self-deploys then need no env vars at all. - Persist a storage origin at login (or resolve it at deploy time from the platform release manifest /
cdn.originmapping) rather than reusing the session'ssiteUrl, which is an app site by design. - Strengthen
probeStorageOriginto verify upload capability before the build (e.g. the storage service exposes an identity/capability route, or probePOST-ability of/api/storage/bundleswith an empty payload) and fail fast with an actionable message ("your login is pinned to an app site; set BOS_STORAGE_ORIGIN=https://upload.everything.dev"). - Load
.envinbos deploy(currently onlybos dev/bos startflows do, viaenv/project-env.ts) so per-project defaults work — or document that the var must be exported per command. - Docs:
BOS_STORAGE_AUTH_ORIGINis an upload-service server-side var (apps/upload/src/auth.ts), but its name invites pasting into client CLI commands, where it is a silent no-op (I did exactly that). A client/server var split indocs/self-deploy.mdwould help.
Repro
bos login --key --site https://everything.dev # pins session.siteUrl = app site
bos deploy # → builds fine, then:
# [upload] bundle upload for ui failed: 404 Not Found
# origin used: https://everything.dev/api/storage/bundles (app host)
BOS_STORAGE_ORIGIN=https://upload.everything.dev bos deploy # works
- Ngôn ngữ chính
- TypeScript
- Star
- 5
- Fork
- 3
- Merge trung bình
- 9 giờ 37 phút
- Pull request đã merge (30 ngày)
- 157
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không 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 NEARBuilders/everything-dev
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
NEARBuilders/everything-dev#628 · 1 bình luận ·
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 78/100
NEARBuilders/everything-dev#400 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
NEARBuilders/everything-dev#667 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
NEARBuilders/everything-dev#665 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
NEARBuilders/everything-dev#664 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NEARBuilders/everything-dev
Issue tương tự
-
area:cli bug P4
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug from-studio
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
esengine/DeepSeek-Reasonix#14868 ·
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 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
loopbackio/loopback-next#11878 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug 🐛
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
comunica/comunica#1925 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày