Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5896ae4
Fs cp now upload in parallel
renaudhartert-db Dec 11, 2025
b933398
Improve performance
renaudhartert-db Dec 11, 2025
2fa03e1
Use error value
renaudhartert-db Dec 11, 2025
d393388
Cancel go routines
renaudhartert-db Dec 11, 2025
14cfad9
Properly propagate context
renaudhartert-db Dec 11, 2025
2a9ec1b
Linter
renaudhartert-db Dec 11, 2025
179a944
Test context cancellation
renaudhartert-db Dec 12, 2025
79dd600
Clarified rationale
renaudhartert-db Dec 12, 2025
2d1f19d
Gracefully wait for cancellation to complete
renaudhartert-db Dec 12, 2025
caaff68
Merge branch 'main' into renaud-hartert_data/fs-cp-fast
renaudhartert-db Dec 13, 2025
12dec5c
Add acceptance tests for fs cp
renaudhartert-db Dec 15, 2025
2be2174
Merge branch 'renaud-hartert_data/fs-cp-fast' of github.com-ghec:data…
renaudhartert-db Dec 15, 2025
7db079d
Merge branch 'main' into renaud-hartert_data/fs-cp-fast
renaudhartert-db Dec 16, 2025
e720670
Merge branch 'main' into renaud-hartert_data/fs-cp-fast
renaudhartert-db Dec 16, 2025
4029571
Merge branch 'main' into renaud-hartert_data/fs-cp-fast
renaudhartert-db Dec 29, 2025
6a8077b
Address feedback
renaudhartert-db Jan 8, 2026
1b0ecb2
Merge branch 'renaud-hartert_data/fs-cp-fast' of github.com-ghec:data…
renaudhartert-db Jan 8, 2026
8d0ede6
Enable cloud testing
renaudhartert-db Jan 9, 2026
4bbbe57
Fix whitespace: add trailing newlines to acceptance test files
renaudhartert-db Jan 9, 2026
1f331ff
Fix acceptance test output formatting
renaudhartert-db Jan 9, 2026
f8bf48a
Fix test server HEAD handler for volumes with file extension heuristic
renaudhartert-db Jan 9, 2026
22da2b3
Improve documentation for test server file extension heuristic
renaudhartert-db Jan 9, 2026
674fa2e
Improve test server HEAD handler with volume-specific heuristic
renaudhartert-db Jan 9, 2026
fdfc0e1
Improve test server HEAD handler for Unity Catalog Volumes
renaudhartert-db Jan 9, 2026
2dc735b
Merge remote changes, keep improved HEAD handler logic
renaudhartert-db Jan 9, 2026
ff6c248
Merge branch 'main' into renaud-hartert_data/fs-cp-fast
renaudhartert-db Jan 9, 2026
0a96e6a
Disable cloud testing for fs cp acceptance tests
renaudhartert-db Jan 9, 2026
fddf223
Simplify fs directory handlers and enable cloud tests
renaudhartert-db Jan 25, 2026
f11edd1
Merge branch 'main' into renaud-hartert_data/fs-cp-fast
renaudhartert-db Jan 25, 2026
7acce54
Register volume paths as directories in test server
renaudhartert-db Jan 25, 2026
ecf7113
Add explicit mkdir calls before fs cp in tests
renaudhartert-db Jan 25, 2026
7227b83
Fix test outputs
renaudhartert-db Jan 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

### CLI

* Improve performance of `databricks fs cp` command by parallelizing file uploads when
copying directories with the `--recursive` flag.

### Bundles

### Dependency updates
Expand Down
1 change: 1 addition & 0 deletions acceptance/cmd/fs/cp/dir-to-dir/localdir/file1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
file1 content
1 change: 1 addition & 0 deletions acceptance/cmd/fs/cp/dir-to-dir/localdir/file2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
file2 content
6 changes: 6 additions & 0 deletions acceptance/cmd/fs/cp/dir-to-dir/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions acceptance/cmd/fs/cp/dir-to-dir/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

>>> [CLI] fs cp -r localdir dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/uploaded-dir
localdir/file1.txt -> dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/uploaded-dir/file1.txt
localdir/file2.txt -> dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/uploaded-dir/file2.txt

>>> [CLI] fs cat dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/uploaded-dir/file1.txt
file1 content

>>> [CLI] fs cat dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/uploaded-dir/file2.txt
file2 content
21 changes: 21 additions & 0 deletions acceptance/cmd/fs/cp/dir-to-dir/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CATALOG_NAME="main"
SCHEMA_NAME="default"
VOLUME_NAME="fs-cp-test-${UNIQUE_NAME}"

cleanup() {
$CLI volumes delete "${CATALOG_NAME}.${SCHEMA_NAME}.${VOLUME_NAME}" 2>/dev/null || true
}
trap cleanup EXIT

# Create volume for testing.
$CLI volumes create "${CATALOG_NAME}" "${SCHEMA_NAME}" "${VOLUME_NAME}" MANAGED >/dev/null

