Repository navigation
fix: follow the CLI version's notebook header rule, which v1.24.0 changed - #362
Merged
Merged
Conversation
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #361.
Databricks CLI v1.24.0 changed how it tells a notebook from a plain file (databricks/cli#7290,
detectSourceinlibs/notebook/detect.go):# Databricks notebook sourcefor.py).Databricks notebook source, in any comment style.The inspector always used the old rule, so on v1.24.0 it warned "may not be a notebook" for files the CLI takes as notebooks, and missed "may be a notebook, not a file" for file tasks the CLI rejects.
What changes
validateBundlereturns the version of the CLI that validated.notebookHeaderRuleForpicks the rule from it: exact before v1.24.0, contains from v1.24.0 on, and contains when the version can't be read. The extension and the Problems panel pass it toextractBundleGraph, which uses it for task paths, pipeline libraries and "Did you mean" suggestions.npm run test:notebook-rule:cli, a CI step on the oldest supported CLI and on CLI latest. For every job task in the notebook-paths fixture it runsbundle validateagainst a fake workspace on 127.0.0.1 (no login, nothing real contacted) and fails when the CLI and the inspector disagree. If a later CLI release changes the rule again, CLI latest fails and names the task.docs/checks.mdand the fixture README describe both rules.How it was checked
.bundlefolder validate created was deleted), then with the fake workspace, with the same results:notebook_task→ byte order mark + headernotebook_task→ header + more textnotebook_task→-- Databricks notebook sourcein a.pynotebook_task→print("Databricks notebook source")notebook_task→ marker ending at byte 190notebook_task→ marker after byte 200spark_python_task→ byte order mark + headerdatabricks workspace import --format AUTOon v1.24.0: the workspace storedprint("Databricks notebook source")as a Python notebook, the byte order mark file as a Python notebook, and a plain script as a file. The test folder was deleted.docs/checks.mdnotes that the marker line doesn't have to be a comment.npm run test:notebook-rule:clipasses on both. With the exact rule forced, it fails on v1.24.0 and lists the 6 tasks where the CLI and the inspector disagree.bundle validate.npm run test:semantic:cli:matrix,test:semantic:cli,test:variables:clion both CLIs;npm test(1219 passed), typecheck, lint, build.Limits
bundle deployuploads as notebooks, is not checked by the inspector.Release: patch, planned for 0.6.4 (Thursday 2026-11-12), with #355 and #360. That makes 3 fragments.