Deploying class silently fails

Issue #79 resolved
Nathen Drees created an issue

I have a class which is supposed to be implementing the Database.Bachable interface. I forgot to provide the generic type on the interface, and whenever I save the class it looks like it deployed. No errors are reported in the class or in the Problems panel, but when you go in to Salesforce nothing has been updated. The deploys are silently failing.

2015-07-29_11-12-46.png

I've attached the log which shows it choking on the Database.Batchable declaration. Some sort of error message needs to be returned to the user to let them know something went wrong. Preferably it would tell them that they're missing a generic parameter.

Comments (12)

  1. Scott Wells repo owner

    Nathen, looking at the provided log (thanks!), the failure that I see is not because of the missing type parameter but because there was contention on the an associated row in the metadata container (the Tooling API wrapper for a deployment):

    2015-07-29 11:09:27,838 [ 275952] WARN - tellij.builder.ForceComBuilder - Save failed for BatchUpdateSalesHistory: Status code = UNABLE_TO_LOCK_ROW Error message = unable to obtain exclusive access to this record

    Were you deploying multiple files or just saving the single class? Just checking to see if this is a red herring or not. Also, did you get a warning dialog for this failure or did it truly fail silently?

    Let me provide some context for my questions. I made a change to one of my own implementations of Batchable to omit the type parameter and got the expect result, an error indicator on the declaration saying that I needed to provide a type param. I then looked at where the error in the log was being handled and it's during the creation/population of the metadata container even before the Tooling API tries to compile/validate the contents. That's why there's no error indicator in the editor window.

    Anyway, please let me know if I'm jumping to the wrong conclusion about what happened here. Also, if you don't mind, please try creating the same syntax error as above again and see if you get the correct behavior or not.

    Thanks much!

  2. Nathen Drees reporter

    I was trying to just save this one file. I was able to create it originally, but when I added the batchable interface it stopped giving me any errors, so it looked like it was deploying. I did try to push all metadata up to the server when I noticed it wasn't working to try and fix the issue, which is where you might have seen the contention coming from?

  3. Scott Wells repo owner

    Hmmmm...okay. I'll take another look. I was able to reproduce at least one variation on it that had to do with a prior error getting metadata describes that resulted in an empty cache and therefore empty deployment later. I'll keep chiseling away at this. Thanks for performing a verification!

  4. Scott Wells repo owner

    Okay, I figured out what's happening here. Should be resolved in the next bug fix release (1.4.1).

  5. Log in to comment