The challenges of deploying metadata between Summer '16 and Winter '17 orgs
Andrew Hunter on October 12th 2016
A few weeks ago, we began to see deployment failures occurring for users using organizations on the new Winter ‘17 API. Salesforce has introduced a lot of changes in Winter ‘17, and has made it so that the older Summer ‘16 metadata API tries to return the metadata in the older format.
In the past, we’ve been able to wait until a new version of Salesforce goes to general release before updating the API version used by Gearset, because the metadata changes have been minor and are usually available even when using the older API. The Winter ‘17 update has not been so smooth for us.
Deploying between Winter '17 orgs
As our users began to try to deploy between Winter ‘17 organizations, we were seeing deployment failures. These were occurring because Salesforce’s attempt to downgrade the metadata to the older API version was imperfect and some settings for newer features were being left in. This partially translated metadata made no sense to the target organization and so generated errors. In a way, this was a good thing for us: if the deployment had gone through, the downgraded metadata would have been missing the information for the new features in Winter ‘17. So while the deployment would have succeeded, the results would have been sub-optimal.
We fixed this problem a few weeks ago by automatically detecting Winter ‘17 orgs and switching to the new API version. This gives Gearset the ability to successfully deploy between Winter ‘17 organizations.
Deploying between Summer '16 and Winter '17 orgs
Unfortunately, this introduced a new problem. If a user wants to deploy between Winter ‘17 and an older Summer ‘16 organization, Gearset would download the newer version of the metadata. As this update is unusual in that it has breaking changes for existing metadata items - particularly the replacement of picklists with the new ValueSet type - these kinds of deployments would now nearly always fail.
We’ve just released a further update to address this case. We’ll now ask Salesforce to use the older API if the target organization is not yet able to support Winter ‘17. This will fix many cases where the source organization is on Winter ‘17 but the target has not yet been upgraded. It’s not a perfect fix - Salesforce doesn’t always perfectly downgrade the metadata so some metadata that uses new features or which doesn’t downgrade all of its changes will fail to deploy.
Some metadata using new features may be degraded by the translation. A particular example to watch out for are the new lightning custom applications which will be converted into standard custom applications for Summer ‘16. Salesforce doesn’t make it possible to switch existing custom applications to the new lightning mode, so if you’re using these types of application on a Winter ‘17 organization, be careful about deploying them to a Summer ‘16 org if you plan on updating later on.
Automatic API and org compatability checks with Gearset
The design of this feature is automatic. Gearset is designed to pick the right deployment strategy for your organization automatically and will adapt automatically when you decide to upgrade. If you find that it’s not working for you, don’t hesitate to contact us through the in-app chat or by email.
One thing you may notice is that, due to the large number of metadata changes required by the upgrade, you will get a large change monitoring notification for any organization you’re using that feature with. This is a good opportunity to see all the ways in which your metadata has changed with the upgrade, but it could also mask other changes being made to the organization at the time.