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

Labels are out of the default folder #1845

Closed
antonsatskyi opened this issue Dec 14, 2022 · 12 comments
Closed

Labels are out of the default folder #1845

antonsatskyi opened this issue Dec 14, 2022 · 12 comments
Labels
bug Issue or pull request that identifies or fixes a bug custom-registry fixed-with-presets fixed using the new registryPresets feature in sfdx-project.json

Comments

@antonsatskyi
Copy link

Summary

for some reason, labels are out of the default folder

on a simple retrieve
sfdx force:source:retrieve -n W-001022 -u DEV

sfdx-cli/7.180.0 darwin-x64 node-v18.12.1

Steps To Reproduce:

  1. This is step 1.
    sfdx force:source:retrieve -n W-001022 -u DEV

Expected result

all items are in project folder

Actual result

labels folder is outside of main project folder

System Information

MACOS

  • Which shell/terminal are you using? (e.g. bash, zsh, powershell 5, powershell 7, cmd.exe, etc.)
    SHELL=/bin/zsh
  • If you are using sfdx
    • Run sfdx version --verbose --json
      {
      "cliVersion": "sfdx-cli/7.180.0",
      "architecture": "darwin-x64",
      "nodeVersion": "node-v18.12.1",
      "pluginVersions": [
      "@oclif/plugin-autocomplete 1.3.7 (user)",
      "@oclif/plugin-commands 2.2.1 (user)",
      "@oclif/plugin-help 5.1.20 (user)",
      "@oclif/plugin-not-found 2.3.9 (user)",
      "@oclif/plugin-plugins 2.1.8 (user)",
      "@oclif/plugin-search 0.0.4 (user)",
      "@oclif/plugin-update 3.0.8 (user)",
      "@oclif/plugin-version 1.1.3 (user)",
      "@oclif/plugin-warn-if-update-available 2.0.16 (user)",
      "@oclif/plugin-which 2.2.3 (user)",
      "@salesforce/cli 1.58.1 (user)",
      "alias 2.1.10 (core)",
      "apex 1.3.0 (core)",
      "auth 2.3.0 (core)",
      "community 2.0.18 (core)",
      "config 1.4.22 (core)",
      "custom-metadata 2.0.5 (core)",
      "data 2.1.13 (core)",
      "deploy-retrieve 1.6.16 (user)",
      "env 1.5.14 (user)",
      "functions 1.16.1 (user)",
      "generate 1.0.33 (user)",
      "generator 2.0.12 (core)",
      "info 2.2.11 (user)",
      "limits 2.1.2 (core)",
      "login 1.1.12 (user)",
      "org 2.2.15 (core)",
      "packaging 1.10.9 (core)",
      "schema 2.1.17 (core)",
      "settings 1.1.10 (user)",
      "signups 1.2.12 (core)",
      "sobject 0.0.33 (user)",
      "source 2.3.7 (core)",
      "telemetry 2.0.5 (user)",
      "templates 55.1.0 (core)",
      "trust 2.1.0 (user)",
      "user 2.1.21 (core)",
      "@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
      "@salesforce/sfdx-scanner 3.7.1 (user)",
      "salesforce-alm 54.8.4 (core)",
      "sfdx-git-delta 5.8.0 (user)"
      ],
      "osVersion": "Darwin 22.1.0",
      "shell": "zsh",
      "rootPath": "/Users/Anton_Satskyi/.local/share/sfdx/client/7.180.0-d902059"
      }
  • If you are using sf
    • Run sf version --verbose --json
  • Paste the output here

Additional information

Feel free to attach a screenshot.
image

@antonsatskyi antonsatskyi added the investigating We're actively investigating this issue label Dec 14, 2022
@github-actions
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.

@Enszula
Copy link

Enszula commented Dec 14, 2022

Hello,
Same issue in different project/company/SF instance.

for some reason command(retrieve permissionSet with sfdx)
sfdx force:source:retrieve -n testchangesetvs -u company--dev
is creating additional/reduntant testchangesetvs/testchangesetvs/ directory for CustomLabels metadata type.

