Preserve .designer.ipynb suffix when translating notebook task paths#5370
Conversation
…ask paths Lakeflow Designer files keep their full `.designer.ipynb` suffix when imported into the workspace, unlike regular notebooks (`.py`, `.ipynb`, `.r`, `.scala`, `.sql`) which lose their extension. `translateNotebookPath` unconditionally stripped `path.Ext(localRelPath)` — which is `.ipynb` for a `foo.designer.ipynb` path — leaving `foo.designer` and pointing the job's `notebook_path` at a file that does not exist. Add `notebook.ExtensionDesigner` and a `StripExtension` helper that special-cases the designer suffix. Apply it in both branches of `translateNotebookPath` (the `skipLocalFileValidation` branch and the post-detection branch). Reproduces with a bundle that has `tasks[].notebook_task.notebook_path: ./foo.designer.ipynb`: before this change the file synced as `foo.designer.ipynb` (correct, type `DESIGNER_FILE`) but the deployed job pointed at `foo.designer` (404). After this change the job points at `foo.designer.ipynb`.
Approval status: pending
|
Adds `acceptance/bundle/paths/designer_notebook/` exercising the mutator pipeline change end-to-end via `bundle validate -o json` and verifying that: - `./src/test.designer.ipynb` resolves to a workspace path that keeps the full `.designer.ipynb` suffix. - A sibling regular `./src/regular.ipynb` still loses its extension. This satisfies the project rule that mutator-pipeline changes prefer acceptance tests (`.agent/rules/testing.md`). Also adds the corresponding `NEXT_CHANGELOG.md` entry under Bundles.
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
.designer.ipynb suffix when translating notebook task paths.designer.ipynb suffix when translating notebook task paths
|
Commit: 65d9bf9 |
The `designer_notebook` acceptance test (added in databricks#5370) was missing its generated `out.test.toml`. The file is written as a side effect of test discovery and explicitly excluded from output comparison, so a missing copy never fails a test — and the post-test `git diff --exit-code` guard didn't catch it either, because plain `git diff` ignores untracked files. The result: the file silently regenerated as an untracked change in every worktree that ran the acceptance suite. This adds the missing `out.test.toml` and fixes the CI guard to register untracked files with `git add --intent-to-add .` before diffing, so any new file appearing after a test run now fails the build. Gitignored test artifacts are unaffected, since intent-to-add respects `.gitignore`. This pull request and its description were written by Isaac.
## Release v1.2.0 ### CLI * `experimental open` now opens every DABs resource type that has a workspace URL, picking up `catalogs`, `schemas`, `volumes`, `database_instances`, `database_catalogs`, `synced_database_tables`, `postgres_catalogs`, `postgres_synced_tables`, `quality_monitors`, `vector_search_endpoints`, and `vector_search_indexes` ([#5346](#5346)). ### Bundles * Retry transient HTTP 5xx and 408 errors in direct deployment engine ([#5349](#5349), [#5364](#5364)). * Preserve `.designer.ipynb` suffix when translating notebook task paths so Lakeflow Designer files referenced from a `notebook_task` resolve correctly in the workspace ([#5370](#5370)). * Fix script output dropping last line without trailing newline ([#4995](#4995)). * engine/direct: Add `--select` flag to `bundle plan` and `bundle deploy` to plan/deploy a subset of resources (e.g. `--select my_job` or `--select jobs.my_job`); resources referenced by the selection are included transitively ([#5413](#5413)). * Support `purge_on_delete: true` on `postgres_projects` so bundles can hard-delete a Lakebase project on destroy (skipping the soft-delete retention window) ([#5414](#5414)). * Support terraform references in direct engine ([#5392](#5392)) * Support lifecycle.started for SQL warehouses ([#5348](#5348)) ### Dependency updates * Bump Go toolchain to 1.26.4 ([#5420](#5420)). * Bump `github.com/databricks/databricks-sdk-go` from v0.136.0 to v0.141.0 ([#5361](#5361)) * Bump Terraform provider from v1.115.0 to v1.117.0 ([#5421](#5421))
Summary
Lakeflow Designer files keep their full
.designer.ipynbsuffix when imported into the workspace, unlike regular notebooks (.py,.ipynb,.r,.scala,.sql) which lose their extension on import.translateNotebookPathinbundle/config/mutator/translate_paths.gounconditionally strippedpath.Ext(localRelPath). For afoo.designer.ipynbpath,path.Extreturns.ipynb, leavingfoo.designer— the deployed job'snotebook_paththen points at a file that does not exist.Fix
Add
notebook.ExtensionDesigner = ".designer.ipynb"and aStripExtensionhelper inlibs/notebook/ext.gothat special-cases the designer suffix. Apply it in both branches oftranslateNotebookPath(theskipLocalFileValidationbranch and the post-detection branch).Reproduction
A bundle with:
foo.designer.ipynb(DESIGNER_FILE) ✓foo.designer.ipynb(DESIGNER_FILE) ✓notebook_pathfoo.designer→ 404 ✗foo.designer.ipynb✓Tests
libs/notebook/ext_test.go—TestStripExtensioncovers.py / .ipynb / .r / .scala / .sql, the.designer.ipynbkeep-case, and no-extension input.bundle/config/mutator/translate_paths_test.go—TestTranslatePathsDesignerNotebook(file present, mixed designer + regular tasks) andTestTranslatePathsDesignerNotebookSkipLocalFileValidation(config-remote-sync branch). Both assert designer suffix is preserved and.py/.ipynbare still stripped.Out of scope
Other call sites strip
path.Extin the same pattern (libs/sync/snapshot_state.go,bundle/generate/downloader.go,cmd/workspace/workspace/import_dir.go,libs/filer/workspace_files_extensions_client.go). The job-task path covers the reported user-visible bug; whether designer files need the same special-case in sync / generate / import-dir flows depends on whether they round-trip through those paths in a way the workspace API doesn't already handle. Happy to extend in a follow-up if reviewers want.