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

'project retrieve start' nests duplicate parent folder for custom objects since cli v2.47.6 #2977

Closed
readeral opened this issue Jul 31, 2024 · 4 comments
Labels
bug Issue or pull request that identifies or fixes a bug validated Version information for this issue has been validated

Comments

@readeral
Copy link

Summary

Between CLI versions 2.46.6 and 2.47.6 a change has occurred that causes a retrieved package to nest a duplicate of the parent folder within itself when retrieving custom objects, splitting object-meta.xml away from the rest of the metadata.

Folder structure under 2.46.6:
Screenshot 2024-07-31 at 10 31 34 AM

Folder structure under 2.47.6 and all subsequent versions of the CLI
Screenshot 2024-07-31 at 10 28 28 AM
(generated using cli version 2.47.6, see below reproduction for same result generated with the latest CLI release)

Steps To Reproduce

  • Create a Trailhead Playground (or Sandbox)
  • In Object Manager create a custom object Test with custom fields Completion and Status (or whatever you want)
  • Open Package Manager and create a package named TestPackage with custom object Test included
  • Generate a local project sf project generate
  • Authorise the trailhead playground
  • Retrieve the package with sf project retrieve start --package-name TestPackage

Expected result

Screenshot 2024-07-31 at 11 23 51 AM
(example created by running retrieve with cli v2.46.6 installed)

Actual result

Screenshot 2024-07-31 at 11 25 39 AM
(example created by running retrieve with cli v2.51.6 installed)

CLI output when retrieving the package:

Retrieved Source
=========================================================================================================================
| State   Name                  Type         Path                                                                         
| ─────── ───────────────────── ──────────── ──────────────────────────────────────────────────────────────────────────── 
| Created Test__c.Completion__c CustomField  TestPackage/main/default/objects/Test__c/fields/Completion__c.field-meta.xml 
| Created Test__c.Status__c     CustomField  TestPackage/main/default/objects/Test__c/fields/Status__c.field-meta.xml     
| Created Test__c               CustomObject TestPackage/TestPackage/main/default/objects/Test__c/Test__c.object-meta.xml 
| Created Test__c-Test Layout   Layout       TestPackage/main/default/layouts/Test__c-Test Layout.layout-meta.xml   

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.51.6",
  "nodeVersion": "node-v18.16.0",
  "osVersion": "Darwin 23.5.0",
  "rootPath": "/Users/alan/.nvm/versions/node/v18.16.0/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.1.7 (core)",
    "@oclif/plugin-commands 4.0.7 (core)",
    "@oclif/plugin-help 6.2.6 (core)",
    "@oclif/plugin-not-found 3.2.11 (core)",
    "@oclif/plugin-plugins 5.3.7 (core)",
    "@oclif/plugin-search 1.2.3 (core)",
    "@oclif/plugin-update 4.4.9 (core)",
    "@oclif/plugin-version 2.2.8 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.9 (core)",
    "@oclif/plugin-which 3.2.8 (core)",
    "@salesforce/cli 2.51.6 (core)",
    "apex 3.2.5 (core)",
    "auth 3.6.36 (core)",
    "data 3.5.5 (core)",
    "deploy-retrieve 3.9.17 (core)",
    "info 3.3.18 (core)",
    "limits 3.3.18 (core)",
    "marketplace 1.2.18 (core)",
    "org 4.3.5 (core)",
    "packaging 2.7.1 (core)",
    "schema 3.3.19 (core)",
    "settings 2.3.8 (core)",
    "signups 2.3.10 (user) published 51 days ago (Sun Jun 09 2024) (latest is 2.5.5)",
    "sobject 1.4.19 (core)",
    "source 3.5.5 (core)",
    "telemetry 3.6.2 (core)",
    "templates 56.3.3 (core)",
    "trust 3.7.13 (core)",
    "user 3.5.18 (core)"
  ]
}
@readeral readeral added the investigating We're actively investigating this issue label Jul 31, 2024
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 Jul 31, 2024
@mdonnalley
Copy link
Contributor

mdonnalley commented Jul 31, 2024

@readeral Thanks for the detailed writeup! I've replicated the issue, so I'll mark this as a bug and get it on our board. Looks like it might have been caused by this PR

@mdonnalley mdonnalley added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Jul 31, 2024
Copy link

git2gus bot commented Jul 31, 2024

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

@jshackell-sfdc
Copy link
Collaborator

This issue has been fixed in CLI version 2.62.6 (October 16, 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 validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants