[Data Connect] MISSING_JOIN_TABLE_KEY false positive on tables with an explicit id key referenced by other tables
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start by tracing the Data Connect schema compilation path used by firebase dataconnect:compile and find where MISSING_JOIN_TABLE_KEY is detected; the issue does not name implementation files or tests. Check how the detection handles explicit @table(key: ["id"]) declarations and references from other tables, then add coverage for the Enrollment schema. Done when that schema no longer produces the warning while genuine join tables still do.
索引モデルが issue の本文から書いたものです。
説明
[REQUIRED] Environment info
firebase-tools: 15.34.1 (Data Connect emulator / toolkit 3.4.24)
Platform: macOS 26.4, Node 22
[REQUIRED] Test case
A table with two required @ref fields that is an entity in its own right, not a join table. It has its own id key, the pair of parents is intentionally not unique, and another table references it by id:
type User @table { name: String! }
type Plan @table { title: String! }
# A user can enroll in the same plan more than once (re-enrollment),
# so (user, plan) is not unique and cannot be the primary key.
type Enrollment @table(key: ["id"]) {
id: UUID! @default(expr: "uuidV4()")
user: User!
plan: Plan!
startDate: Date!
status: String!
}
# Other tables reference an enrollment by its id.
type Session @table {
enrollment: Enrollment
performedAt: Timestamp!
}
The same thing happens for other common shapes, e.g. a "notes about a user written by an author" table (many notes per author/user pair), or an ordered "exercises in a workout" table where the same exercise can appear twice.
[REQUIRED] Steps to reproduce
- Use the schema above.
- Run
firebase deploy --only dataconnect(also shown byfirebase dataconnect:compile).
[REQUIRED] Expected behavior
No MISSING_JOIN_TABLE_KEY warning for Enrollment. It explicitly declares key: ["id"], and another table references that key, so it can't be a join table missing its composite key. Alternatively, a way to acknowledge the warning per table (e.g. a schema-level opt-out) so it doesn't show on every deploy.
[REQUIRED] Actual behavior
Every deploy lists the table as an insecure operation or risky change and asks for acknowledgement:
MISSING_JOIN_TABLE_KEY schema/....gql: On Enrollment: This table looks like a join table, but it is missing the composite primary key definition.
Workaround: Add `@table(key: ["plan", "user"])` to the type.
Reason: A join table must have a composite primary key that consists of two foreign keys.
Following the suggested workaround would be wrong here. It would break re-enrollment, drop the id that Session references, and require a primary-key migration on a populated table.
Related: #9630 (@view false positive, fixed in v15.3.0) and #9762 (3-column composite key false positive). In both, a maintainer confirmed the warning is non-blocking and shouldn't trigger in those cases.
- 主要言語
- TypeScript
- スター
- 4.5k
- フォーク
- 1.3k
- 平均マージ
- 2日 5時間
- マージ済み PR(30日)
- 68
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-tools のほかの issue
-
emulator: dataconnect
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
firebase/firebase-tools#11402 ·
メンテナーはふだん 1 日以内に返信
-
Nodejs26 rejected at deploy, though Cloud Run functions supports it (Preview)対応中かも @IzaakGough が 4 日前に担当しました。 オープンapi: functions reproducible type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
firebase/firebase-tools#11393 · コメント 2 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
-
[firebase-vscode] CLI version check reads the version from the debug banner, because logSetup() leaks DEBUG=true into the spawned `firebase --version` (follow-up to #10874)対応中かも @abhiramshaji-cyber が 5 日前に担当しました。 オープンreproducible type: bug VSCode Extension
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
firebase/firebase-tools#11363 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[MCP] Crashlytics tools not loaded for Android projects using Gradle version catalogs (libs.versions.toml)対応中かも @aalej が 6 日前に担当しました。 オープンapi: mcp reproducible type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
firebase/firebase-tools#11351 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
CLI HTTP client ignores NO_PROXY, so emulators can’t reach each other behind a proxy対応中かも @joehan が 21 日前に担当しました。 オープンemulator-suite type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
firebase/firebase-tools#11249 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
firebase/firebase-tools の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
pingdotgg/t3code#30228 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
ci-cd desktop size:low telemetry-improvement telemetry-round-1
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
vfarcic/dot-agent-deck#2079 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信