Skip to content

Test/artchen db/bundle/preserve designer ipynb suffix#5377

Open
andrewnester wants to merge 2 commits into
mainfrom
test/artchen-db/bundle/preserve-designer-ipynb-suffix
Open

Test/artchen db/bundle/preserve designer ipynb suffix#5377
andrewnester wants to merge 2 commits into
mainfrom
test/artchen-db/bundle/preserve-designer-ipynb-suffix

Conversation

@andrewnester
Copy link
Copy Markdown
Contributor

Changes

Why

Tests

…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`.
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.
@github-actions
Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

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

/bundle/ - needs approval

Files: bundle/config/mutator/translate_paths.go, bundle/config/mutator/translate_paths_test.go
Suggested: @pietern
Also eligible: @janniklasrose, @denik, @shreyas-goenka, @lennartkats-db, @anton-107

General files (require maintainer)

Files: NEXT_CHANGELOG.md, libs/notebook/ext.go, libs/notebook/ext_test.go
Based on git history:

  • @simonfaltum -- recent work in ./

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

@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

Commit: 986015a

Run: 26639019765

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.

3 participants