Specify API to use per deployment

Issue #240 resolved
Matt Addy created an issue

I think it would be a good enhancement to allow someone to select whether to use the tooling API or metadata API when deploying metadata.

I understand this can be set on a "global" level in the plugin settings. However, it would be great to allow someone to select the API to use on a per-deployment basis. Thoughts?

Comments (19)

  1. Scott Wells repo owner

    Hah! I've hit this exact bug and reported it to the Salesforce Tooling API folks, but they were unable to reproduce it successfully. When you logged this I actually wondered if perhaps it was because of this bug but didn't ask. It's good to see this reported by others. I'll follow up on my report to Salesforce.

    As for the original request, let me chew on it a bit. It almost seems as if you'd want to configure a list of classes/triggers that, when included in a deployment that could otherwise be serviced by the Tooling API, would instead cause that deployment to use the Metadata API. More to consider on this one...

  2. Matt Addy Account Deactivated reporter

    There may be other ways to handle a feature like this for sure. Again, this is a really low priority item. Thanks Scott!

  3. Scott Wells repo owner

    Yeah, my stance on this one is that I'd rather send all of the relevant info to the Tooling API team at Salesforce and have the problem solved at the source rather than require IC and other Salesforce tools to provide workarounds to end users. I just forwarded the linked issue that you supplied to Josh K. and Greg W. in hopes that it allows them to nip this one in the bud.

  4. Matt Addy Account Deactivated reporter

    Scott, any chance you'd be willing to revisit this? My team switches between the metadata API and tooling API all the time. Another idea would be having different keyboard shortcuts (or contextual menu items) that allow you to "Deploy using Metadata API" and "Deploy using Tooling API" as distinct operations.

  5. Scott Wells repo owner

    Matt, this is still motivated by the bug linked above, right? Assuming so, let me follow up with the PMs at Salesforce and see if they have any ETA for a real fix. I still hate to put in a clunky workaround for something that's fundamentally a bug in the underlying system.

  6. Matt Addy Account Deactivated reporter

    Yes, this is still motivated by the linked bug. We prefer the tooling API for speed, but the bug prevents us from using it. Falling back to the metadata API often times takes minutes to compile.

  7. Scott Wells repo owner

    Okay, thanks for confirming. I'll ping Greg and Josh and see if a fix is anywhere on the horizon. If not, I'll see what I can do to provide a reasonable workaround for the issue until it's resolved, though that won't likely come until after I get in a few more iterations on the new Lightning feature.

  8. Scott Wells repo owner

    I've emailed Greg and Josh asking for a status on this bug. I'll let you know what I hear back.

  9. Scott Wells repo owner

    I sent a note but haven't gotten a response. I know they're slammed getting ready for TrailheaDX right now, but I'll send one more bump today.

  10. Scott Wells repo owner

    Matt mentioned that he wasn't seeing this anymore, so I just tried a Tooling API deployment in one of my own projects that had exhibited this issue. I'm also seeing proper deployment now. My guess is that having this reported in the context of the Force.com IDE raised the visibility sufficiently to have it fixed. I'm going to resolve this, but anyone can please feel free to reopen if you see it again.

  11. Log in to comment