databricks fs cp fails when volume is empty
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
- 74/100
Hướng nghiên cứu
Bắt đầu từ đường dẫn của lệnh databricks fs cp và theo dõi các bước kiểm tra sự tồn tại của thư mục đối với Files API, đặc biệt là các yêu cầu HEAD tới /api/2.0/fs/directories và /api/2.0/fs/files. Tái hiện với một UC managed volume hiện có nhưng trống, sau đó xác minh rằng việc sao chép một tệp thành công mà không coi các phản hồi 404 của volume trống là đích không tồn tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the issue
databricks fs cp fails with "Bad Request" when copying a file to a UC managed volume that exists but is empty. The CLI performs a directory existence check via the Files API before writing, and an empty UC volume returns HTTP 404 for that check — causing the CLI to abort instead of writing the file.
Steps to reproduce the behavior
- Create a UC managed volume: databricks volumes create mycatalog myschema myvol MANAGED
- Upload a file to it: databricks fs cp myfile.xml dbfs:/Volumes/mycatalog/myschema/myvol/ (succeeds)
- Delete all files from the volume (e.g. via the Databricks UI)
- Re-run the same databricks fs cp command
Expected Behavior
The file is uploaded successfully. The volume object still exists; only its contents were deleted. A write operation to an existing volume should not depend on whether the volume currently has any files in it.
Actual Behavior
The command fails with Error: Bad Request. The CLI calls HEAD /api/2.0/fs/directories/Volumes/mycatalog/myschema/myvol before writing. An empty UC volume returns 404 for this endpoint. The CLI interprets this as "no such directory" and aborts without writing the file.
Debug trace:
HEAD /api/2.0/fs/directories/Volumes/mycatalog/myschema/myvol → 404 Not Found
HEAD /api/2.0/fs/files/Volumes/mycatalog/myschema/myvol → 404 Not Found
HEAD /api/2.0/fs/directories/Volumes/mycatalog/myschema → 400 Bad Request
Error: Bad Request
The volume object exists throughout — databricks volumes read mycatalog.myschema.myvol returns full metadata. The --overwrite flag does not help; the same error occurs.
Workaround: Use the Files REST API directly — PUT /api/2.0/fs/files/Volumes/mycatalog/myschema/myvol/myfile.xml — which writes unconditionally without a prior directory check.
OS and CLI version
- CLI: Databricks CLI v1.3.0
- OS: Linux 5.10.16.3 (WSL2 on Windows)
Is this a regression?
Unknown — this was first observed on v1.3.0. Not tested on earlier versions.
Debug Logs
GET /api/2.0/fs/directories/Volumes/mycatalog/myschema/myvol
< HTTP/2 404
HEAD /api/2.0/fs/directories/Volumes/mycatalog/myschema/myvol
< HTTP/2 404
HEAD /api/2.0/fs/files/Volumes/mycatalog/myschema/myvol
< HTTP/2 404
HEAD /api/2.0/fs/directories/Volumes/mycatalog/myschema
< HTTP/2 400
Error: Bad Request
- Ngôn ngữ chính
- Go
- Star
- 404
- Fork
- 246
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 268
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không 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 databricks/cli
-
Apps commands only accept relative path to app.ymlCó thể đã có người làm @yuri-rod đã nhận 6 ngày trước. Đang mởCLI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
databricks/cli#6910 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DABs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
databricks/cli#6670 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DABs
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
databricks/cli#7002 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DABs
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
databricks/cli#6986 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
databricks/cli#6978 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của databricks/cli
Issue tương tự
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
FairwindsOps/nova#484 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated-analysis code-quality cookie
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
github/gh-aw#67517 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[otelcol] print-config help text still requires the removed otelcol.printInitialConfig feature gateCó thể đã có người làm @girishkvs đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
open-telemetry/opentelemetry-collector#16143 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue load-balancing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ktrubilo9/edge-proxy#53 ·