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

No arguments for destructive changes in sf project deploy validate command #2246

Closed
shabu74 opened this issue Jun 21, 2023 · 11 comments
Closed
Labels
validated Version information for this issue has been validated

Comments

@shabu74
Copy link

shabu74 commented Jun 21, 2023

Is your feature request related to a problem? Please describe.
sf project deploy validate command has argument to specify manifest for constructive deployment only

What are you trying to do
I need to validate destructive deployment also like sf deploy start command

Describe the solution you'd like
manifest arguments for destructive deployment also need to be included in the command eg: ---pre-destructive-changes and --post-destructive-changes

Describe alternatives you've considered
sf deploy start command

@shabu74 shabu74 added the feature Issue or pull request for a new feature label Jun 21, 2023
@github-actions
Copy link

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

@git2gus
Copy link

git2gus bot commented Jun 21, 2023

This issue has been linked to a new work item: W-13640624

@WillieRuemmele
Copy link
Member

Hi @shabu74 - these new flags have been released in @salesforce/cli 2.0.2

@shabu74
Copy link
Author

shabu74 commented Jul 18, 2023

Thanks. But I think documentation has not been updated, Would you please specify the argument name

@shabu74
Copy link
Author

shabu74 commented Jul 18, 2023

Hi @WillieRuemmele,

No, I have installed latest SF CLI. But still getting error:

{
"code": 1,
"context": "DeployMetadataValidate",
"commandName": "DeployMetadataValidate",
"message": "Nonexistent flag: --post-destructive-changes
See more help with --help",
"name": "Error",
"status": 1,
"stack": "Error: Nonexistent flag: --post-destructive-changes
See more help with --help
at validateArgs (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/parser/validate.js:9:19)
at validate (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/parser/validate.js:157:5)
at Object.parse (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/parser/index.js:19:35)
at async DeployMetadataValidate.parse (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:221:25)
at async Promise.all (index 0)
at async DeployMetadataValidate.run (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-deploy-retrieve/lib/commands/project/deploy/validate.js:29:34)
at async DeployMetadataValidate._run (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:117:22)
at async Config.runCommand (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:329:25)
at async run (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:89:16)",
"exitCode": 1,
"warnings": []
}

@shabu74
Copy link
Author

shabu74 commented Jul 18, 2023

More over, test level can not be specified with No test Run. Then How can we validate non-apex components? @WillieRuemmele

@dudunato
Copy link

@shabu74 were you able to get this working? The flag is in the docs but it gives Nonexistent flag. Quite annoying...

@dudunato
Copy link

Any insight, @WillieRuemmele?

@WillieRuemmele WillieRuemmele added feature Issue or pull request for a new feature sf validated Version information for this issue has been validated and removed feature Issue or pull request for a new feature labels Oct 12, 2023
@dudunato
Copy link

@WillieRuemmele would you know any workaround. I need to validate and grab the jobId. So we can run quick deploy afterwards. So --dry-run on deploy start doesn't really work for me here. :/

@WillieRuemmele
Copy link
Member

Hi @dudunato - are you still seeing this on the latest version of the CLI?

I'm using @salesforce/cli/2.17.6 darwin-arm64 node-v18.15.0
and see the flags and confirmed they're working

sf project deploy validate --help                   
Validate a metadata deployment without actually executing it.
...

DELETE FLAGS
  --post-destructive-changes=<value>  File path for a manifest (destructiveChangesPost.xml) of components to delete after the deploy.
  --pre-destructive-changes=<value>   File path for a manifest (destructiveChangesPre.xml) of components to delete before the deploy
  --purge-on-delete                   Specify that deleted components in the destructive changes manifest file are immediately eligible for deletion
                                      rather than being stored in the Recycle Bin.
 ➜  sf project deploy validate --pre-destructive-changes destructiveChangesPre.xml --manifest package.xml 
Validating Deployment of v59.0 metadata to [email protected] using the v59.0 REST API.

@shetzel shetzel added more information required Issue requires more information or a response from the customer and removed feature Issue or pull request for a new feature sf labels Nov 7, 2023
Copy link

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

@github-actions github-actions bot added the stale label Nov 15, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2023
@mshanemc mshanemc removed more information required Issue requires more information or a response from the customer stale labels Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

5 participants