Open aidan-harding opened 3 years ago
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.
We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.
This issue has been linked to a new work item: W-15160016
Summary
Deleting a local file, then running
force:source:push
is sometimes neither deleting the file in the remote org, nor providing an error.I'm using a CI process where the main branch in git is equal to production. A new feature is written by creating a new source-tracked sandbox with a corresponding branch in git.
When working on a new feature, if I delete an Apex class from the local source and run
sfdx force:source:push
, the CLI responds that it has deleted 0/0 components. Local source tracking gets updated to show that the deleted class is in sync with the sandbox org, but the class is not deleted from that org.Steps To Reproduce:
I tried to reproduce this in a scratch org, but it seems to be specific to sandboxes. So, I don't have a neat repository to provide you with. I work for a consultancy, so I've had the chance to experience the same problem in multiple orgs.
Here is my process (early steps could be done in other ways, but provide context):
sfdx force:source:tracking:reset --noprompt
sfdx force:source:push
Note that this only seems to apply to the original metadata. Classes that I create locally can be deleted afterwards with no issue. It’s only deletions of metadata originating in the sandbox that misbehaves. Which is why I haven't been able to provide a scratch org reproduction
Expected result
The class I deleted locally should be deleted in the sandbox org.
Actual result
The CLI responds like this:
Afterwards, running
force:source:status
would make you think that the remote file is deleted, but it is notSystem Information