# Create parent directory.
$CLI fs mkdir dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}

# Recursive directory copy (output sorted for deterministic ordering).
trace $CLI fs cp -r localdir dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}/uploaded-dir 2>&1 | sort

# Verify files were uploaded correctly.
trace $CLI fs cat dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}/uploaded-dir/file1.txt
trace $CLI fs cat dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}/uploaded-dir/file2.txt
3 changes: 3 additions & 0 deletions acceptance/cmd/fs/cp/dir-to-dir/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Local = true
Cloud = true
RequiresUnityCatalog = true
1 change: 1 addition & 0 deletions acceptance/cmd/fs/cp/file-to-dir/local.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello world!
6 changes: 6 additions & 0 deletions acceptance/cmd/fs/cp/file-to-dir/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions acceptance/cmd/fs/cp/file-to-dir/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

>>> [CLI] fs cp local.txt dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/mydir/
local.txt -> dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/mydir/local.txt

>>> [CLI] fs cat dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/mydir/local.txt
hello world!
20 changes: 20 additions & 0 deletions acceptance/cmd/fs/cp/file-to-dir/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
CATALOG_NAME="main"
SCHEMA_NAME="default"
VOLUME_NAME="fs-cp-test-${UNIQUE_NAME}"

cleanup() {
$CLI volumes delete "${CATALOG_NAME}.${SCHEMA_NAME}.${VOLUME_NAME}" 2>/dev/null || true
}
trap cleanup EXIT

# Create volume for testing.
$CLI volumes create "${CATALOG_NAME}" "${SCHEMA_NAME}" "${VOLUME_NAME}" MANAGED >/dev/null

# Create target directory.
$CLI fs mkdir dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}/mydir

# Copy file into a directory (trailing slash indicates directory target).
trace $CLI fs cp local.txt dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}/mydir/

# Verify file was uploaded correctly.
trace $CLI fs cat dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}/mydir/local.txt
3 changes: 3 additions & 0 deletions acceptance/cmd/fs/cp/file-to-dir/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Local = true
Cloud = true
RequiresUnityCatalog = true
1 change: 1 addition & 0 deletions acceptance/cmd/fs/cp/file-to-file/local.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello world!
6 changes: 6 additions & 0 deletions acceptance/cmd/fs/cp/file-to-file/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions acceptance/cmd/fs/cp/file-to-file/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

>>> [CLI] fs cp local.txt dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/uploaded.txt
local.txt -> dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/uploaded.txt

>>> [CLI] fs cat dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/uploaded.txt
hello world!

>>> [CLI] fs cp dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/uploaded.txt downloaded.txt
dbfs:/Volumes/main/default/fs-cp-test-[UNIQUE_NAME]/uploaded.txt -> downloaded.txt

>>> cat downloaded.txt
hello world!
27 changes: 27 additions & 0 deletions acceptance/cmd/fs/cp/file-to-file/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CATALOG_NAME="main"
SCHEMA_NAME="default"
VOLUME_NAME="fs-cp-test-${UNIQUE_NAME}"

cleanup() {
$CLI volumes delete "${CATALOG_NAME}.${SCHEMA_NAME}.${VOLUME_NAME}" 2>/dev/null || true
}
trap cleanup EXIT

# Create volume for testing.
$CLI volumes create "${CATALOG_NAME}" "${SCHEMA_NAME}" "${VOLUME_NAME}" MANAGED >/dev/null

# Create parent directory.
$CLI fs mkdir dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}

# Upload local file to volume.
trace $CLI fs cp local.txt dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}/uploaded.txt

# Verify file was uploaded correctly.
trace $CLI fs cat dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}/uploaded.txt

# Download the same file back to verify round-trip.
trace $CLI fs cp dbfs:/Volumes/${CATALOG_NAME}/${SCHEMA_NAME}/${VOLUME_NAME}/uploaded.txt downloaded.txt

# Verify downloaded content matches original.
trace cat downloaded.txt
rm downloaded.txt
3 changes: 3 additions & 0 deletions acceptance/cmd/fs/cp/file-to-file/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Local = true
Cloud = true
RequiresUnityCatalog = true
5 changes: 5 additions & 0 deletions acceptance/cmd/fs/cp/input-validation/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions acceptance/cmd/fs/cp/input-validation/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

>>> errcode [CLI] fs cp src dst --concurrency -1
Error: --concurrency must be at least 1

Exit code: 1

>>> errcode [CLI] fs cp src dst --concurrency 0
Error: --concurrency must be at least 1

Exit code: 1
3 changes: 3 additions & 0 deletions acceptance/cmd/fs/cp/input-validation/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Invalid concurrency values should fail.
trace errcode $CLI fs cp src dst --concurrency -1
trace errcode $CLI fs cp src dst --concurrency 0
2 changes: 2 additions & 0 deletions acceptance/cmd/fs/cp/input-validation/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Local = true
Cloud = false
Loading