Skip to content

Feat: Add optional per-task context propagation - #6141

Open
mday-io wants to merge 2 commits into
SQLMesh:mainfrom
mday-io:feat/concurrency-context
Open

mday-io wants to merge 2 commits into
SQLMesh:mainfrom
mday-io:feat/concurrency-context

Conversation

@mday-io

@mday-io mday-io commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Add optional context_factory support to the concurrency helpers. Capture context once per invocation and give each task its own copy, including serial execution. Omitting the factory preserves existing behavior.

#6140 is merged. This PR now contains only context propagation and is a prerequisite for #6051.

Test Plan

  • Rebased onto main 3891d65a7; git range-diff confirms the feature patch is unchanged.
  • All 17 concurrency tests pass, including context isolation, caller context, executor reuse and terminal worker failures.
  • Snapshot-wrapper probe passes with one and three workers; context reaches callbacks without leaking their changes to siblings or the caller.
  • Independent review found no correctness issues.
  • make style and all six make fast-test batches pass, with 2,895 tests passed and 13 skipped.
  • Confirm new-head CI, including Windows.

Checklist

  • I have run make style and fixed any issues
  • I have added tests for my changes (if applicable)
  • All existing tests pass (make fast-test)
  • My commits are signed off (git commit -s) per the DCO

@mday-io
mday-io force-pushed the feat/concurrency-context branch from 1766e52 to 4946583 Compare October 15, 2026 17:36
@mday-io
mday-io marked this pull request as ready for review October 15, 2026 21:36
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