forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
494 stars 78 forks source link

Issue with WaveAnalyticAssetCollection retrieval causing ENOENT error and missing folders #3095

Open Alfystar opened 1 week ago

Alfystar commented 1 week ago

Description: I encountered an issue when trying to retrieve WaveAnalyticAssetCollection metadata using the Salesforce CLI (sf-cli). The command used was:

sf project retrieve start --target-org PROD_RM --ignore-conflicts --manifest fullRetrieveArtifact/package_WaveAnalyticAssetCollection_0.xml --output-dir fullRetrieve_Artifact/retrievePack/dir_630 --wait 240

The package.xml used was:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>EstrazioneAdoptionRolling</members>
        <members>EstrazioneAdoptionRolling_ogni_luned</members>
        <members>Estrazione_primo_del_mese</members>
        <members>EstrazioniOneShot</members>
        <members>Ogni_6_Mesi</members>
        <members>Scarti_SDD</members>
        <members>Signature_Pad</members>
        <members>TP_di_QCD_non_creati</members>
        <members>subentri</members>
        <name>WaveAnalyticAssetCollection</name>
    </types>
</Package>

The command failed with the following error:

Error (ENOENT): ENOENT: no such file or directory, stat '/Users/ea_enel/Documents/01_repo/sfdc-ci-enel-mercato/fullRetrieve_Artifact/retrievePack/dir_630/main/default'

I created the missing directory manually:

mkdir -p /Users/ea_enel/Documents/01_repo/sfdc-ci-enel-mercato/fullRetrieve_Artifact/retrievePack/dir_630/main/default

However, the result was:

 ›   Warning: Nothing retrieved

Warnings
==========================================================================================================================================================================================
| File                   Problem                                                                                                                                                           
| ────────────────────── ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
| unpackaged/package.xml Unable to retrieve file for id 0lk1n000000PAsD of type WaveAnalyticAssetCollection. The Collection Signature_Pad has no associated Folder.                        
| unpackaged/package.xml Unable to retrieve file for id 0lk1n000000TN1K of type WaveAnalyticAssetCollection. The Collection EstrazioneAdoptionRolling has no associated Folder.            
| unpackaged/package.xml Unable to retrieve file for id 0lk1n000000TN1P of type WaveAnalyticAssetCollection. The Collection EstrazioneAdoptionRolling_ogni_luned has no associated Folder. 
| unpackaged/package.xml Unable to retrieve file for id 0lk1n000000TN1U of type WaveAnalyticAssetCollection. The Collection EstrazioniOneShot has no associated Folder.                    
| unpackaged/package.xml Unable to retrieve file for id 0lk1n0000000019 of type WaveAnalyticAssetCollection. The Collection subentri has no associated Folder.                             
| unpackaged/package.xml Unable to retrieve file for id 0lk1n000000TN1F of type WaveAnalyticAssetCollection. The Collection Scarti_SDD has no associated Folder.                           
| unpackaged/package.xml Unable to retrieve file for id 0lk1n000000Kyjp of type WaveAnalyticAssetCollection. The Collection TP_di_QCD_non_creati has no associated Folder.                 
| unpackaged/package.xml Unable to retrieve file for id 0lk1n000000blJO of type WaveAnalyticAssetCollection. The Collection Ogni_6_Mesi has no associated Folder.                          
| unpackaged/package.xml Unable to retrieve file for id 0lk1n000000TN1Z of type WaveAnalyticAssetCollection. The Collection Estrazione_primo_del_mese has no associated Folder.          

The directories I created were deleted during the process.

I obtained the list of WaveAnalyticAssetCollection using the command:

sf org list metadata --metadata-type WaveAnalyticAssetCollection --target-org 'PROD_RM' --json

Here is a snippet of the result:

