Deploy All/Modified does not deploy component API Version

Issue #1057 resolved
Piotr Kożuchowski created an issue

I've changed API Version in metadata files and deployed to another org - the API Version did not got updated on that org.

I've ran a few scenarios and here are my findings:

Test Scenario: Changed class to use method introduced in later API Version than it is currently saved as. Changed API Version in meta.xml file to required version.

  1. Force save inside the class Result: Deployment fails because method is not available in that API Version. Expected: API Version should be updated and class should compile.

  2. Select class file in project files window and click Force Save Result: Deployment fails because method is not available in that API Version. Expected: API Version should be updated and class should compile.

  3. Select both class file and meta and click Force Save Result: Deployment succeeds - works as expected

  4. Select both files and click Deploy Modified or Deploy All from context menu Result: Deployment fails because method is not available in that API Version. Expected: API Version should be updated and class should compile.

API Version is only updated when meta.xml file is explicitly selected in Project files window and Force Save is clicked. This is affecting my deployment flow, since I would normally deploy to another org through Deploy All menu, but in this particular case, I have to change module connection and deploy through Force Save.

Kind Regards,

Comments (4)

  1. Scott Wells repo owner

    Piotr, this is almost certainly happening because it's using the Tooling API deployment path which doesn't send the meta.xml file. Unfortunately there's no way to have both...faster deployment of supported metadata via the Tooling API deployment path AND updates to attributes specified via meta.xml. You would either need to open the meta.xml file explicitly and save it which would force a Metadata API deployment, or you'd need to disable deployment via the Tooling API temporarily or permanently to ensure that when a source file is saved, its meta.xml file is also sent to the server.

    I'm resolving this as working-as-designed assuming that the statements above are accurate. If you find that things don't work as described, please reopen and describe the process you're following that's leading to errant behavior.

  2. Log in to comment