Skip to content

Normalize notebook cell source before wrapping jobs - #2143

Open
Hashim1999164 wants to merge 1 commit into
databricks:mainfrom
Hashim1999164:fix/ipynb-cell-source-string
Open

Normalize notebook cell source before wrapping jobs#2143
Hashim1999164 wants to merge 1 commit into
databricks:mainfrom
Hashim1999164:fix/ipynb-cell-source-string

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 22, 2026

Copy link
Copy Markdown

Changes

Run as Databricks Job crashed when an ipynb cell source was a JSON string. Nbformat allows a string or a list. The wrapper now normalizes source to lines before calling flatMap.

Fixes #2142

Tests

Added a unit test with a string cell source next to the existing list source wrap test.

@github-actions

Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/vscode

Inputs:

  • PR number: 2143
  • Commit SHA: 36fa587ae5e3d8fb606011f1c410b2d60b7043b0

Checks will be approved automatically on success.

@rugpanov

Copy link
Copy Markdown
Contributor

Thanks for the fix, @Hashim1999164 — this is a real bug and the change looks good (normalizing source to a list before flatMap is the right call, and the added test covers it well).

Before we can merge, external contributions to this repo need a signed Contributor License Agreement (CLA). It's a one-time agreement confirming you have the right to submit this contribution and granting Databricks permission to distribute it under the project's license — it's about licensing, not your code, and once signed it also covers any future contributions from you.

Two quick things so we can get it to you:

  1. Are you ready/willing to sign the CLA? (If you're contributing on behalf of a company, it may need sign-off from someone authorized there, so it's worth flagging early.)
  2. Could you share the real name and email we should put on the agreement? Your commit is currently authored under GitHub's private no-reply address (64767361+Hashim1999164@users.noreply.github.com), so we need a real name/email to send you the CLA.

Once you confirm, I'll have our legal team send over the CLA. After it's signed and returned, we'll get this merged. Thanks again!

@Hashim1999164

Copy link
Copy Markdown
Author

Yes, I am ready to sign the CLA. I am contributing as an individual, not on behalf of a company.

Name: Hashim Khan
Email: sardarhashim30@gmail.com

Please send the CLA to that email. I will sign it when it arrives.

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.

[BUG] Run as Databricks Job fails with "_a18.flatMap is not a function" when a notebook cell's source is a JSON string instead of a list

2 participants