Unabel to deploy metadata

Issue #2563 resolved
Matias Ocampo created an issue

When running a deployment with Test Level “Run Specified Tests“ and selecting a set of unit tests the deployment fails and shows a message like the screenshot attached.

This is happening to other co-workers as well. The weird part is that sometimes it works, but most of the time it does not work.

Salesforce client version

@salesforce/cli/2.39.6 win32-x64 node-v20.12.2

The workaround: Deploy the same set of metadata but instead run all unit tests. (Run Local Tests). But this doesn’t work for me because it’s a huge project and the deployment takes a lot of time.

Official response

  • Scott Wells repo owner

    Yep, it’s a bug left over from the recent migration from sfdx commands to sf commands where IC is still using the old command’s -r <testNames> argument instead of the new command’s --tests <testNames> argument. I’ve already committed a fix for tomorrow’s build. Thanks for getting the diagnostic info to me!

Comments (9)

  1. Scott Wells repo owner
    • changed status to open

    Hi. I'm happy to help but would need to see a debug log showing why it's failing. Can you please enable debug logging for Metadata Deployment and Salesforce DX, reproduce the issue, and either attach or email the resulting idea.log for review?

  2. Matias Ocampo reporter

    Hi Scott. It’s unbelievable but so far I did not get the error again. I did what you suggested to turn on the debug logs. If the error occurs again I will post the log. Thanks!

  3. Scott Wells repo owner

    That's what we affectionately called a "Heisenbug" because it changes behavior when observed. I'm going to resolve this as unreproducible (for the moment), but if/when you see the issue return, just reopen it with diagnostic logs attached (or emailed) and I'll dig in.

  4. Scott Wells repo owner

    Yep, it’s a bug left over from the recent migration from sfdx commands to sf commands where IC is still using the old command’s -r <testNames> argument instead of the new command’s --tests <testNames> argument. I’ve already committed a fix for tomorrow’s build. Thanks for getting the diagnostic info to me!

  5. Log in to comment