{
  "status": 0,
  "result": [
    {
      "createdById": "00524000003qiItAAI",
      "createdByName": "AE66628",
      "createdDate": "2023-06-26T15:11:48.000Z",
      "fileName": "wave/EstrazioneAdoptionRolling.collection",
      "fullName": "EstrazioneAdoptionRolling",
      "id": "0lk1n000000TN1KAAW",
      "lastModifiedById": "00524000003qiItAAI",
      "lastModifiedByName": "AE66628",
      "lastModifiedDate": "2023-10-17T07:56:32.000Z",
      "manageableState": "unmanaged",
      "type": "WaveAnalyticAssetCollection"
    },
    {
      "createdById": "00524000003qiItAAI",
      "createdByName": "AE66628",
      "createdDate": "2023-07-31T08:02:13.000Z",
      "fileName": "wave/Ogni_6_Mesi.collection",
      "fullName": "Ogni_6_Mesi",
      "id": "0lk1n000000blJOAAY",
      "lastModifiedById": "00524000003qiItAAI",
      "lastModifiedByName": "AE66628",
      "lastModifiedDate": "2023-07-31T08:05:07.000Z",
      "manageableState": "unmanaged",
      "type": "WaveAnalyticAssetCollection"
    },
    {
      "createdById": "0051n000006NJ2MAAW",
      "createdByName": "AF09898",
      "createdDate": "2022-03-28T07:35:56.000Z",
      "fileName": "wave/Signature_Pad.collection",
      "fullName": "Signature_Pad",
      "id": "0lk1n000000PAsDAAW",
      "lastModifiedById": "0051n000006NJ2MAAW",
      "lastModifiedByName": "AF09898",
      "lastModifiedDate": "2022-07-01T15:59:30.000Z",
      "manageableState": "unmanaged",
      "type": "WaveAnalyticAssetCollection"
    },
    {
      "createdById": "00524000003qiItAAI",
      "createdByName": "AE66628",
      "createdDate": "2023-07-10T07:44:49.000Z",
      "fileName": "wave/Estrazione_primo_del_mese.collection",
      "fullName": "Estrazione_primo_del_mese",
      "id": "0lk1n000000TN1ZAAW",
      "lastModifiedById": "00524000003qiItAAI",
      "lastModifiedByName": "AE66628",
      "lastModifiedDate": "2023-07-31T08:42:10.000Z",
      "manageableState": "unmanaged",
      "type": "WaveAnalyticAssetCollection"
    },
    {
      "createdById": "00524000003qiItAAI",
      "createdByName": "AE66628",
      "createdDate": "2023-06-26T15:15:06.000Z",
      "fileName": "wave/EstrazioneAdoptionRolling_ogni_luned.collection",
      "fullName": "EstrazioneAdoptionRolling_ogni_luned",
      "id": "0lk1n000000TN1PAAW",
      "lastModifiedById": "00524000003qiItAAI",
      "lastModifiedByName": "AE66628",
      "lastModifiedDate": "2023-07-31T08:42:11.000Z",
      "manageableState": "unmanaged",
      "type": "WaveAnalyticAssetCollection"
    },
    {
      "createdById": "0051n000009O1LFAA0",
      "createdByName": "A436721",
      "createdDate": "2024-01-04T09:20:32.000Z",
      "fileName": "wave/subentri.collection",
      "fullName": "subentri",
      "id": "0lk1n0000000019AAA",
      "lastModifiedById": "0051n000009O1LFAA0",
      "lastModifiedByName": "A436721",
      "lastModifiedDate": "2024-01-04T09:20:33.000Z",
      "manageableState": "unmanaged",
      "type": "WaveAnalyticAssetCollection"
    },
    {
      "createdById": "0050Y000000ehYYQAY",
      "createdByName": "A230940",
      "createdDate": "2023-11-06T16:02:30.000Z",
      "fileName": "wave/TP_di_QCD_non_creati.collection",
      "fullName": "TP_di_QCD_non_creati",
      "id": "0lk1n000000KyjpAAC",
      "lastModifiedById": "0050Y000000ehYYQAY",
      "lastModifiedByName": "A230940",
      "lastModifiedDate": "2023-11-06T16:02:30.000Z",
      "manageableState": "unmanaged",
      "type": "WaveAnalyticAssetCollection"
    },
    {
      "createdById": "0051n000006NJ2MAAW",
      "createdByName": "AF09898",
      "createdDate": "2022-06-21T11:06:26.000Z",
      "fileName": "wave/Scarti_SDD.collection",
      "fullName": "Scarti_SDD",
      "id": "0lk1n000000TN1FAAW",
      "lastModifiedById": "0051n000006NJ2MAAW",
      "lastModifiedByName": "AF09898",
      "lastModifiedDate": "2022-06-21T11:06:26.000Z",
      "manageableState": "unmanaged",
      "type": "WaveAnalyticAssetCollection"
    },
    {
      "createdById": "00524000003qiItAAI",
      "createdByName": "AE66628",
      "createdDate": "2023-06-26T15:21:35.000Z",
      "fileName": "wave/EstrazioniOneShot.collection",
      "fullName": "EstrazioniOneShot",
      "id": "0lk1n000000TN1UAAW",
      "lastModifiedById": "00524000003qiItAAI",
      "lastModifiedByName": "AE66628",
      "lastModifiedDate": "2023-07-31T08:05:09.000Z",
      "manageableState": "unmanaged",
      "type": "WaveAnalyticAssetCollection"
    }
  ],
  "warnings": [
    "org-api-version configuration overridden at 61.0"
  ]
}

Request:

  1. Please investigate and resolve the issue with the WaveAnalyticAssetCollection retrieval causing the ENOENT error and the missing folders.
  2. Ensure that the retrieval process does not delete manually created directories if they are required for the process.

    System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.64.8",
  "nodeVersion": "node-v20.17.0",
  "osVersion": "Darwin 23.6.0",
  "rootPath": "/Users/ea_enel/.local/share/sf/client/2.64.8-21fd4e6",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.6 (core)",
    "@oclif/plugin-commands 4.1.3 (core)",
    "@oclif/plugin-help 6.2.16 (core)",
    "@oclif/plugin-not-found 3.2.22 (core)",
    "@oclif/plugin-plugins 5.4.15 (core)",
    "@oclif/plugin-search 1.2.12 (core)",
    "@oclif/plugin-update 4.6.6 (core)",
    "@oclif/plugin-version 2.2.15 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.20 (core)",
    "@oclif/plugin-which 3.2.16 (core)",
    "@salesforce/cli 2.64.8 (core)",
    "apex 3.5.4 (core)",
    "api 1.3.1 (core)",
    "auth 3.6.70 (core)",
    "data 3.8.1 (core)",
    "deploy-retrieve 3.13.1 (core)",
    "info 3.4.13 (core)",
    "limits 3.3.36 (core)",
    "marketplace 1.3.0 (core)",
    "org 4.7.2 (core)",
    "packaging 2.8.12 (core)",
    "schema 3.3.37 (core)",
    "settings 2.3.24 (core)",
    "sobject 1.4.42 (core)",
    "source 3.5.21 (core)",
    "telemetry 3.6.17 (core)",
    "templates 56.3.24 (core)",
    "trust 3.7.35 (core)",
    "user 3.5.33 (core)",
    "sfdx-plugin-source-read 1.2.2 (user) published 9 days ago (Sat Oct 26 2024)"
  ]
}
github-actions[bot] commented 1 week 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.