Pull Metadata operating off of stale cache, producing inconsistent results

Issue #2210 resolved
Matthew Chevalier created an issue

I'm experiencing an issue with the pull metadata command while working with a scratch org.

As seen in the screenshot below, the pull command is attempting to pull those elements and failing, primarily because those elements have been deleted from the scratch org. This wouldn't be so much of an issue except that it prevents me from pulling down certain new metadata declaratively created in the platform ui.

To get around this I temporarily enabled “use deploy….instead of pull” feature for the connection. This allowed me to get the metadata I wanted, but then once I reverted back to using “Pull Metadata”, the action actually deleted the metadata I had just pulled down in the previous step.

I assume it’s because there’s some sort of cache that is stale.

I have rebuilt the OST and updated the cache on the ‘Select Retrieval Scope’ screen and not experienced similar behavior. The only difference was after these steps, “Pull Metadata” didn’t delete my otherwise retrieved metadata.

Comments (3)

  1. Scott Wells repo owner

    Matthew, unfortunately I’m not seeing the details of IC2 invoking sfdx force:source:pull in the log due to logging levels. However, if it’s truly force:source:pull that’s running into this issue, it’s likely a CLI problem and not an IC2 problem as IC2 uses the CLI 100% for source-tracked push/pull actions. Can you reproduce this with debug logging enabled for both metadata retrieval and Salesforce DX so I can see exactly what’s happening?

  2. Scott Wells repo owner

    Issue tracker grooming. If this is still an issue, please feel free to reopen, ideally with a concrete reproduction scenario.

  3. Log in to comment