user@COMPUTER company % sfdx force:source:retrieve -n testchangesetvs -u company--dev
Preparing retrieve request... done
=== Retrieved Source

 FULL NAME                              TYPE          PROJECT PATH                                                                                      
 ────────────────────────────────────── ───────────── ───────────────────────────────────────────────────────────────────────────────────────────────── 
 Account.Broadband_Contract_End_Date__c CustomField   testchangesetvs/main/default/objects/Account/fields/Broadband_Contract_End_Date__c.field-meta.xml 
 Account.Broadband_Current_Supplier__c  CustomField   testchangesetvs/main/default/objects/Account/fields/Broadband_Current_Supplier__c.field-meta.xml  
 Account.Fibre_Current_Supplier__c      CustomField   testchangesetvs/main/default/objects/Account/fields/Fibre_Current_Supplier__c.field-meta.xml      
 Account.Fibre_Interest__c              CustomField   testchangesetvs/main/default/objects/Account/fields/Fibre_Interest__c.field-meta.xml              
 CustomLabels                           CustomLabels  testchangesetvs/testchangesetvs/main/default/labels/CustomLabels.labels-meta.xml                  
 VS_Admin                               PermissionSet testchangesetvs/main/default/permissionsets/Admin.permissionset-meta.xml                       

=== Retrieved Packages

testchangesetvs package converted and retrieved to: /Users/kamilentsua-mensah/Desktop/Repo/company/companyr--sfdx/companyr/testchangesetvs

user@COMPUTER company % tree testchangesetvs                                                 
testchangesetvs
├── main
│   └── default
│       ├── objects
│       │   └── Account
│       │       └── fields
│       │           ├── Broadband_Contract_End_Date__c.field-meta.xml
│       │           ├── Broadband_Current_Supplier__c.field-meta.xml
│       │           ├── Fibre_Current_Supplier__c.field-meta.xml
│       │           └── Fibre_Interest__c.field-meta.xml
│       └── permissionsets
│           └── Admin.permissionset-meta.xml
└── testchangesetvs
    └── main
        └── default
            └── labels
                └── CustomLabels.labels-meta.xml

10 directories, 6 files

@iowillhoit
Copy link
Contributor

Hey all, thanks for reporting the issue! Did this just start happening on a recent version of the CLI?

@Enszula
Copy link

Enszula commented Dec 14, 2022 via email

@iowillhoit
Copy link
Contributor

Thanks for that info, I will try to replicate it and get back to you.

@Enszula
Copy link

Enszula commented Dec 14, 2022 via email

@iowillhoit
Copy link
Contributor

I am not seeing this locally with 7.180.0. I notice that you are both retrieving with -n (--packagenames). I can do some testing with packages in the morning, but I am curious if either of you able to reproduce this using --sourcepath, --manifest, or --metadata? Thanks!

@Enszula
Copy link

Enszula commented Dec 14, 2022 via email

@antonsatskyi
Copy link
Author

Thanks for that info, I will try to replicate it and get back to you.

no, it was on 7.17X ver also

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

git2gus bot commented Jan 1, 2023

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

@mshanemc
Copy link
Contributor

Followup: have been working a lot on SDR and how decomposition/recomposition happens.

I'm not confident that we can fix this bug without causing some other problems. I'm going to use this as a test case for the custom-registry work--and you'd end up having each label in its own file like #2635

@WillieRuemmele
Copy link
Member

Hi @antonsatskyi @Enszula -

I've just confirmed that this is fixed by adding "registryPresets": ["decomposeCustomLabelsBeta"] to your sfdx-project.json. This is using the custom registry presets we just released today. There is a bit of a transition to use them (delete your files locally, re-retrieve them) - but I hope you will do that 😄.

Proof:

using

@salesforce/cli/2.36.7 darwin-arm64 node-v18.18.2

without registry change

  ➜  sf project retrieve start --package-name CL                  
Retrieving v60.0 metadata from [email protected] using the v60.0 SOAP API
Preparing retrieve request... Succeeded

Retrieved Source
========================================================================================================================================================================
| State   Name                                Type                     Path                                                                                              
| ─────── ─────────────────────────────────── ──────────────────────── ─────────────────────────────────────────────────────────────────────────────────────────────────                         
| Created CustomLabels                        CustomLabels             CL/CL/main/default/labels/CustomLabels.labels-meta.xml 

Notice the CL/CL/main

and now

 ➜  sf project retrieve start --package-name CL
Retrieving v60.0 metadata from [email protected] using the v60.0 SOAP API
Preparing retrieve request... Succeeded

Retrieved Source
========================================================================================================================================================================
| State   Name                                Type                     Path                                                                                              
| ─────── ─────────────────────────────────── ──────────────────────── ───────────────────────────────────────────────────────────────────────────────────────────────── 
                    
| Created CustomLabels                        CustomLabels             CL/main/default/labels/CustomLabels/CustomLabels.labels-meta.xml   

it's placed in the correct package path

@mshanemc mshanemc added fixed-with-presets fixed using the new registryPresets feature in sfdx-project.json and removed investigating We're actively investigating this issue labels Apr 5, 2024
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 custom-registry fixed-with-presets fixed using the new registryPresets feature in sfdx-project.json
Projects
None yet
Development

No branches or pull requests

5 participants