Skip to content

feat!: replace @task with @asset as the one Python node - #1611

Merged
chio-labs-delivery[bot] merged 16 commits into
mainfrom
feat/asset-only-python-nodes
Nov 21, 2026
Merged

chio-labs-delivery[bot] merged 16 commits into
mainfrom
feat/asset-only-python-nodes

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Why

@task and @asset did the same job: dependencies, SQL reads, retries, skips and results were identical, and assets only added optional output metadata (columns, column_lineage, materialized). Users picked one by feel. SQLBuild now has one Python node for computation and side effects: @asset. Loaders and checks stay separate kinds.

Changes

  • Remove @task, sqlbuild.tasks, TaskContext and the task node kind outright. Importing sqlbuild.tasks fails compile with a message that says to use @asset from sqlbuild.assets with AssetContext.
  • Drop task from the kind tables in planning publications, integration results and definition-change labels, from progress output, and from validation messages. python_task stays in the lifecycle catalogue as a retired name, so history from earlier versions still reads back in sqb recall.
  • UI: remove the task kind, label, icon and filter from Lineage, Catalog, change listings and the providers page.
  • Docs and the packaged skill: remove the Tasks page and move every example to @asset. The Assets page says that, for users coming from task-based tools, an asset is a task that may not describe its output. The playground template uses an asset.
  • Stored task: identities are not mapped. Nodes that were tasks start as new assets.
  • Tests and compiler goldens move off the task kind. No DuckShop case is needed, because this removes a kind and adds no project shape or lifecycle sequence.

BREAKING CHANGE: @task, sqlbuild.tasks and TaskContext are removed. Use @asset from sqlbuild.assets and AssetContext. The task node kind and the task: selector no longer exist.

Verification

  • A new E2E test compiles a project importing sqlbuild.tasks and expects the @asset message; it fails on main.
  • Targeted pytest, cargo tests (with the Postgres harness), the compiler differential (396 projects), and UI vitest and svelte-check.
  • make test and make check-ci on the final head.

Work in progress, paused for a higher priority. Adds two cases to the
compile layout E2E test: a node module importing sqlbuild.tasks (the
decorator, and the module with TaskContext) must fail compile and say to
use @asset from sqlbuild.assets. Run locally against main's build: both
cases fail, because compile still accepts @task. The removal itself is
not started.

Plan when resumed: after sqlbuild.tasks is deleted, compile already
fails with D011 'No module named sqlbuild.tasks'; add the @asset
guidance where ProjectDir::load imports node files (python-front
imported_modules.rs), then remove the task kind from Rust, Python, UI,
docs, templates and skill references.
Work in progress, not ready for review. Removes sqlbuild.tasks, @task,
TaskContext and the task node kind from discovery, records, compile,
selection, planning, rules, the UI selector list and the Python nodes
playground (its upstream examples are now assets). Importing
sqlbuild.tasks from a node file now fails compile with a message that
points to @asset from sqlbuild.assets.

Readers of data written by older versions keep accepting the task kind:
the integration-result contract, published snapshots in orchestration,
change labels for a previous definition snapshot, and UI display maps.

Validated so far: cargo check of the workspace with all targets, the UI
unit tests (625 passed), and the Python unit suite except about 60
discovery, executor and output tests whose expectations still list task
and asset nodes separately. Docs are not updated yet.
Unit suite passes (9382). Removes the materialized check that only
rejected tasks, the task-only decorator, context and result tests, and
re-records the two identity-sharing digests, whose only change is the
node type (verified: with kind=task they reproduce the old digests).
Rust and Python expectations now name assets, selection orders follow
the asset sort order, the explicit-reference golden is re-recorded (each
changed digest reproduces the old one with the task wording restored),
the docs drop tasks, and the docs skill references are regenerated.

Validation so far: cargo test of the touched crates passes apart from a
launcher SIGINT test that fails in this sandbox only; make test has 4
remaining failures from a stale local sqlbuild version (env-only);
fensu check clean.
Drop task from the Lineage, Catalog, change and provider views, from the
publication, integration-result and definition-change kind tables, and
from the python_task lifecycle and progress operations. Move the tests,
helpers and docs that still used @task or the task kind to @asset.
…sages

Keep python_task in the lifecycle operation catalogue as a retired name so
history written by earlier versions still decodes. Remove task from the
remaining validation and executor messages, and regenerate the compiler
goldens that carried the old wording.
@kvlonge
kvlonge enabled auto-merge November 20, 2026 23:32
@kvlonge
kvlonge added this pull request to the merge queue Nov 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 21, 2026
The end-to-end shards still asserted task labels, kind ordering and
decorators that no longer exist. They now assert the same behavior
against @asset nodes.
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 0368994 Nov 21, 2026
36 checks passed
@chio-labs-delivery
chio-labs-delivery Bot deleted the feat/asset-only-python-nodes branch November 21, 2026 05:47
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