Skip to content

fix: more locations with .designer.ipynb extension stripping#5656

Open
artchen-db wants to merge 1 commit into
databricks:mainfrom
artchen-db:designer-cli-fix-more
Open

fix: more locations with .designer.ipynb extension stripping#5656
artchen-db wants to merge 1 commit into
databricks:mainfrom
artchen-db:designer-cli-fix-more

Conversation

@artchen-db

@artchen-db artchen-db commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Lakeflow Designer notebooks are stored as DESIGNER_FILE objects with a compound .designer.ipynb extension. Several CLI sites stripped notebook extensions with path.Ext + TrimSuffix, removing only the trailing .ipynb and leaving an orphaned .designer — a path that no longer round-trips on deploy/import. This routes them through the existing notebook.StripExtension helper, which preserves the suffix. (Originally reported for bundle generate of 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 — add ObjectTypeDesignerFile + 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 with translate_paths.
  • cmd/workspace/workspace/import_dir.go — logged remote path for imported Designer notebooks.

Notes

  • Audited the read/export paths (export_dir.go, configsync/resolve.go, filer extensions client, detect.go): already correct — Designer objects keep their full name and aren't NOTEBOOK-typed, so they round-trip as regular files.
  • Tests: TestFixedExportFormat, TestDownloader_MarkTasksForDownload_DesignerNotebook, a sync fixture, and an end-to-end acceptance/bundle/generate/designer_job/ test.

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
@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 5656
  • Commit SHA: da60eeb9a91e130cba0b902496ee5313286da186

Checks will be approved automatically on success.

@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

7 files changed
Suggested: @pietern
Also eligible: @denik, @shreyas-goenka, @andrewnester, @anton-107, @janniklasrose, @lennartkats-db

/bundle/ - needs approval

Files: bundle/generate/downloader.go, bundle/generate/downloader_test.go
Suggested: @pietern
Also eligible: @denik, @shreyas-goenka, @andrewnester, @anton-107, @janniklasrose, @lennartkats-db

/libs/sync/ - needs approval

Files: libs/sync/snapshot_state.go, libs/sync/snapshot_state_test.go, libs/sync/testdata/sync-fileset/designer-nb.designer.ipynb
Suggested: @simonfaltum
Also eligible: @Divyansh-db, @renaudhartert-db, @hectorcast-db, @parthban-db, @tanmay-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

General files (require maintainer)

Files: cmd/workspace/workspace/import_dir.go, libs/notebook/ext.go, libs/notebook/ext_test.go
Based on git history:

  • @pietern -- recent work in libs/sync/, bundle/generate/, cmd/workspace/workspace/

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

@artchen-db artchen-db changed the title notebook: never strip the .designer.ipynb extension fix: more locations with .designer.ipynb extension stripping Jun 18, 2026
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.

1 participant