Bundle-upload origin should default to the platform upload service — preflight accepts app hosts and fails late with a bare 404
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 5
- Fork
- 3
- Merge medio
- 9h 37m
- PR unite (30g)
- 157
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NEARBuilders/everything-dev
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
NEARBuilders/everything-dev#628 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NEARBuilders/everything-dev#400 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
NEARBuilders/everything-dev#667 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
NEARBuilders/everything-dev#665 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
NEARBuilders/everything-dev#664 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NEARBuilders/everything-dev
Issue simili
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Export the Hemi Earn Router address and the Router and Agent ABIs from `@vetro-protocol/earn`Apertahemi-earn
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
vetro-protocol/vetro-monorepo#1043 ·
I maintainer di solito rispondono entro 1 giorno
-
stage 2: bare names resolve against PATH differently from the shell (empty and relative entries)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
STRML/omp-classifier#206 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
atlassian-labs/mermaid-diagrams-viewer#188 ·
I maintainer di solito rispondono entro 1 giorno
-
dashboard enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Olanetsoft/agent-lookout#225 ·
I maintainer di solito rispondono entro 1 giorno