Skip to content

test: notebook: never strip the .designer.ipynb extension#5700

Draft
andrewnester wants to merge 3 commits into
mainfrom
test/artchen-db/designer-cli-fix-more
Draft

test: notebook: never strip the .designer.ipynb extension#5700
andrewnester wants to merge 3 commits into
mainfrom
test/artchen-db/designer-cli-fix-more

Conversation

@andrewnester

Copy link
Copy Markdown
Contributor

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

Changes

Why

Tests

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
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