Skip to content

direct: report resources as they are deployed - #6361

Draft
denik wants to merge 4 commits into
mainfrom
denik/investigage-output-order
Draft

direct: report resources as they are deployed#6361
denik wants to merge 4 commits into
mainfrom
denik/investigage-output-order

Conversation

@denik

@denik denik commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Why

The per-resource output added in #5720 (CLI v1.13.0)
is printed after the whole deployment has finished, so a deploy that failed part way
through reported nothing about the resources it had already applied. On the direct engine
each resource is now reported as soon as it is applied.

Changes

Resources are applied in parallel, so these lines are no longer in a deterministic order.
Added SortLines (name -> regexp) and SortLinesOn (name -> bool) to the acceptance
config: each run of consecutive output lines matching a pattern is sorted before
comparison, so a test pins which resources were applied rather than the order. Enabled
once in acceptance/test.toml; an inner test.toml can replace a pattern by reusing its
name or switch it off.

resource_deps/create_error deploys with -q now: its jobs.independent has no
dependency on the failing job, so where its line lands relative to the errors is not
stable, and that test is about which errors a failing deploy reports.

Tests

New selftest/sortlines covers sorting, per-name override and disabling. 18 goldens
updated: 12 failure and kill paths now report what succeeded, 6 are lines moving to their
true chronological position.

denik added 2 commits August 24, 2026 14:17
The direct engine printed all per-resource lines after the whole deployment
finished, so a deploy that failed part way through reported nothing about the
resources it had already applied.

Resources are applied in parallel, so the lines are no longer in a deterministic
order. Add a SortLines/SortLinesOn acceptance config option that sorts runs of
matching output lines before comparison, and enable it for these lines.

Co-authored-by: Isaac
The blocks in the selftest sorted the same way whether or not the boundary was
respected. Pick values so a merged sort would move lines across it, and add the
matching unit test case.

Co-authored-by: Isaac
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: e7f63e5

Run: 32737299073

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🔄​ aws linux 1 1 4 290 1163 13:06
💚​ aws windows 1 4 293 1161 9:12
🔄​ azure linux 1 1 4 276 1168 12:21
💚​ azure windows 1 4 279 1166 7:31
🔄​ gcp linux 1 1 4 277 1168 12:34
💚​ gcp windows 1 4 280 1166 7:59
8 interesting tests: 4 SKIP, 3 flaky, 1 RECOVERED
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestSyncFullFileSync ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
🔄​ TestSyncIncrementalFileSync 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestSyncNestedFolderDoesntFailOnNonEmptyDirectory ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
Top 17 slowest tests (at least 2 minutes):
duration env testname
4:17 azure windows TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
3:56 aws linux TestAccept/bundle/resources/job_runs/wait/DATABRICKS_BUNDLE_ENGINE=direct
3:53 aws windows TestAccept
3:44 gcp linux TestAccept/bundle/resources/job_runs/wait/DATABRICKS_BUNDLE_ENGINE=direct
3:35 gcp windows TestAccept
3:35 aws windows TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
3:25 azure linux TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
3:17 aws linux TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
3:09 gcp linux TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
3:08 azure windows TestAccept
3:03 gcp windows TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
2:27 azure windows TestAccept/bundle/resources/job_runs/wait/DATABRICKS_BUNDLE_ENGINE=direct
2:14 aws windows TestAccept/bundle/resources/job_runs/wait/DATABRICKS_BUNDLE_ENGINE=direct
2:13 azure linux TestFilerWorkspaceFilesExtensionsStat
2:13 gcp windows TestFilerWorkspaceFilesExtensionsReadDir
2:02 gcp windows TestAccept/bundle/resources/job_runs/wait/DATABRICKS_BUNDLE_ENGINE=direct
2:00 gcp windows TestImportDir

denik added 2 commits August 24, 2026 15:38
The migration ran inside deployCore, before the postdeploy script. Order is now
deploy, then the postdeploy script, then the migration. The migration is still
gated on the deploy succeeding and still not on the script: the resources are
deployed either way, so the state describes the same deployment.

Co-authored-by: Isaac
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.

2 participants