bigquery-firestore-export: clearing PARTITIONING_FIELD is blocked but the DTS API allows it
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
- 76/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, data-engineering
Hướng nghiên cứu
Bắt đầu trong functions/src/dts.ts, tại guard của PARTITIONING_FIELD và comment của nó, sau đó so sánh implementation extension upstream tương ứng được kế thừa trong commit a34ba233. Reproduce PATCH trên một project thực tế ở location us và xác minh rằng việc xóa field thành công và làm thay đổi một lần chạy tiếp theo; được xem là hoàn tất khi cả hai implementation đều cho phép giá trị rỗng mà không cần error constant đã lỗi thời.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
bigquery-firestore-export refuses to clear PARTITIONING_FIELD, but the Data Transfer API allows it.
Setting PARTITIONING_FIELD and later clearing it fails the update with:
Cannot remove partitioning_field from an existing transfer config. The BigQuery Data Transfer API does not support clearing this parameter once it has been set. To change partitioning, you must create a new transfer config with the desired partitioning settings.
The API does support it. Creating a new transfer config is a costly workaround, since run history is stored under the old config ID and does not come with you.
Reproduction
Run against a real project, us location:
- Create a scheduled query with
partitioning_field: created_atand destination templateprobe_{run_time|"%H%M%S"}. Two runs produced tables partitionedDAY (field: created_at). - Clear it:
PATCH /v1/{name}?updateMask=paramswith"partitioning_field": "". Returns 200, and a follow-upGETreads it back as"". - Trigger another run. It carries
partitioning_field: "", reachesSUCCEEDED, and reports no error. - Compare the destination tables:
probe_152800 DAY (field: created_at) <- partitioning set
probe_152909 DAY (field: created_at) <- partitioning set
probe_153056 (none) <- after clearing
So the clear is accepted, persists, runs, and changes the output. It is not silently ignored and it does not fail.
The "you cannot un-partition an existing table" concern does not apply here: the destination template gives every run a new time-suffixed table, so nothing is mutated in place.
Where it comes from
The guard and its comment are in functions/src/dts.ts in the upstream extension:
// The BigQuery Data Transfer API does not support clearing this parameter
throw new Error(PARTITIONING_FIELD_REMOVAL_ERROR);
The kit inherited both in a34ba233. The kit and the extension differ only in what happens after the throw, so both are affected.
Suggested fix
Drop the guard and let an empty partitioning_field through the update mask, and remove PARTITIONING_FIELD_REMOVAL_ERROR along with the comment asserting the limitation. Worth confirming against the extension too, since the belief originated there.
Not verified: behaviour in locations other than us, and whether a destination table without a time-suffixed template behaves differently.
- Ngôn ngữ chính
- TypeScript
- Star
- 978
- Fork
- 433
- Merge trung bình
- 20 giờ 44 phút
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
- Không có Dockerfile hay 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 firebase/extensions
-
decision(storage-resize-images): kit/extension parity – ALLOWED_EVENT_TYPES is ignored, the kit reads EXT_SELECTED_EVENTSCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởdecision kits
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
firebase/extensions#3273 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(storage-resize-images): kit README's Multiple instances section fails in an installed projectĐang mởkits type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
firebase/extensions#3271 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kits type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
firebase/extensions#3270 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(storage-resize-images): kit/extension parity – BUCKET_REGION offers europe-north2 and northamerica-south1, which can't deployCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởkits type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
firebase/extensions#3268 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(storage-resize-images): kit/extension parity – onCompletion event no longer carries the object nameCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởkits type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
firebase/extensions#3266 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của firebase/extensions
Issue tương tự
-
frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
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 75/100
ranxianglei/billion-context#4172 · 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 75/100
awslabs/threat-composer#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Area/Cloud Needs Triage Type/Bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
wso2/product-integrator#2847 ·
Maintainer thường phản hồi trong vòng 1 ngày