databricks fs cp fails when volume is empty
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 74/100
Rechercherichtung
Beginne beim Pfad des Befehls databricks fs cp und verfolge dessen Prüfungen auf die Existenz von Verzeichnissen gegenüber der Files API, insbesondere HEAD-Anfragen unter /api/2.0/fs/directories und /api/2.0/fs/files. Reproduziere das Verhalten mit einem vorhandenen leeren verwalteten UC-Volume und überprüfe anschließend, dass das Kopieren einer Datei erfolgreich ist, ohne die 404-Antworten des leeren Volumes als fehlendes Ziel zu behandeln.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Go
- Sterne
- 409
- Forks
- 253
- Ø Merge
- 1 T. 14 Std.
- Gemergte PRs (30 T.)
- 184
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus databricks/cli
-
Apps commands only accept relative path to app.ymlEvtl. vergeben @yuri-rod hat das vor 22 Tagen übernommen. OffenCLI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
databricks/cli#6910 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DABs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
databricks/cli#6670 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
bundle validate does not catch missing trigger.table_update.condition with multiple tablesEvtl. vergeben @yuri-rod hat das vor 7 Tagen übernommen. OffenDABs Enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
databricks/cli#7101 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
databricks/cli#7100 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DABs Enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
databricks/cli#7099 ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
FootprintAI/Containarium#3182 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug from-studio
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
esengine/DeepSeek-Reasonix#14608 ·
Maintainer antworten meist innerhalb von 1 Tag
-
triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
getarcaneapp/arcane#4590 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Library panel usage dialog uses singular grammarEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenarea/frontend/library-panels automated-triage type/bug type/ux
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag