Skip to content

fix: draw the delete progress only once the deploy is sent - #1713

Open
aparnagoy wants to merge 1 commit into
salesforcecli:mainfrom
aparnagoy:t/aparnagoy/delete-progress-after-deploy
Open

aparnagoy wants to merge 1 commit into
salesforcecli:mainfrom
aparnagoy:t/aparnagoy/delete-progress-after-deploy

Conversation

@aparnagoy

Copy link
Copy Markdown

What does this PR do?

project delete source drew the "Deleting Metadata" progress box before ComponentSet.deploy ran. If the deploy was refused before it was sent, for example by a check in source-deploy-retrieve, the error printed but the empty box stayed on screen:

Error (D360DeleteError): D360 components can't be deleted: DataLakeObject:default.myDlo__dll. Leave them out of the delete and try again.

 ─────────────── Deleting Metadata ───────────────
 Status: ⠁
 Elapsed Time: 0ms

The box is now created and started only after ComponentSet.deploy returns, so a refused delete shows just its error.

Before After
Deploy is sent Box drawn, then filled in as the deploy runs Same
Deploy refused before it is sent Error, plus an empty box with Elapsed Time: 0ms Error only
Local files Removed only after the org reports success Unchanged

How it works

Step Code
1 Work out the API (REST or SOAP) as before
2 Call componentSet.deploy(...) with the same options as before
3 Only then create DeployStages, set the "Deleting with REST/SOAP API" message and start it with the returned deploy

The deploy options, the API choice and the stage messages are the same as before. Only the order changed, so every delete that reaches the org looks the same as it did.

Testing

  • The pre-push checks (build, lint and the existing unit tests) pass.
  • By hand: a delete refused before it is sent shows only the error.

What issues does this PR fix or reference?

Found while testing the D360 delete check added in forcedotcom/source-deploy-retrieve#1839. The change itself is independent of D360 and applies to every delete.

project delete source drew the Deleting Metadata box before ComponentSet.deploy ran. When the
deploy was refused before it was sent, the empty box stayed on screen after the error. The box
is now drawn once the deploy has started, so a refused delete shows only its error.
@aparnagoy
aparnagoy requested a review from a team as a code owner December 1, 2026 22:57
@salesforce-cla

salesforce-cla Bot commented Dec 1, 2026

Copy link
Copy Markdown

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Aparna Goyal <r***@A***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce Inc. Contributor License Agreement and this Pull Request will be revalidated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant