Ignore components in metadata operations (retrieve/deploy) or package.xml

Issue #2215 resolved
Matthias Blom created an issue

I’m having an issue in an existing (non source-tracked) org where I want to retrieve all subscribed metadata, excluding any unlocked packages and excluding some other manually selected components. These latter components were installed from an unmanaged package. However, there does not seem to be a way to exclude some components in the package.xml, without also having to manually exclude all components linked to an unlocked package.

For example, there are 2 aura components from an unmanaged package I would like to ignore, and 5 other aura components from unlocked packages. Currently the metadata subscription for AuraDefinitionBundle uses a wildcard and when retrieving metadata, the unlocked components are not retrieved and the unmanged component are. This is how I would expect the wildcard to work, as by default I do not want unlocked metadata retrieved.

However, when I deselect the 2 unmanaged components I do not want, the package.xml will be updated, adding the unlocked components to it (as these are always shown in the available metadata list). When I do a retrieval with this package.xml, the unmanaged components are not retrieved, but the unlocked ones are. In order to not retrieve the unlocked components I’d have to manually remove them from the package.xml. This is not that big of a deal when there are 5 components, but when there are multiple installed unlocked packages in the org and lot’s of custom configuration, it becomes very unwieldy to manually select exactly the components I want to keep.

Ideally, I’d like to be able to use the wildcard in the package.xml and specify a few components that I do not want to retrieve. I assumed this would work with the .forceignore file, but it seems that this file is not used during retrieve & deploy operations. If this is not possible, at least an option to filter out unlocked metadata components from the package.xml configuration window (and if possible in the metadata retrieval window as well), would help massively in cutting out the noise and allowing me to review only the unmanaged metadata.

Comments (5)

  1. Scott Wells repo owner

    This will be included in next week’s build along with full end-to-end support for .forceignore in IC2.

  2. Log in to comment