First deploy of a fresh stage fails in the ADR-0057 env-key check: "the address <service> is not inside the app <app>" (0.35.0; works on 0.34.0)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 53/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bun, next.js, node.js, typescript
調査の方向性
Start with packages/1-prisma-cloud/1-extensions/target/src/legacy-resource-ids.ts and env-key-clash.ts, tracing how a root-provisioned service's graph node id reaches addressBelowApp. Compare the 0.35.0 behavior with 0.34.0, then run the fresh-stage deploy reproduction described in the issue. Done means the 0.35.0 check accepts the root service address and the first deploy proceeds.
索引モデルが issue の本文から書いたものです。
説明
Package and version
@prisma/[email protected] (with @prisma/[email protected]), run by prisma CLI 8.0.0-rc.27 through prisma/cloud-deploy-action@v1 (bun run --bun prisma deploy module.ts --stage <branch>)
What happened?
Deploying a stage that has never been deployed before (no prior deploy state, no existing resources) fails at the environment variable check:
✔ connect to project and branch (2.4s)
✘ check environment variables (1ms)
✘ [DEPLOY.PREFLIGHT_FAILED] prisma-cloud: the address "web" is not inside the app "myapp".
The app is one Next.js compute service named web, provisioned directly in the root module, plus an ORM-typed postgres resource and two envSecret inputs. I retried with and without the bound platform variables present in the deploying shell and got the same error both times, so it doesn't seem to be about missing variables.
Side note: the docs URL printed under the error leads to the CLI error reference, which currently has no DEPLOY section. I'll raise that separately against prisma-cli.
What did you expect to happen?
The first deploy of a fresh stage provisions the declared resources and goes through. With both Composer packages pinned to 0.34.0, the exact same app and stage deploy fine.
Minimal reproduction
// module.ts
import { fileURLToPath } from 'node:url'
import { module } from '@prisma/composer'
import { envSecret } from '@prisma/composer-prisma-cloud'
import { postgres } from '@prisma/composer-prisma-cloud/orm'
import { appData } from './src/prisma/data'
import webService from './src/service'
const config = fileURLToPath(new URL('./prisma.config.ts', import.meta.url))
export default module('myapp', ({ provision }) => {
const db = provision(postgres({ name: 'database', contract: appData, config }))
provision(webService, {
deps: { db },
input: {
authSecret: envSecret('AUTH_SECRET'),
blobToken: envSecret('BLOB_TOKEN'),
},
})
})
// src/service.ts
export default compute({
name: 'web',
deps: { db: postgres(appData) },
input: type({ authSecret: secretString(), blobToken: secretString() }),
build: nextjs({ module: import.meta.url, appDir: '..' }),
})
- npm install @prisma/[email protected] @prisma/[email protected] (today's latest)
- npm run build (Next.js with output: 'standalone')
- prisma deploy module.ts --stage some-fresh-branch, against a stage that has never been deployed
- Fails as above. Pin both packages to 0.34.0 and the identical deploy succeeds.
I can share a reproduction repo if that helps.
From reading the published source (might be off, but in case it saves triage time): the message is thrown by addressBelowApp in packages/1-prisma-cloud/1-extensions/target/src/legacy-resource-ids.ts, which expects every address to start with ".". findEnvKeyClashes in env-key-clash.ts (new in 0.35.0) passes each service's graph node id into it, and for a service provisioned directly in the root module that id seems to be the bare service name ("web") rather than "myapp.web". 0.34.0 has neither file, which would explain why the pin works. The symptom timing looks similar to #103 but this seems like a different defect.
Environment
- GitHub Actions ubuntu-latest, Node 24 (actions/setup-node), Bun via oven-sh/setup-bun@v2, npm
- Prisma Cloud, OIDC through a Console-connected repository, region ap-northeast-1
- Workaround: pin @prisma/composer and @prisma/composer-prisma-cloud to 0.34.0
Additional context
No response
- 主要言語
- TypeScript
- スター
- 6
- フォーク
- 2
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 42
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
prisma/composer のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
@prisma/composer-prisma-cloud 0.36.0 peer-pins @prisma/orm-postgres 8.0.0-rc.20, so it cannot be installed next to the current ORM rc.22 without --legacy-peer-deps再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
prisma/composer#329 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
prisma/composer の issue をすべて見る
似ている issue
-
dream report: normalizeMutation discards ok/status, consumers can only string-match the summaryオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
thecodacus/understory#61 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Termix-SSH/Plugin-Hosts-Config#14 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
ai-generated priority: p2 size: s type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
JonathanTSilva/jts-website#92 ·
メンテナーはふだん 1 日以内に返信
-
Toast announcer reads a doubled period when a toast's title ends in punctuation対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
vercel-labs/ui#999 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
ehmpathy/rhachet-roles-ehmpathy#1443 ·
メンテナーはふだん 1 日以内に返信