Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add purgeondelete flag to deploy #394

Merged
merged 4 commits into from
Jan 27, 2022
Merged

fix: add purgeondelete flag to deploy #394

merged 4 commits into from
Jan 27, 2022

Conversation

WillieRuemmele
Copy link
Contributor

@WillieRuemmele WillieRuemmele commented Jan 19, 2022

What does this PR do?

adds purgeondelete to *:deploy which will empty the recycle bin when an object is deleted

I'm not sure how to verify this in Lightning

  1. create custom object
  2. retrieve into local project
  3. generate destructive manifest for the custom object (destructiveChangesPost.xml)
  4. generate a manifest to be deployed alongside the destructive changes, can be empty, or populated (package.xml)
  5. in the UI, click the astro icon in the top right, and switch to salesforce classic
  6. navigate back to setup -> create -> objects
  7. run sfdx force:source:deploy -x package.xml --postdestructivechanges destructiveChangesPost.xml
  8. refresh the page and notice Deleted Objects(1) at the bottom of the list
  9. click that, and undelete your custom object
  10. notice your custom object is back in the list
  11. run sfdx force:source:deploy -x package.xml --postdestructivechanges destructiveChangesPost.xml --purgeondelete
  12. refresh the page and notice the object is deleted, and not available in Deleted Objects

What issues does this PR fix or reference?

@W-4649658@

@@ -29,7 +29,8 @@
"validateDeployRequestId": "deploy request ID of the validated deployment to run a Quick Deploy",
"soapDeploy": "deploy metadata with SOAP API instead of REST API",
"predestructivechanges": "file path for a manifest (destructiveChangesPre.xml) of components to delete before the deploy",
"postdestructivechanges": "file path for a manifest (destructiveChangesPost.xml) of components to delete after the deploy"
"postdestructivechanges": "file path for a manifest (destructiveChangesPost.xml) of components to delete after the deploy",
"purgeOnDelete": "the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. Instead, they become immediately eligible for deletion."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jshackell-sfdc I took this description right from here but let me know if it should be different

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworked it a bit, see below.

@@ -29,7 +29,8 @@
"validateDeployRequestId": "deploy request ID of the validated deployment to run a Quick Deploy",
"soapDeploy": "deploy metadata with SOAP API instead of REST API",
"predestructivechanges": "file path for a manifest (destructiveChangesPre.xml) of components to delete before the deploy",
"postdestructivechanges": "file path for a manifest (destructiveChangesPost.xml) of components to delete after the deploy"
"postdestructivechanges": "file path for a manifest (destructiveChangesPost.xml) of components to delete after the deploy",
"purgeOnDelete": "the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. Instead, they become immediately eligible for deletion."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"purgeOnDelete": "the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. Instead, they become immediately eligible for deletion."
"purgeOnDelete": "specify that deleted components in the destructive changes manifest file are immediately eligible for deletion rather than being stored in the Recycle Bin"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

committed 👍

Copy link
Contributor

@jshackell-sfdc jshackell-sfdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edited the flag description, let me know if i mistakenly changed the meaning!

@shetzel shetzel merged commit 6b99f44 into main Jan 27, 2022
@shetzel shetzel deleted the wr/purgeOnDelete branch January 27, 2022 16:00
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.

5 participants