bundle: preserve .designer.ipynb suffix when translating notebook task paths#5370
bundle: preserve .designer.ipynb suffix when translating notebook task paths#5370artchen-db wants to merge 2 commits into
.designer.ipynb suffix when translating notebook task paths#5370Conversation
…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. |
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.