-
Notifications
You must be signed in to change notification settings - Fork 78
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
Can't push when labels file is removed #3070
Comments
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. |
Hello @geoffswift 👋 None of the versions of Shared: Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue. After updating, share the full output of |
Issue is still reproducible with 2.62.6 System Information{
"architecture": "darwin-arm64",
"cliVersion": "@salesforce/cli/2.62.6",
"nodeVersion": "node-v20.12.0",
"osVersion": "Darwin 24.0.0",
"rootPath": "/Users/[email protected]/src/cpm/node_modules/@salesforce/cli",
"shell": "bash",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.5 (core)",
"@oclif/plugin-commands 4.1.3 (core)",
"@oclif/plugin-help 6.2.14 (core)",
"@oclif/plugin-not-found 3.2.22 (core)",
"@oclif/plugin-plugins 5.4.14 (core)",
"@oclif/plugin-search 1.2.11 (core)",
"@oclif/plugin-update 4.6.3 (core)",
"@oclif/plugin-version 2.2.14 (core)",
"@oclif/plugin-warn-if-update-available 3.1.18 (core)",
"@oclif/plugin-which 3.2.15 (core)",
"@salesforce/analytics 1.4.26 (link) /Users/[email protected]/src/cpm/node_modules/@salesforce/analytics",
"@salesforce/cli 2.62.6 (core)",
"apex 3.5.1 (core)",
"api 1.3.1 (core)",
"auth 3.6.65 (core)",
"community 3.2.35 (link) /Users/[email protected]/src/cpm/node_modules/@salesforce/plugin-community",
"data 3.7.0 (core)",
"deploy-retrieve 3.12.17 (core)",
"info 3.4.9 (core)",
"limits 3.3.32 (core)",
"marketplace 1.2.26 (core)",
"org 4.6.0 (core)",
"packaging 2.8.11 (core)",
"schema 3.3.34 (core)",
"settings 2.3.23 (core)",
"sobject 1.4.41 (core)",
"source 3.5.21 (core)",
"telemetry 3.6.15 (core)",
"templates 56.3.22 (core)",
"trust 3.7.33 (core)",
"user 3.5.32 (core)"
]
}
|
Hey @geoffswift, thanks for the issue. I discussed this with another engineer on our team and we don't know if there is much that we can do to solve this exact use case. When you create a few Custom Labels in the org and retrieve them, it will create a single We cannot use There are two work arounds that I can think of.
|
Using
|
We might typically have two branches, one includes a new labels file, and the other does not.
How are we supposed to get out of this situation? Some people would use a separate scratch org for each branch because of this... I think the ideal here is to remove the error, so it's still possible to push. Can I maybe have it work that way with |
Hm, I am seeing this also. I think part of the problem is that Were you able to try the custom source decomposition for Custom Labels? That seems to work as you would expect. I was able to find another work around for deleting the custom labels in a project.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<version>61.0</version>
</Package>
|
Thanks for the workaround recommendation. We are planning to migrate to the decomposed labels, so hopefully this will become a thing of the past. |
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted. |
Summary
If I decide I don't want the labels in
example.labels-meta.xml
any longer, I would expect to be able to simply delete the file.When I try to push this change with
sf project deploy start
the cli fails:Steps To Reproduce
Expected result
The deploy succeeds with the labels which were in the labels file are removed from the org.
Actual result
The push fails with:
Additional information
The problem is actually worse than described. I might have a git branch where a new labels file is added. If I deploy that branch but then switch back to trying to deploy main, then I can't because the file is similarly deleted by git.
Issue may not be limited to labels metadata.
System Information
The text was updated successfully, but these errors were encountered: