Skip to content

Print forward-slash paths in error messages on Windows - #7377

Open
denik wants to merge 3 commits into
mainfrom
windows-toslash-cleanup
Open

denik wants to merge 3 commits into
mainfrom
windows-toslash-cleanup

Conversation

@denik

@denik denik commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Changes

Wrap local paths with filepath.ToSlash in user-facing messages: diagnostic locations (diag.Location.String, which covers YAML/JSON load errors), config load/rewrite errors, variable-overrides file errors, artifact glob errors, duplicate library names, the bundle-root glob check, the sync-root check, the git repository-root check and filer errors. acceptance/bin/diff.py now prints POSIX paths too.

Remove the backslash Repls from acceptance tests that no longer need them. Some were already stale (docker host, apps/init, genie_space generate, integration_whl/serverless*, overrides_file_complex_path, nil_artifacts, wrong-url).

Why

This is a follow-up to #4528. Output is the same on every OS, so tests don't need per-test separator fixups.

Tests

Linux outputs are unchanged. The Windows cell runs the changed tests. Cases left out on purpose are listed in a comment below.

This pull request and its description were written by Isaac.

Convert local paths to forward slashes with filepath.ToSlash in user-facing
messages (diagnostic locations, YAML/JSON load errors, variable overrides file
errors, glob errors, duplicate library names, sync root errors, git root errors,
filer errors) and in diff.py output. Remove acceptance Repls that normalized
backslashes and are no longer needed.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik requested review from a team as code owners November 5, 2026 11:26
Co-authored-by: Isaac <no-reply@databricks.com>
@denik

denik commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Cases left out of this PR (risky or not CLI output):

  • Artifact paths in bundle validate -o json ('\\\\' Repls in artifacts/artifacts_dynamic_version, build_and_files, glob_exact_whl, globs_in_files, globs_in_files_in_include, globs_invalid, whl_dynamic, integration_whl/serverless_extras_dynamic_version, templates/default-python/integration_classic, resources/clusters/run/spark_python_task). artifacts.*.path, files[].source and patched hold native absolute paths in the config, and filepath.Glob/filepath.Rel use them. One example: the matches[0] == source check in bundle/artifacts/expand_globs.go would stop matching on Windows if source used forward slashes. Fixing this changes internal state, not just display, so it needs its own PR.
  • bundle/run/inline-script/cwd: the path is printed by python's os.getcwd(), not by the CLI.
  • templates/default-python/combinations: cloud-only, and it's not clear which output has the backslash.
  • Not path separators: selftest/basic (tests the Repl mechanism itself), the telemetry \\" Repls, genie_spaces/change-serialized-space (\r\n), inline-script/basic (\$PATH).

I removed Repls from a few cloud-only tests based on reading the code: cmd/fs/cp/file-to-nonexistent-dir, bundle/generate/genie_space, integration_whl/serverless, integration_whl/serverless_dynamic_version. PR CI can't check these on Windows.

@github-actions github-actions Bot added the DABs DABs related issues label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 342aff244 | Workflow run

Regression test report

Selected 20 changed tests (limit=20, 2 not selected)

36 tests: regression=0 unreleased=0 coverage=36 failing=0
test branch main (5c0ab45) latest (v1.24.0)
TestAccept/apps/init/auth-mode ✅ ✅ ✅
TestAccept/apps/init/binding-values ✅ ✅ ✅
TestAccept/bundle/artifacts/globs_in_files/DMS= ✅ ✅ ✅
TestAccept/bundle/artifacts/globs_in_files/DMS=true ✅ ✅ ✅
TestAccept/bundle/artifacts/globs_invalid/DMS= ✅ ✅ ✅
TestAccept/bundle/artifacts/globs_invalid/DMS=true ✅ ✅ ✅
TestAccept/bundle/artifacts/nil_artifacts/DMS= ✅ ✅ ✅
TestAccept/bundle/artifacts/nil_artifacts/DMS=true ✅ ✅ ✅
TestAccept/bundle/artifacts/same_name_libraries/DMS= ✅ ✅ ✅
TestAccept/bundle/artifacts/same_name_libraries/DMS=true ✅ ✅ ✅
TestAccept/bundle/deploy/mlops-stacks/DMS= ✅ ✅ ✅
TestAccept/bundle/deploy/mlops-stacks/DMS=true ✅ ✅ ✅
TestAccept/bundle/generate/genie_space/DMS= ✅ ✅ ✅
TestAccept/bundle/generate/genie_space/DMS=true ✅ ✅ ✅
TestAccept/bundle/includes/glob_in_root_path/DMS= ✅ ✅ ✅
TestAccept/bundle/includes/glob_in_root_path/DMS=true ✅ ✅ ✅
TestAccept/bundle/integration_whl/serverless/DMS= ✅ ✅ ✅
TestAccept/bundle/integration_whl/serverless/DMS=true ✅ ✅ ✅
TestAccept/bundle/integration_whl/serverless_dynamic_version/DMS= ✅ ✅ ✅
TestAccept/bundle/integration_whl/serverless_dynamic_version/DMS=true ✅ ✅ ✅
TestAccept/bundle/paths/outside_root_no_sync/DMS= ✅ ✅ ✅
TestAccept/bundle/paths/outside_root_no_sync/DMS=true ✅ ✅ ✅
TestAccept/bundle/paths/pipelines_root_path_outside_sync_root/DMS= ✅ ✅ ✅
TestAccept/bundle/paths/pipelines_root_path_outside_sync_root/DMS=true ✅ ✅ ✅
TestAccept/bundle/syncroot/dotdot-git/DMS= ✅ ✅ ✅
TestAccept/bundle/syncroot/dotdot-git/DMS=true ✅ ✅ ✅
TestAccept/bundle/templates-machinery/wrong-url/DMS= ✅ ✅ ✅
TestAccept/bundle/templates-machinery/wrong-url/DMS=true ✅ ✅ ✅
TestAccept/bundle/templates/default-python/serverless-customcatalog/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/variables/overrides_file_complex_path/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/variables/overrides_file_complex_path/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/yaml_anchors/cycle_nested/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/yaml_anchors/cycle_nested/DMS=true ✅ ✅ ✅
TestAccept/bundle/variables/file-defaults/DMS= ✅ ✅ ✅
TestAccept/bundle/variables/file-defaults/DMS=true ✅ ✅ ✅
TestAccept/cmd/auth/docker/host ✅ ✅ ✅

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 342aff2

Run: 42025872537

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 275 35 4:36
✅​ aws-windows-latest-4core-16gb 277 33 4:45
✅​ azure linux-2core-8gb 274 35 7:22
✅​ azure-windows-latest-4core-16gb 276 33 4:48
✅​ gcp linux-2core-8gb 275 35 4:41
✅​ gcp-windows-latest-4core-16gb 277 33 4:51
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:45 gcp-windows-latest-4core-16gb TestAccept
3:36 azure-windows-latest-4core-16gb TestAccept
3:34 aws-windows-latest-4core-16gb TestAccept

…og golden

The removed backslash Repl was also rewriting escaped \n and \" in notebook
JSON into /n and /".

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants