Skip to content

Fix cross-bundle run_job_task refs pointing at non-existent nodes - #37

Open
matthewmoorcroft wants to merge 2 commits into
unify/reconcile-internalfrom
pr/cross-bundle-run-job-refs
Open

Fix cross-bundle run_job_task refs pointing at non-existent nodes#37
matthewmoorcroft wants to merge 2 commits into
unify/reconcile-internalfrom
pr/cross-bundle-run-job-refs

Conversation

@matthewmoorcroft

Copy link
Copy Markdown
Member

⚠️ Draft — initial port. This change is rebuilt onto the unified base as-is. It predates the engine → sources/adf module restructure, so it still needs adaptation to the new layout (and a green test run) before it is mergeable.

Closes #29

What

ExecutePipeline emits run_job_task.job_id = ${resources.jobs.X.id}, which only resolves when X is a job in this bundle. In a multi-pipeline migration each ADF pipeline becomes its own bundle, so a reference to a sibling pipeline points at a node that doesn't exist here and bundle deploy fails with no such node "resources.jobs.X".

New _rewrite_cross_bundle_run_job_refs runs in write_bundle before the YAML is written: it rewrites run_job_task refs to out-of-bundle jobs into ${var.X} and registers X in _cross_bundle_variables (which the existing _build_databricks_yml loop already declares). The operator supplies the numeric job id at deploy via --var, as SETUP.md documents. Recurses into for_each_task bodies.

Relationship to the lineage epic (#24)

This is the stopgap ("FLOWX-7") that #24 (ordered cross-pipeline deploy/run from control lineage) is designed to build on — #24 keeps this ${var.X} rewrite as the fallback for unresolved callees and layers an ordered orchestration bundle on top once #23's lineage.control_edges exist. This fix makes multi-pipeline deploy work today; it does not conflict with or block #24.

Scope

src/flowx/bundler/dab_writer.py only (the cross-bundle rewrite; the task-value dependency fix is a separate PR).

Testing

make test full unit suite green; test_bundler.py + test_bundle_invariants.py pass.

This pull request and its description were written by Isaac.

@matthewmoorcroft
matthewmoorcroft marked this pull request as ready for review September 1, 2026 12:16
Rewrite internal package-proxy URLs (pypi-proxy.dev.databricks.com) to
pypi.org / files.pythonhosted.org so public CI resolves deps. Same pinned
versions and hashes; matches main.

Co-authored-by: Isaac <no-reply@databricks.com>
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