Skip to content

temp: add Windows reproduction for export-dir on illegal notebook name#5655

Draft
radakam wants to merge 4 commits into
mainfrom
cli-5171-fix-workspace-export-dir-new-notebook
Draft

temp: add Windows reproduction for export-dir on illegal notebook name#5655
radakam wants to merge 4 commits into
mainfrom
cli-5171-fix-workspace-export-dir-new-notebook

Conversation

@radakam

@radakam radakam commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Why

A UI-created notebook is named like New Notebook 2026-05-04 13:54:24. The : is legal on Linux/macOS but illegal on Windows, so os.Create fails with ERROR_INVALID_NAME and the whole recursive export aborts on that one file.

Changes

  • export_dir.go: skip such a file with a warning and continue, instead of aborting. Only this specific error is skipped — permission/disk/missing-path errors still propagate (so we never silently drop files on real failures).
  • Detection is build-tagged (export_dir_windows.go / export_dir_other.go) to avoid err.Error() string-matching and stay cross-platform; ERROR_INVALID_NAME has no portable Go sentinel.
  • Changelog entry added.

Closes DECO-27435 and fixes issue #5171.

Tests

  • Acceptance (export-dir-illegal-filename/, Windows-gated): export now skips-with-warning and completes; golden captured from a real Windows CI run.
  • Unit (export_dir_windows_test.go): asserts the narrow contract — only ERROR_INVALID_NAME skips; ErrPermission/ErrNotExist/generic/nil do not.

Reproduces #5171: `workspace export-dir` aborts on Windows
when a notebook name contains a ':' (e.g. an untitled "New Notebook
<timestamp>"), because the colon is illegal in a local Windows filename
and os.Create fails. The name is legal on Linux/macOS, so the test is
gated to Windows via GOOS.

output.txt is intentionally omitted: the golden cannot be generated on a
non-Windows machine, so the Windows CI leg will surface the real output
to commit verbatim.
@radakam radakam temporarily deployed to test-trigger-is June 18, 2026 17:35 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 18, 2026 17:35 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: bba3ce7

Run: 27784662341

Env 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 13 264 1012 6:23
🟨​ aws windows 7 13 266 1010 10:07
💚​ aws-ucws linux 7 13 360 926 6:05
💚​ aws-ucws windows 7 13 362 924 7:29
💚​ azure linux 1 15 267 1010 5:25
💚​ azure windows 1 15 269 1008 9:44
💚​ azure-ucws linux 1 15 365 922 6:30
💚​ azure-ucws windows 1 15 367 920 9:50
💚​ gcp linux 1 15 263 1013 5:53
💚​ gcp windows 1 15 265 1011 7:51
20 interesting tests: 13 SKIP, 7 KNOWN
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
Top 22 slowest tests (at least 2 minutes):
duration env testname
5:04 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:53 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:44 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:25 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:10 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:58 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:44 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:29 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:14 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:10 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:10 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:07 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:55 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:53 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:49 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:46 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:35 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:34 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:31 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:31 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:30 gcp windows TestAccept
2:14 aws windows TestSecretsPutSecretStringValue

Captured verbatim from the Windows CI run of the test added in the
previous commit. Documents the current (buggy) behavior of #5171:
export-dir aborts on Windows when a notebook name contains ':'.
@radakam radakam temporarily deployed to test-trigger-is June 18, 2026 19:17 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 18, 2026 19:17 — with GitHub Actions Inactive
A workspace object name can be illegal as a local filename (e.g. the ':'
in an untitled "New Notebook 2026-05-04 13:54:24" on Windows), which made
os.Create fail and abort the entire export. Skip such files with a
warning and continue, matching the existing skip paths for non-exportable
and oversized objects.

Detection uses a build-tagged helper checking the Windows
ERROR_INVALID_NAME code; on other platforms no filename character (other
than '/' and NUL, which cannot appear in a workspace object name) is
illegal, so it is a no-op.

Flips the Windows-gated acceptance test from asserting the abort to
expecting skip-with-warning. Fixes #5171.
@radakam radakam temporarily deployed to test-trigger-is June 18, 2026 19:31 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 18, 2026 19:31 — with GitHub Actions Inactive
Locks in the narrow contract that only the Windows ERROR_INVALID_NAME
error is treated as skippable, while permission, not-exist, generic, and
nil errors are not. The acceptance test only exercises the positive
(invalid-name) path, so this guards against accidentally broadening the
check and silently dropping files on real I/O failures.
@radakam radakam temporarily deployed to test-trigger-is June 18, 2026 19:38 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 18, 2026 19:38 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants