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

sf project deploy report missing deleted files #2602

Closed
quinnpatrick opened this issue Dec 12, 2023 · 4 comments
Closed

sf project deploy report missing deleted files #2602

quinnpatrick opened this issue Dec 12, 2023 · 4 comments
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@quinnpatrick
Copy link

Summary

The "sf project deploy report" does not list deleted files. When using the default format they are not listed. If I use the --json option they are listed.

Steps To Reproduce

Create a "dry-run" deployment with a post-destructive-changes file.

  • sf project deploy validate -o ORG -x pkgfile -l RunLocalTests --post-destructive-changes deletefile

After completion run the deployment reports.

  • sf project deploy report -i deploymentid -o ORG > deploymentid.txt
  • sf project deploy report -i deploymentid-o ORG--json > deploymentid.json

Expected result

Objects that were in the post-destructive-changes to be included in the Validated Source section of the default format (text).

Actual result

Example:
Text result: (War...ImportEXC.cls was deleted but missing from the report)
image

Json result:(War...ImportEXC.cls was deleted and included on the report)
image

System Information

Which shell or terminal are you using? bash - via Code Builder

{
  "architecture": "linux-x64",
  "cliVersion": "@salesforce/cli/2.20.6",
  "nodeVersion": "node-v20.9.0",
  "osVersion": "Linux 4.14.255-322-265.538.amzn2.x86_64",
  "rootPath": "/home/codebuilder/.local/share/sf/client/2.20.6-336b6b0",
  "shell": "bash",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.2 (core)",
    "@oclif/plugin-commands 3.0.7 (core)",
    "@oclif/plugin-help 6.0.7 (core)",
    "@oclif/plugin-not-found 3.0.4 (core)",
    "@oclif/plugin-plugins 4.1.8 (core)",
    "@oclif/plugin-search 1.0.8 (core)",
    "@oclif/plugin-update 4.1.4 (core)",
    "@oclif/plugin-version 2.0.8 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.4 (core)",
    "@oclif/plugin-which 3.0.11 (core)",
    "@salesforce/cli 2.20.6 (core)",
    "apex 3.0.8 (core)",
    "auth 3.0.8 (core)",
    "data 3.0.2 (core)",
    "deploy-retrieve 2.2.0 (core)",
    "info 3.0.5 (core)",
    "limits 3.0.4 (core)",
    "marketplace 1.0.7 (core)",
    "org 3.0.9 (core)",
    "packaging 1.27.3 (core)",
    "schema 3.0.6 (core)",
    "settings 2.0.9 (core)",
    "sobject 1.0.2 (core)",
    "source 3.0.1 (core)",
    "telemetry 3.1.3 (core)",
    "templates 56.0.3 (core)",
    "trust 3.0.6 (core)",
    "user 3.0.6 (core)",
    "sfdx-plugin-prettier 1.0.5 (user)",
    "sfdx-plugin-source-read 1.2.0 (user)"
  ]
}
@quinnpatrick quinnpatrick added the investigating We're actively investigating this issue label Dec 12, 2023
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Dec 12, 2023
@mdonnalley
Copy link
Contributor

@quinnpatrick Thanks for posting your issue.

I tried replicating it with the following steps and sf v2.20.6:

  • Create scratch org using dreamhouse-lwc - sf org create scratch --edition developer --alias gh2602 --set-default
  • sf project deploy start -d force-app
  • Open org and create new custom object called MyCustomObject
  • sf project retrieve start
  • Created destructiveChanges.xml with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <types>
    <members>MyCustomObject__c</members>
    <name>CustomObject</name>
  </types>
</Package>
  • Create package.xml: sf project convert source -p force-app
  • sf project deploy validate -x metadataPackage_1702482513332/package.xml -l RunLocalTests --post-destructive-changes destructiveChanges.xml

The output for sf project deploy validate contained the deleted source:

Deleted Source
===================================================================================================================
| Name              Type         Path
| ───────────────── ──────────── ──────────────────────────────────────────────────────────────────────────────────
| MyCustomObject__c CustomObject force-app/main/default/objects/MyCustomObject__c/MyCustomObject__c.object-meta.xml

And then the output for sf project deploy report -i 0Af0500001JRlzMCAT also contained the deleted source:

Deleted Source
===================================================================================================================
| Name              Type         Path
| ───────────────── ──────────── ──────────────────────────────────────────────────────────────────────────────────
| MyCustomObject__c CustomObject force-app/main/default/objects/MyCustomObject__c/MyCustomObject__c.object-meta.xml

Are you able to provide more specific reproduction steps for us? If possible, it would be most helpful if you can also create a github repo that contains a bare minimum salesforce project that replicates the issue. Thanks!

@quinnpatrick
Copy link
Author

quinnpatrick commented Dec 13, 2023

I followed your directions, and got the same result as you (deleted source included).
Then I had a second user (on her code builder instance, with the -i and -o options) attempt to run the report. She did not get the "Deleted Source" section in her report. I also tried on a second laptop and did not get the "Deleted Source" section. I'm suspecting the machine of the original deploy can see the information, but not a user on a different machine.

@iowillhoit
Copy link
Contributor

This will be the same issue as #2603
I am going to close this issue and make a note on the internal ticket to ensure deletes work as well.

Thanks @quinnpatrick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants