[Data Connect] MISSING_JOIN_TABLE_KEY false positive on tables with an explicit id key referenced by other tables
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/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
- backend-api-design, cli
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[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.
- Ngôn ngữ chính
- TypeScript
- Star
- 4.5k
- Fork
- 1.3k
- Merge trung bình
- 2 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 82
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 firebase/firebase-tools
-
Nodejs26 rejected at deploy, though Cloud Run functions supports it (Preview)Có thể đã có người làm @IzaakGough đã nhận 6 ngày trước. Đang mởapi: functions reproducible type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
firebase/firebase-tools#11393 · 2 bình luận · 4 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[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)Có thể đã có người làm @abhiramshaji-cyber đã nhận 7 ngày trước. Đang mởreproducible type: bug VSCode Extension
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
firebase/firebase-tools#11363 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[MCP] Crashlytics tools not loaded for Android projects using Gradle version catalogs (libs.versions.toml)Có thể đã có người làm @aalej đã nhận 8 ngày trước. Đang mởapi: mcp reproducible type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
firebase/firebase-tools#11351 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLI HTTP client ignores NO_PROXY, so emulators can’t reach each other behind a proxyCó thể đã có người làm @joehan đã nhận 22 ngày trước. Đang mởemulator-suite type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
firebase/firebase-tools#11249 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
functions:secrets:set and :prune never destroy anything: pruneSecrets filters firebase-managed=true, but labels() writes firebase-managed=functionsCó thể đã có người làm @IzaakGough đã nhận 56 ngày trước. Đang mởapi: functions reproducible type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
firebase/firebase-tools#11066 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của firebase/firebase-tools
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vercel-labs/durable-harness#53 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Redesign tab bars ignore clicks on Linux: hidden chat layers keep window drag regionsĐang mở
Độ 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
-
area/docs area/ui enhancement
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
melgarafael/DeskcommCRM#4098 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
kerti/balances-v2#801 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
lesson-submission pending-review
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
Ikalus1988/MisakaNet#4510 ·
Maintainer thường phản hồi trong vòng 1 ngày