Skip to content

Bundle packaging modes + ordered multi-bundle deploy - #41

Closed
matthewmoorcroft wants to merge 2 commits into
unify/reconcile-internalfrom
pr/ordered-deploy
Closed

Bundle packaging modes + ordered multi-bundle deploy#41
matthewmoorcroft wants to merge 2 commits into
unify/reconcile-internalfrom
pr/ordered-deploy

Conversation

@matthewmoorcroft

@matthewmoorcroft matthewmoorcroft commented Sep 1, 2026

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.

Implements the bundle-packaging design from Greg Hansen's proposal in the classification & single-bundle PR (#39), plus the ordered auto-deploy from Lorenzo Rubio / Alex Nastetsky's follow-up idea.

Relationship to the classification & single-bundle PR

the classification & single-bundle PR (fix/azure-function-activity-classification) carries the classification + initial single-bundle work and hosts the packaging design discussion. This PR is the packaging implementation, kept as a separate reviewable unit so classification and packaging review independently.

Greg's requirements

Must Implement

  • Users can specify their packaging preference — --packaging-mode flag + adapter prompt
  • Single, bundle-per-pipeline, and bundle-per-group all supported — PACKAGING_MODES = ("per-pipeline", "single", "per-group"); per-group supports both user-specified (--group-by spec) and inferred-from-Run-Pipeline-deps (--group-by inferred)
  • Run Pipeline dependencies correctly tracked — bundler/pipeline_graph.py
  • A single top-level DEPLOY.mdbundler/deploy_writer.py

Should Implement

  • Generated code reused within each bundle — _dedupe_notebooks + _namespace_bundle_artifacts
  • Deployment scripts consolidated per bundle — setup notebooks unioned/de-duped across the group in write_bundle_group
  • A single SETUP.md per bundle

Ordered auto-deploy

Per Lorenzo/Alex's follow-up, bundler/deployer.py (exposed as the flowx-deploy skill and adapter deploy) discovers bundles, topologically orders them callees-first, deploys each with databricks bundle deploy, reads each deployed job's real numeric id from bundle summary, and injects it into callers via --var — no manual job-id wiring. Verified end-to-end against a live workspace.

Testing

  • Unit tests: test_packaging_modes.py, test_pipeline_graph.py, test_deployer.py, test_deploy_writer.py
  • Live deploy validated against a real multi-pipeline migration (correct order, cross-bundle id capture/injection, stop-on-failure)

Not included here

Two independent packager correctness bugs found while deploy-testing (bare {{input}} in inner jobs; templated existing_cluster_id) are split into fix/foreach-inner-job-packaging since they're unrelated to packaging design.

@matthewmoorcroft
matthewmoorcroft marked this pull request as ready for review September 1, 2026 12:17
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>
@matthewmoorcroft

Copy link
Copy Markdown
Member Author

Closing — this was a port of another author's work and is being withdrawn from the public repo.

@matthewmoorcroft
matthewmoorcroft deleted the pr/ordered-deploy branch September 1, 2026 14:33
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