brianedwardsaunders / sfdx-ext

sfdx extension
MIT License
15 stars 5 forks source link

ext:mdapi:retrieve stops unfinished #6

Closed Matthias-Hermsdorf closed 2 years ago

Matthias-Hermsdorf commented 2 years ago

Hi,

searching for a way to retrieve all reports metadata at one I found your nice package. Unfortunatly it does not work as expected for me.

sfdx ext:mdapi:retrieve retrieves the /stage/myId@example.com/manifest/package.xml, but the retrieved dir remains empty. I appendet the console stack below. After retrieving the metadata its done. According to the mdapi-retrieve-utility.js there should be further steps, but they don't get called. Don't know why but changing the loglevel does not change the output.

Do you have any idea, how to get the data?

    sfdx ext:mdapi:retrieve -u myId@example.com --loglevel=trace
    -----------------------------
    sfdx ext:mdapi:retrieve
    -----------------------------
    targetusername        : matthias.hermsdorf@solarwatt.com.b2bqa
    apiversion            : 55.0
    ignorebackup          : false
    ignoreinstalled       : false
    ignorenamespaces      : false
    ignorehidden          : false
    ignorefolders         : false
    ignorestaticresources : false
    manifestonly          : false
    retrievemode          : dev
    split                 : false
    -----------------------------
    initialising... done
    describe metadata... done
    list metadata... done
    list folders... done
    resolve personaccount recordtypes... done
    create package.xml file(s)... done
    copied package.xml file
    refreshing retrieve directory: stage/matthias.hermsdorf@solarwatt.com.b2bqa/retrieved
    retrieve directory created
    retrieve metadata (please standby)... done
Matthias-Hermsdorf commented 2 years ago

Our package.xml has about ~3mb. The sfdx retrieve stops also prematurely

sfdx force:source:retrieve -x manifest\package.xml Preparing retrieve request... done

I deleted most parts of of the package.xml and leave only the currently neccessary parts, in my case 350kb. And then sfdx force:source:retrieve works fine.

So if I could delimit sfdx ext:mdapi:retrieve to some keys, or perhaps set the timeout to a longer timespan, it could work. At the moment my problem is solved. Thanks for your package, which extracted all required names for me.

brianedwardsaunders commented 2 years ago

@Matthias-Hermsdorf seems like a limit of how much metadata you are trying to download - an option is to reduce what isn't needed, please try use the optional cli flags to reduce the number of components you include in the package.xml e.g. sfdx force:source:retrieve -x -h -n -i to exclude hidden metadata, namespace and/or installed components.

Matthias-Hermsdorf commented 2 years ago

I agree. That limit comes from Salesforce and is not a bug in this package. Perhaps this could be a later feature request. But that would be another issue.