Repository navigation
direct: fail deploy and destroy when a resource delete is rejected - #7931
Conversation
Without deployment history, a delete rejected with an error other than not-found or permission-denied fell through to dropping the resource from state, so the command succeeded and the resource stayed in the workspace untracked. Return the error again, as before the deployment history change. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…ete-error Co-authored-by: Isaac <no-reply@databricks.com>
|
Commit: Regression test reportSelected 2 changed tests (limit=20, 0 not selected) 4 tests: regression=2 unreleased=0 coverage=2 failing=0
TestAccept/bundle/destroy/delete-error/DMS=: branch ✅ | main (0c71683) ❌ | latest (v1.28.0) ❌main (0c71683): latest (v1.28.0): TestAccept/bundle/resources/materialization_sets/settled_failure/DMS=: branch ✅ | main (0c71683) ❌ | latest (v1.28.0) ❌main (0c71683): latest (v1.28.0): |
✅ Integration test reportCommit: 7fda907
Top 6 slowest tests (at least 2 minutes):
|
There was a problem hiding this comment.
Automated review at 7c6fe4c. Each finding was verified against the code.
No blocking issues found. 1 non-blocking comment(s) below.
This PR makes (*DeploymentUnit).Delete return the delete error on runs without deployment history too, so a rejected delete fails bundle deploy/bundle destroy and the resource stays in state. That restores the behavior from before #6094. The change in apply.go is right: RecordFailure already does nothing when history isn't recorded, and deleteConfirmedGone is still checked first. One test gap remains: the settled_failure golden doesn't show the state that its new title describes.
Co-authored-by: Isaac <no-reply@databricks.com>
…er order Co-authored-by: Isaac <no-reply@databricks.com>
settled_failure/test.toml: #7919 added a Badness for the bug this PR fixes; keep this branch's version, which drops it with the DMS pin. Co-authored-by: Isaac <no-reply@databricks.com>
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Review by review-factory (Claude Sonnet 5.5 + Claude Opus 5.5 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.
No issues found.
|
🤖 This PR made the cluster variants of the bundle invariants flaky on AWS, Azure and GCP since 2026-11-26 (merge day): invariant/delete_idempotent cluster.yml.tmpl, invariant/destroy_idempotent cluster_libraries.yml.tmpl and the other AI agent (opus5.5, isaac_claude) |
…undle/destroy/delete-error (databricks#7930) ## Changes New test `acceptance/bundle/destroy/delete-error` that records how deploy and destroy handle a job delete the backend rejects (400 `INVALID_PARAMETER_VALUE`, injected with `fault.py`): - `bundle deploy` after removing a job from the config prints `Deleted jobs.bar` and exits 0; the job still exists and is no longer in state. - `bundle destroy` prints `Destroy: 1 deleted` and exits 0 and removes the state; the job still exists, untracked. `Badness` in `test.toml` says what should happen instead: both commands fail with the delete error and keep the resource in state, as the `DMS=true` run already does. The `DMS=true` variant is excluded for now because its output differs; the fix PR (stacked on this one) re-enables it. Fix: databricks#7931 ## Why A delete that fails this way leaves a resource in the workspace that no bundle tracks, while the CLI reports success. New small test directory (no existing test sets up a delete fault for a removed resource); runtime about 0.5s per variant. This PR was created by analyzing coverage gaps. Coverage: [bundle/direct/apply.go](http://go/cli/dashboard/coverage/file/bundle/direct/apply.go), `(*DeploymentUnit).Delete`, the branch for a delete error that is not missing, managed-by-parent or permission-denied. ## Tests `go test ./acceptance -run TestAccept/bundle/destroy/delete-error` AI agent (opus5.5, isaac_claude) This pull request and its description were written by Isaac. --------- Co-authored-by: Isaac <no-reply@databricks.com>
…atabricks#8068) 🤖 ## Changes `ResourceCluster.DoRead` ran `clusters/get` and `libraries/cluster-status` concurrently through an errgroup and returned whichever error came first. For a deleted cluster the backend answers both, and `clusters/permanent-delete`, with `400 INVALID_PARAMETER_VALUE` "Cluster <id> does not exist". The Go SDK maps only the `clusters/get` answer to `ErrResourceDoesNotExist`. When the library-status error came first, the plan warned about a read failure and kept the delete, `permanent-delete` failed with 400, and the re-read in `deleteConfirmedGone` lost the same race, so the command failed. Since databricks#7931 that delete error fails `bundle deploy` / `bundle destroy` instead of dropping the entry from state, so the race now shows up as flaky failures. - `DoRead`: the cluster GET error takes precedence, and the library read is cancelled once the cluster GET failed (as the errgroup did before). A deleted cluster now always reads as not found, so the plan drops it without a delete; a delete that still hits an already-deleted cluster (saved plan, deleted after planning) is confirmed gone by the existing re-read in `deleteConfirmedGone`. - `libs/testserver`: `clusters/get`, `libraries/cluster-status` and `permanent-delete` for a missing cluster return the cloud's 400 (was 404 / success). One golden changes: `bundle/migrate/auto/artifacts` now shows the cloud's message instead of "Not Found". ## Why Dashboard: [error/598](http://go/cli/dashboard/error/598), first seen on main on 2026-11-26 after databricks#7931, on AWS, Azure and GCP: ``` Error: cannot delete resources.clusters.[NAME]: deleting id=[ID]: Cluster [ID] does not exist (400 INVALID_PARAMETER_VALUE) ``` Tests: - [TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1](http://go/cli/dashboard/test/acceptance.TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1) - [TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=](http://go/cli/dashboard/test/acceptance.TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=) - [TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=](http://go/cli/dashboard/test/acceptance.TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=) - [TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=](http://go/cli/dashboard/test/acceptance.TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=) - and the other `cluster*.yml.tmpl` variants of both invariants. ## Tests - New `bundle/resources/clusters/deleted-out-of-band`: the state points at a cluster that no longer exists, and a `clusters/get` stub answers the 400 after 300ms, so the library-status 400 always comes first. `bundle destroy` and a deploy that removes the cluster both fail on main with the error above; they pass here. - New `bundle/resources/clusters/deleted-out-of-band-plan` (no stub): a cluster deleted out of band and still in config is created again; a saved-plan delete of a cluster deleted after the plan sends `permanent-delete`, gets the 400, and `deleteConfirmedGone` drops the state entry (with its existing warning; databricks#8046 moves that warning to debug). - A unit test that the library read is cancelled once the cluster GET failed (main's errgroup did that too; it guards the new code). - The cloud run (commit message) reruns both invariants on every cloud. ## Gaps and risks - The 400 responses were checked on AWS only. The cloud run of the invariants covers the read path on Azure and GCP; no cloud test sends `permanent-delete` for a missing cluster, so the fake's 400 there rests on the AWS check (the CLI drops the state entry whatever that call returns, since the re-read decides). Follow-up: make `deleted-out-of-band-plan` a cloud test. - A cluster deleted between the two concurrent GETs (cluster GET succeeds, library status says it does not exist) still fails that plan once with a read error; the next command reads it as not found. No message matching is added for it (AGENTS.md rules out branching on error text). - Overlaps with databricks#8046 (open) in purpose only: that PR logs the `deleteConfirmedGone` fallback at debug level; this PR relies on that fallback for the saved-plan case. No shared lines. - Risk: medium (deploy/destroy path, concurrency in `DoRead`). AI agent (opus5.5, isaac_claude) This pull request and its description were written by Isaac. --------- Co-authored-by: Isaac <no-reply@databricks.com>
## Release v1.29.0 ### Notable Changes * Introduce device code login: `databricks auth login --use-device-code` logs in from a machine that cannot open a browser, such as a headless server or an SSH session, by approving the login in a browser on another device. See [docs/device-code-login.md](https://github.com/databricks/cli/blob/main/docs/device-code-login.md). ([#8069](#8069)) ### CLI * Automatic installation of Databricks AI tools no longer moves a Databricks skill that you put into a coding agent's skills directory (for example `~/.cursor/skills/databricks-sql`) to a temporary directory when no `databricks aitools install` has run yet. While that skill is there it installs no skills, though agents that use the Databricks plugin still get it; if you answered yes to the install question, it prints which skill it kept and the command that replaces it. A later CLI version finishes the install once you move the skill out. ([#8071](#8071)) * Automatic installation of Databricks AI tools no longer runs a coding agent's CLI after a command you ran for something else, so a Databricks plugin install no longer runs out of time there: an agent without the Databricks plugin gets skill files, an agent that has the plugin keeps it and gets no skill files next to it, and `databricks aitools update` still updates the plugin. Only the install that follows a yes to the question of `databricks auth login` installs the plugins, as `databricks aitools install --scope=global` does. When that install is stopped, a later run gives the skill files to the agents that did not get them, keeping the skill files you edited since, and runs no agent's CLI: an agent that was to get the plugin is left for `databricks aitools install`. On Windows, where stopping an agent's CLI does not stop the processes it started, no automatic installation runs an agent's CLI. `databricks aitools update` no longer gives skill files to an agent that has the Databricks plugin and none of the CLI's skill files. ([#8224](#8224)) * `databricks aitools install --skills-only --scope project` now installs Codex skills into `<project>/.agents/skills` instead of skipping Codex. `databricks aitools update --scope project` refreshes those skills, and adds none for Codex to a project that does not have them. ([#7990](#7990)) * `databricks aitools auto-install enable` and `disable` now send usage telemetry when they change the setting, and the other places that ask for or change the consent to installing Databricks AI tools automatically record that too. `databricks auth login` sends that record, and the events of the automatic installation that runs after the answer, with the profile it saved, but only when it asked about installing the tools. When the configured workspace is slow or unreachable, `enable` and `disable` can take up to about 6 seconds longer. Such a login prepares the upload while it waits for the answer, so it takes up to about 3 seconds longer, or up to about 6 when the answer comes within 3 seconds. Set `DATABRICKS_CLI_DISABLE_TELEMETRY=1` to opt out. ([#8194](#8194)) * When the automatic installation of Databricks AI tools is turned off (for example by `databricks aitools auto-install disable` or `DATABRICKS_AITOOLS_AUTO_INSTALL=false`), the CLI no longer prints its install hint for coding agents or Claude Code's plugin install line. ([#8194](#8194), [#8211](#8211)) * `databricks aitools install` now reports a coding agent as failed, with a step to recover, when it cannot write the skill files into that agent's skills directory (for example one left owned by root by an earlier run with sudo). It used to report the agent as installed and exit with code 0; it now exits with code 1 when that agent was named with `--agents` or no other agent was set up. `databricks apps init` names such an agent with the same kind of step, and the automatic install retries when no agent got the skills. ([#7962](#7962)) * `databricks aitools install`, `databricks aitools update` and the automatic install now see a Databricks plugin for Codex or GitHub Copilot installed with the agent's own CLI. When the agent's CLI is not on PATH they keep the plugin and add or update no skill files next to it, and `install` and `update` remove the skill files an earlier run added, so the agent no longer loads every Databricks skill twice. `install --skills-only` skips such an agent and names the agent's own command that removes the plugin. ([#7917](#7917)) * `databricks auth login` now asks about installing Databricks AI tools with a short card that names the coding agents that get them and says how to turn automatic installs off. An empty reply asks only the card's last line again. ([#8242](#8242)) * `databricks aitools` commands no longer fail when the latest skills release cannot be looked up: they warn and use the newest release they know, and never downgrade installed skills unless the compatibility manifest entry sets `"allow_downgrade": true` to roll back a bad release. The lookup now reads the version file the skills repository publishes on the host that serves the skill files, instead of the rate-limited GitHub API, so `DATABRICKS_CLI_GITHUB_API_URL` no longer affects it and a `DATABRICKS_SKILLS_BASE_URL` mirror must serve `main/metaplugin/version.meta.json`, and answer `HEAD` for each release's `manifest.json`, for the lookup to succeed. A compatibility manifest entry can track the latest release with `"use_latest": true`, which older CLI versions ignore, and the entry for CLI 1.23.0 and newer now does, so `databricks aitools install` and `update` install the latest skills release instead of 0.2.47. ([#8202](#8202), [#8203](#8203)) * `databricks aitools uninstall` now removes the skill directories it copied into a single agent's skills directory when they are unmodified; before, it reported them as uninstalled but left them in place. ([#7936](#7936)) * A global `databricks aitools uninstall` run while the automatic installation of Databricks AI tools is installing now fails before it removes anything and asks to run it again, instead of reporting success and having the installation put the tools back seconds later. An opt-out stored while an automatic installation is deciding whether to install (`databricks aitools auto-install disable`, say) now stops it. ([#7924](#7924)) * Fix `databricks fs rm` and `fs rm -r` on UC Volumes failing with "file does not exist" or "no such directory" after a delete was retried. ([#7926](#7926)) * Use the public Sandbox SDK for `databricks sandbox` lifecycle commands, including native SDK JSON output that requires scripts using the previous field names to migrate; preserve short IDs, readiness and terminal text, with SSH through port forwarding. `--idle-timeout 0` now disables auto-stop; use `--no-autostop=false` to reset to the 10-minute default. ([#8040](#8040)) * Remove `sandbox register` and `sandbox ssh-key`; use OAuth-backed `sandbox ssh` or `sandbox ssh-setup` instead, without changing existing SSH keys, configuration, or server registrations. ([#8098](#8098)) * Show migration instructions when retired `sandbox register` or `sandbox ssh-key` commands are invoked, including with their legacy flags. ([#8180](#8180)) * `databricks ssh connect --accelerator` now accepts any serverless GPU type name, such as `GPU_1xRTX6000`, instead of only `GPU_1xA10` and `GPU_8xH100`; the workspace validates which GPU types and environment versions are available. ([#7833](#7833), [#7957](#7957)) * `databricks ssh connect` now reuses an existing secret scope for its SSH keys only if the scope is Databricks-backed and its ACL grants MANAGE to the current user and no access to any other principal, and otherwise fails with an error that explains how to delete the scope and connect again. ([#8141](#8141)) * `databricks ssh connect`: the SSH server now writes the client public key from the session's secret scope to `authorized_keys` in canonical form, and fails with an actionable error if the stored key is not a single SSH public key without options. ([#7994](#7994)) ### AI Runtime * Show workspace-specific supported GPU counts in `databricks air run -h config.compute.num_accelerators`. ([#8215](#8215)) * `databricks air cancel --all` now lists the runs it matches even with `--yes`, and its help says that `--all` includes runs started from other terminals, scripts and agents, and that runs can be cancelled by ID instead. `air get` now shows a "Cancel reason" for cancelled runs, such as "Run cancelled by user". ([#8233](#8233)) * Clarify that the `air run` PyTorch warning checks direct dependencies and may appear when another dependency installs PyTorch. ([#8214](#8214)) * Make `databricks air run --dry-run` say that only static and workspace validation ran, and that dependencies were not installed and code was not run. ([#8219](#8219)) * Remove outdated Preview labels and the runtime warning from `databricks air images push`. ([#8097](#8097)) * Print the source image size in `databricks air images push`, and after the push the compressed size and layer count from the pushed manifest, with a link to the Databricks Artifact Registry image limits. ([#7868](#7868)) * Warn in `databricks air images push` when the source image sets a `WORKDIR` other than `/`, suggest absolute paths in commands and scripts, and link the AI Runtime `command` docs. ([#7867](#7867)) * Accept `experiment_name` as an alias for `experiment` in `databricks air list --filter`. ([#8220](#8220)) * `databricks air logs` with no logs to show now reports `PENDING` for a run that is waiting for compute (matching `air get`), prints the `air logs --follow` command to run when not following an active run, and for `--retry N` on a finished retry reports how that retry ended. ([#8232](#8232)) * `databricks air run` now warns when code passes a run ID to `mlflow.start_run()` before training a Hugging Face Trainer that reports to MLflow, which fails the job with "Run ... is already active" when training begins. ([#8234](#8234)) ### Bundles * Record deployment history by default for bundles deployed to a workspace that Databricks has enrolled. Set `experimental.deployment_history: false` to opt out. ([#7895](#7895)) * Recover from a create request that failed after the backend applied it for more resources (Unity Catalog catalogs, schemas, volumes, external locations, registered models and secrets; Lakebase endpoints, databases, synced tables and snapshot schedules; secret scope permissions), in the direct deployment engine. ([#7910](#7910)) * Fix the bundle auth error "the host in the profile doesn’t match the host configured in the bundle" when only one of the hosts includes the default port, such as `:443`. ([#7948](#7948)) * Do not warn about missing required fields under an optional block that is explicitly null, such as a job's `schedule: null`. ([#7982](#7982)) * Fix `bundle deploy` failing with "no such file or directory" when a `dynamic_version` wheel artifact has several wheels of the same package. ([#8027](#8027)) * `bundle deploy` and `bundle destroy` no longer warn when a delete fails but a read finds the resource missing or in terminal teardown, which is the usual outcome when a delete is retried after a transient error. The message is logged at debug level. ([#8046](#8046)) * Fix `bundle deploy` and `bundle destroy` with the direct engine sometimes failing with "Cluster ... does not exist" when a cluster in the state was already deleted. ([#8068](#8068)) * Fix notebooks with an upper-case extension (for example `notebook_path: ./etl.R`) being reported as not found when deploying a bundle from the workspace. ([#8093](#8093)) * Fix `bundle init` ignoring the default of, and not prompting for, a template property with a JSON schema `format` other than `warehouse_path` (an integer one printed `Validation failed` forever). Without a TTY, such a property with no default and no value from `--config-file` now fails like any other property instead of rendering as an empty string. ([#8094](#8094)) * Don't update the unchanged permissions of a vector search endpoint, model serving endpoint or model when the resource itself is updated in place (direct engine). ([#8108](#8108)) * Fix a crash in `bundle init` when the config file sets a `number` property, or an `integer` property declared only in `anyOf`, to null, or when a `number` property has null in its `enum`. ([#8155](#8155)) * Fix `bundle deploy --plan` uploading the wrong wheels for `dynamic_version` artifacts with a build command when the build output matches several wheels. It now also uploads every library file the plan references, and fails before uploading anything when one of them no longer exists locally. ([#8157](#8157)) * Fix target overrides of `mode`, `cluster_id` and `git` failing with `expected a map to index ..., found nil` when the top-level `bundle` key is empty. ([#8166](#8166)) * Fix a crash in `bundle init` when a template schema sets a property to null, for example `"properties": {"p": null}`. It now fails with an error naming the property. ([#8168](#8168)) * Fix target variable overrides being dropped with a warning, so the root value was used: short-form and complex-value overrides under the deprecated `environments` key, and unquoted dates under `targets`. Short-form overrides under `environments` of a variable that is not defined now fail with `variable x is not defined but is assigned a value`, as they already did under `targets`. A target override no longer panics when the variable's `type` is not a string, and a scalar `targets` value (such as `targets: false`) is reported at its location instead of failing with `failed to rewrite`. ([#8183](#8183)) * Fix bundle commands failing with `can't find ".venv/bin/python3"` when run from a subdirectory of a bundle that sets a relative `python.venv_path`. ([#8184](#8184)) * Fix external location updates not clearing `read_only` or `fallback` in the direct deployment engine when they are removed from the bundle configuration; a value set outside the bundle is now reset to the configuration on deploy, as the plan already showed. ([#8230](#8230)) * Fix `bundle generate app` for an app with no source code to download (never deployed, or an empty workspace source folder): it now creates the source directory, so the generated bundle loads. ([#8244](#8244)) * Fix `bundle deploy` and `bundle destroy` without deployment history reporting success and dropping a resource from state when the backend rejects its delete; the resource stayed in the workspace untracked. ([#7931](#7931)) * Add the `genie_agents` resource for managing AI/BI Genie agents on the direct deployment engine. ([#7617](#7617)) * Apply a secret scope rename that was pending when a bundle migrates from terraform state to the direct engine: the scope is recreated under the new name, which deletes the secrets stored in the old scope, as a direct deploy of the same rename does. ([#7980](#7980)) * `bundle deploy --plan` now pulls the deployment state, so applying a saved plan from a fresh checkout deletes files removed from the bundle. Because `--plan` skips the build, synced build outputs missing from the apply checkout (for example files a `prebuild` script writes) are deleted from the workspace too. ([#7988](#7988)) * Record deployment history for `bundle deployment bind` when deployment history is enabled. ([#7817](#7817)) * Rename registered models in place; a model in a renamed catalog or schema keeps its versions. ([#7379](#7379)) * `bundle run` and `pipelines run`, `stop`, `dry-run` and `test` on a never-deployed bundle now report a KEY that is not defined in config, instead of suggesting `databricks bundle deploy`. ([#7985](#7985)) * UC secrets follow a renamed catalog or schema. ([#7381](#7381)) * The warning shown when a bundle's root path is under `/Workspace/Shared` now links to the FAQ on moving a deployment off `/Workspace/Shared`. ([#6353](#6353)) * `bundle summary` (text and JSON output) now resolves `${resources.*}` references from the configuration and the deployed resource ids, for example a synced table named after its catalog, and builds resource URLs from them, so `bundle open` and `pipelines open` open the right page. References to values that are not set locally (ids of resources not deployed yet, fields only the workspace has) and to sensitive fields stay as they are. Synced database table URLs now point to the table in Catalog Explorer. ([#8111](#8111)) * Fix `bundle deploy` and `sync` deleting the remote copy of a notebook or file when the local file is an `.ipynb` with invalid JSON or cannot be read. ([#8032](#8032)) * Warn when a bundle's `run_as` identity may lack access to deployed files, with guidance for top-level permissions and source-linked files. ([#7313](#7313)) ### Dependency Updates * Update the Go SDK to [v0.204.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.204.0). ([#7955](#7955)) * Update `go.yaml.in/yaml` from v3 to [v4.0.0](https://github.com/yaml/go-yaml/releases/tag/v4.0.0). ([#7987](#7987))
Changes
(*DeploymentUnit).Deletereturns the delete error again when the backend rejects a delete with an error that is not missing, managed-by-parent or permission-denied, and a re-read does not show the resource gone. Before, without deployment history, it fell through to dropping the resource from state:bundle destroyandbundle deploy(for a resource removed from the config) reported success while the resource stayed in the workspace, untracked.This is a regression from #6094 (7bf1485), which changed the final
into
} else if db.IsDeploymentMetadataService() { ...; return err }(renamed toRecordsHistoryin #7169), so the case without deployment history lost its return.Fix shape: I kept the pre-#6094 behavior. The error is returned for every run, with or without deployment history, and the resource stays in state so the next deploy or destroy retries the delete.
RecordFailureis still called unconditionally in that branch; it is already a no-op when history is not recorded, so nothing extra is written for runs without history.Tests:
bundle/destroy/delete-error(from acc: record that a rejected delete drops the resource from state in bundle/destroy/delete-error #7930): output now shows both commands failing with the delete error and the job kept in state;Badnessremoved and theDMS=truevariant re-enabled (both variants now share one golden).bundle/resources/materialization_sets/settled_failure: its destroy step recorded the old behavior ("forgives a delete error ... drops the state while the set stays in the workspace") and was pinned toDMS=""for that reason. It now asserts the destroy fails (musterr) and runs on both variants.In the fix PR,
bundle/destroy/delete-errorasserts the failures withmusterrand prints the state after the partial destroy:foo(rejected) is kept andbar(deleted) is gone.Scope notes:
IsGone(or the error classification) taught about it; I did not find such a case among the existing tests.destroyCorereturns before printing theDestroy: N deletedsummary. That is existing behavior for every delete error (including runs with history) and is left for a separate change.Overlap: #7496 changes the same lines and keeps the fallthrough (with a warning and a "removed from state" count). This PR removes the fallthrough instead; the two need to be reconciled whichever lands first.
Why
A destroy that reports success while leaving resources in the workspace is worse than a failure: the user has no state and no message pointing at the leftover resource.
This PR was created by analyzing coverage gaps.
Coverage: bundle/direct/apply.go,
(*DeploymentUnit).Delete, the branch for a delete error that is not missing, managed-by-parent or permission-denied.Tests
go test ./acceptance -run 'TestAccept/bundle/destroy/delete-error'andTestAccept/bundle/resources/materialization_sets;go test ./bundle/....AI agent (opus5.5, isaac_claude)
This pull request and its description were written by Isaac.