Migrate to v2
The v2 release of the Lattice SDK represents a change in SDK implementation, and not in the underlying Lattice services or APIs.
The underlying Lattice services continue to support both REST and gRPC protocols.
If you’re an existing Lattice developer, you have three migration paths to choose from:
-
Continue using gRPC with Buf (recommended): If your apps use gRPC, or you have existing Lattice integrations that use gRPC, get the artifacts directly from the Buf Schema Registry. If you prefer to continue using gRPC and want to generate clients compatible with Lattice SDK v1, use the following plugin versions when getting the artifacts from Buf:
Plugins
Python
We do not recommend using
betterproto
moving forward, as the plugin does not support typeAny
. For Python, we recommend using thegrpc/python
plugin. -
Migrate to SDK v2 (recommended): We recommend this option for most new developers. The REST-based SDKs provide a more streamlined development experience and better browser compatibility.
-
Maintain v1 usage (not recommended): While you can continue using v1 gRPC-based packages without changes, we do not recommend this approach. New versions of the Lattice SDK include new features and critical updates to existing resources.
Use the following table to help you decide which migration path is best for you:
The following steps guide you through the first two recommended paths.
Before you begin
-
Check the version of the Lattice SDK package:
If your version starts with
1.x.x
, continue with the migration guide:
Option 1: Use v2 with gRPC
The following shows how to update from v1 to v2 gRPC implementation in Go:
Option 2: Use v2 with REST
If you’re migrating from the v1 gRPC SDK to the v2 REST SDK, follow these steps to update your implementation:
Install the REST SDK
Follow the SDK setup guide to install the REST SDK for your preferred language.
For Go, do the following:
What’s next?
- Review our language-specific setup guides for detailed implementation instructions
- See the API reference and explore the Lattice APIs.
- Check out the sample apps to see the SDK in action.