Skip to content

direct: report resources as they are deployed - #6361

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

direct: report resources as they are deployed#6361
denik wants to merge 8 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.

@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 2def2d2

Run: 32835933165

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 1 4 291 1177 5:58
💚​ aws windows 1 4 293 1175 7:09
🔄​ azure linux 2 1 4 275 1182 5:56
💚​ azure windows 1 4 279 1180 6:39
💚​ gcp linux 1 4 278 1182 6:52
💚​ gcp windows 1 4 280 1180 6:11
7 interesting tests: 4 SKIP, 2 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
🔄​ TestFilerReadWrite ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
🔄​ TestFilerReadWrite/files ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
Top 9 slowest tests (at least 2 minutes):
duration env testname
4:10 azure windows TestAccept
3:18 aws windows TestAccept
3:12 aws windows TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
3:11 gcp windows TestAccept
2:54 gcp windows TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
2:47 aws linux TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
2:42 gcp linux TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
2:34 azure linux TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct
2:23 azure windows TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct

denik added 5 commits August 25, 2026 09:21
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
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
#6368 moved the deploy summary ahead of the postdeploy script and the migration,
and #6357 changed the job_runs tests.

Co-authored-by: Isaac
@denik
denik force-pushed the denik/investigage-output-order branch from e7f63e5 to 1552eda Compare August 25, 2026 07:29
denik added 3 commits August 25, 2026 11:20
destroy does list resources individually, up front for consent; what it lacks is
per-resource completion output. State the reason for the flag instead.

Co-authored-by: Isaac
destroy behaves like deploy now: each resource is reported as it is deleted, so a
destroy that fails part way through says what it removed. The terraform engine has
no per-resource results, so it reports them from the plan before the count, keeping
the two engines' output identical.

-q where the lines are not the subject: the templates tests keep only the last two
lines of destroy output, and the secret_scopes cleanup destroy diverges because the
scope's permissions are a node of their own on direct but not on terraform.

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