Deployment count incorrect upon failure

Issue #774 resolved
Derek Wiers created an issue

When saving/autodeploying a change to code that fails to compile, the "deployment complete" message that shows up in the Event log (or in the bubble, upon failure) - shows the number of failures, not the number of failed components. For instance, I deployed 1 class unsuccessfully and got 3 errors. The following message appeared:

Screen Shot 2017-11-03 at 11.04.24 AM.png

Comments (10)

  1. Scott Wells repo owner

    Derek, I'm pretty sure I'm just showing what the API tells me to show, and the metadata API also counts package.xml and the meta.xml file as "components", hence 3 instead of 1. If we want to be sure, please gather debug logs with the following enabled for debug logging (Help>Debug Log Settings):

    #com.illuminatedcloud.intellij.builder.ForceComBuilder
    #com.illuminatedcloud.intellij.builder.ForceComMetadataApiDeployer
    #com.illuminatedcloud.intellij.builder.ForceComToolingApiDeployer
    

    Then send me the idea.log and I'll see why it's displaying that number. If it's a bug in IC, that should give me enough to go on to fix it.

  2. Derek Wiers reporter

    I will enable that debug as you asked - however I'm confident that it's not just the package.xml / meta.xml being counted, as the error is not always 3. I've had 7, 1, 2, 5...basically it's always the number of problems in the Problems tool window. Evidence of 3 and 1 errors are shown in the Event tool window screenshot below:

    Screen Shot 2017-11-03 at 11.28.52 AM.png

  3. Derek Wiers reporter

    Here's an example of a couple days ago when deploying 1 class resulted in the Salesforce parser freaking out on the server (I was doing some experiments and a poor naming convention freaked it out pretty badly), resulting in 7 errors. However the "deployment complete" message thought there were 7 components.

    Screen Shot 2017-11-03 at 11.33.07 AM.png

    This wasn't always this way. I can't recall exactly when I first noticed this, but I'm about 90% sure it was sometime 1.8.x.

  4. Scott Wells repo owner

    Ah...that helps. I bet this is a result of the switch to the new Apex compiler. It used to report component failures as the number of files, but I bet for Apex it's reporting the number of errors now across all Apex source files. Of course, I think the reason it was 1:1 before is because their compiler would fail fast on the first error, and the new compiler actually reports all errors that it finds.

    No need for a debug log. That gives me what I need! Thanks!

  5. Scott Wells repo owner

    Had intended to include the fix in 1.8.1.3 but as I implemented it I realized I wanted a bit more testing. It may seem completely trivial, but without getting into the details there are some nuances. Since deployment is obviously a super-critical feature, I didn't want to accidentally break something by getting in a hurry.

  6. Scott Wells repo owner

    Issue tracker grooming. IC2 still largely uses the component information reported by the API(/CLI) so counts may still be off a bit if they misattribute reported info, but unless there's a good reason to try to filter/transform/reconcile that info, it probably makes sense to convey what was reported.

  7. Log in to comment