fix: more locations with .designer.ipynb extension stripping#5656
fix: more locations with .designer.ipynb extension stripping#5656artchen-db wants to merge 1 commit into
Conversation
Lakeflow Designer notebooks are stored in the workspace as DESIGNER_FILE objects with a compound ".designer.ipynb" extension. Several call sites stripped notebook extensions with path.Ext + TrimSuffix, which removed only the trailing ".ipynb" and left an orphaned ".designer", producing a path that no longer round-trips on deploy/import. Route these sites through the existing notebook.StripExtension helper, which preserves the ".designer.ipynb" suffix: - bundle/generate/downloader.go (the reported `bundle generate` bug). Also download Designer files as Jupyter notebooks, since get-status reports no export format for them. The export format is now selected generically via a new notebook.FixedExportFormat(objectType) lookup keyed on the object type rather than a designer-specific check. - libs/sync/snapshot_state.go, which otherwise tracked Designer notebooks at the wrong remote name, inconsistent with translate_paths. - cmd/workspace/workspace/import_dir.go (logged remote path). Co-authored-by: Isaac
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Approval status: pending
|
Summary
Lakeflow Designer notebooks are stored as
DESIGNER_FILEobjects with a compound.designer.ipynbextension. Several CLI sites stripped notebook extensions withpath.Ext+TrimSuffix, removing only the trailing.ipynband leaving an orphaned.designer— a path that no longer round-trips on deploy/import. This routes them through the existingnotebook.StripExtensionhelper, which preserves the suffix. (Originally reported forbundle generateof a job referencing a Designer notebook.)Key changes
bundle/generate/downloader.go— the reported bug; preserve the suffix and download Designer files as Jupyter (get-status reports no export format for them).libs/notebook/ext.go— addObjectTypeDesignerFile+FixedExportFormat(objectType), so the format override is keyed generically on object type rather than a designer-specific check.libs/sync/snapshot_state.go— sync otherwise tracked Designer notebooks at the wrong remote name, inconsistent withtranslate_paths.cmd/workspace/workspace/import_dir.go— logged remote path for imported Designer notebooks.Notes
export_dir.go,configsync/resolve.go, filer extensions client,detect.go): already correct — Designer objects keep their full name and aren'tNOTEBOOK-typed, so they round-trip as regular files.TestFixedExportFormat,TestDownloader_MarkTasksForDownload_DesignerNotebook, a sync fixture, and an end-to-endacceptance/bundle/generate/designer_job/test.