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

Deleting a single CustomLabel component deletes the whole CustomLabels.labels-meta.xml file #2118

Closed
amtrack opened this issue May 8, 2023 · 4 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue

Comments

@amtrack
Copy link

amtrack commented May 8, 2023

Summary

When deleting a single CustomLabel component (e.g. CustomLabel:DeleteMe)

  • via sfdx force source delete -m CustomLabel:DeleteMe
  • or using the web browser and running sfdx force source pull afterwards
    the whole CustomLabels.labels-meta.xml is being deleted from disk.

Steps To Reproduce:

Repository to reproduce: mdapi-issues/delete-customlabel

See GitHub Action workflow definition and runs, e.g. this one

  1. sfdx force source delete -m CustomLabel:DeleteMe --no-prompt
  2. or delete via destructive changes

Expected result

The CustomLabels.labels-meta.xml should still exist on disk with the component CustomLabel:DeleteMe being removed.

Actual result

The whole CustomLabels.labels-meta.xml file is deleted with all the other CustomLabel components

System Information

  • Which shell/terminal are you using? (e.g. bash, zsh, powershell 5, powershell 7, cmd.exe, etc.)

  • bash and zsh

  • 7.199.7 and 7.198.7

{
  "cliVersion": "sfdx-cli/7.198.7",
  "architecture": "darwin-x64",
  "nodeVersion": "node-v18.16.0",
  "osVersion": "Darwin 22.4.0",
  "shell": "zsh",
  "rootPath": "/Users/me/.config/yarn/global/node_modules/sfdx-cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.1.9 (core)",
    "@oclif/plugin-commands 2.2.14 (core)",
    "@oclif/plugin-help 5.2.9 (core)",
    "@oclif/plugin-not-found 2.3.23 (core)",
    "@oclif/plugin-plugins 2.4.6 (core)",
    "@oclif/plugin-search 0.0.16 (core)",
    "@oclif/plugin-update 3.1.12 (core)",
    "@oclif/plugin-version 1.3.3 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.35 (core)",
    "@oclif/plugin-which 2.2.19 (core)",
    "apex 2.2.13 (core)",
    "auth 2.7.12 (core)",
    "community 2.2.10 (core)",
    "custom-metadata 2.1.15 (core)",
    "data 2.3.10 (core)",
    "deploy-retrieve 1.8.15 (core)",
    "info 2.6.7 (core)",
    "limits 2.3.13 (core)",
    "org 2.7.0 (core)",
    "packaging 1.16.6 (core)",
    "schema 2.3.8 (core)",
    "settings 1.4.4 (core)",
    "signups 1.4.12 (core)",
    "source 2.10.3 (core)",
    "telemetry 2.1.4 (core)",
    "templates 55.4.9 (core)",
    "trust 2.4.9 (core)",
    "user 2.3.8 (core)",
    "sfdx-cli 7.198.7 (core)"
  ]
}

Additional information

As far as I know CustomLabels was not decomposed by choice because of performance issues with lots of files (on Windows?).
Is this still relevant?

I'd personally appreciate having CustomLabels decomposed by default or at least with a flag/setting.

@amtrack amtrack added the investigating We're actively investigating this issue label May 8, 2023
@github-actions
Copy link

github-actions bot commented May 8, 2023

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.

@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label May 8, 2023
@git2gus
Copy link

git2gus bot commented May 8, 2023

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

@Raspikabek
Copy link

Wonder if the root cause of this issue might affect also this other issue: #1977 where something similar happens when using CustomLabels within destructive changes with source deploy commands.

Didn't happen with mdapi commands.

@WillieRuemmele
Copy link
Member

Hey @Raspikabek - thanks for chiming in. I took a look at your issue and repo (thank you for such good steps 🏆 ) and when I changed CustomLabels to CustomLabel in the destructiveChangesPost.xml the deploy command passed and validated the deployment. How did you create that post.xml file? When you're specifying an individual CustomLabel, the type is a CustomLabel, not Labels (plural) this can be incredibly confusing I know 🙁


Hey again @amtrack 👋

thanks for the repro repo, I've got this setup and seeing the same behavior. Looking at how to only delete the custom label from the file locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

4 participants