Retrieve on large unmanaged package for one Object retrieves whole archive

Issue #345 resolved
Jaap Branderhorst created an issue

Working on an unmanaged package with almost 50Mb of metadata. Retrieving only one object metadata file seems to result in retrieving the whole package resulting in a nearly unmanageable situation. Can this be fixed?

How to reproduce: - Create a really large unmanaged package - Do a retrieve to your local machine - Change on the org something in - for example - the Account object (if that's part of your unmanaged package) - Try to do a compare between the local machine and the org - Hangs in retrieving archive

Comments (11)

  1. Scott Wells repo owner

    I'm going to look at this for the next build, but in the interim, can you let me know how you've set up your metadata subscription (All/Package vs. Package.xml vs. Selected) and how you're selecting the one SObject for retrieval? My guess is that there's a workaround until I give you a fix, but I'll need those details.

  2. Jaap Branderhorst reporter

    Hi @RoseSilverSoftware ,

    Thanks for picking this up so fast. Impressed.

    I use All/Package. I selected an unmanaged package in my connection.

    When retrieving I tried to use Context at first and deselecting the stuff I didn't need. You cannot do that. Then I tried Custom and selected the right sObjects I wanted to retrieve. I have the feeling the whole package is being retrieved. Also because in the Force.com Migration tool guide it is stated that you can only retrieve complete packages.

  3. Scott Wells repo owner

    Aha. Yeah, I think I hit this same issue the other day. If you don't mind, please try switching from All/Package to Selected and select the metadata you're working with in your local file system. Then try right-clicking on the exact SObject you want to retrieve and see if it doesn't retrieve just that. Hopefully this gives you an effective workaround while I work on the actual bug. Please let me know if not.

  4. Jaap Branderhorst reporter

    That will only work with a true Custom Object. It won't work with standard objects on which we have added fields/weblinks etc. In that case it will pull the whole object including the standard stuff I have seen.

    Another improvement point I have seen is that the metadata list is not cached. When switching from the connection to the selection screen it retrieves a list of all the metadata.

  5. Scott Wells repo owner

    Regarding the standard object customizations, if you set your subscription to include the metadata types/entries of the customizations (CustomField, etc.) but not the standard object itself, it will retrieve the .object file with just those items.

    Regarding the uncached metadata list, can you be more specific about where this is happening? I've tried to cache that information pretty aggressively, but it sounds like I've missed a few places.

  6. Scott Wells repo owner

    I've verified that this behavior occurs when the subscription is set to All/Package and a package is selected. It behaves correctly with all other subscription configurations. When a package is selected, the metadata retrieval uses singlePackage = true and packageNames = <selected-package-name>. I'm thinking that it should continue to do that unless the retrieval context is Context or Selected in which case it should work like other configurations.

  7. Log in to comment