Skip to content

Releases: launchdarkly/go-server-sdk

v7.1.0

14 Mar 13:57
ab722f4
Compare
Choose a tag to compare

7.1.0 (2024-03-14)

Features

  • Inline contexts for all evaluation events (#111) (0fad2bb)
  • Redact anonymous attributes within feature events (0fad2bb)

v7.0.1

04 Mar 22:47
4af62a4
Compare
Choose a tag to compare

7.0.1 (2024-03-01)

Bug Fixes

  • deps: bump golang.org/x/crypto from 0.1.0 to 0.17.0 (5d26f59)

v7.0.0

11 Oct 20:39
Compare
Choose a tag to compare

[7.0.0] - 2023-10-11

The latest version of this SDK supports the ability to manage migrations or modernizations, using migration flags. You might use this functionality if you are optimizing queries, upgrading to new tech stacks, migrating from one database to another, or other similar technology changes. Migration flags are part of LaunchDarkly's Early Access Program. This feature is available to all LaunchDarkly customers but may undergo additional changes before it is finalized.

Added:

  • New Migrator type which provides an out-of-the-box configurable migration framework.
  • For more advanced use cases, added new MigrationVariation and TrackMigrationOp methods on LDClient.

Changed:

  • LDClientEvaluations interface now has a MigrationVariation method.
  • LDClientEvents interface now has TrackMigrationOp method.

v6.1.1

11 Oct 19:05
Compare
Choose a tag to compare

[6.1.1] - 2023-10-11

Fixed:

  • Event payloads receiving an HTTP 413 status code will no longer prevent subsequent event payloads from being attempted.
  • Readme Get started hyperlink destination. (Thanks, christgf!)

v6.1.0

13 Apr 20:08
Compare
Choose a tag to compare

[6.1.0] - 2023-04-13

Added:

  • Support for Payload Filtering in streaming and polling modes. Payload Filtering is a beta feature that allows SDKs to download a subset of environment data, rather than full environments. Please contact your account executive for more information.

v6.0.3

02 Mar 00:19
Compare
Choose a tag to compare

[6.0.3] - 2023-03-01

Changed:

  • Bumped go-sdk-events to v2.0.1
  • Bumped go-server-sdk-evaluation to v2.0.2

Fixed:

  • Bumped go-sdk-common to v3.0.1. This fixes a bug within the easyJSON unmarshaller when an unexpected privateAttributes or redactedAttributes was encountered in a Context _meta attribute.

v6.0.2

27 Feb 19:44
Compare
Choose a tag to compare

[6.0.2] - 2023-02-27

Changed:

  • Bumped golang/x/crypto and golang/x/sys to v0.1.0

v6.0.1

17 Jan 19:41
Compare
Choose a tag to compare

[6.0.1] - 2023-01-17

Fixed:

  • If the application configured custom base URIs that did not have a valid URI syntax, the SDK could panic at startup time. It will now simply log an error and be unable to connect to LaunchDarkly.
  • Fixed shared test logic that is used by the database integration packages.

v5.10.1

17 Jan 19:12
Compare
Choose a tag to compare

[5.10.1] - 2023-01-17

Fixed:

  • If the application configured custom base URIs that did not have a valid URI syntax, the SDK could panic at startup time. It will now simply log an error and be unable to connect to LaunchDarkly.
  • Fixed shared test logic that is used by the database integration packages.

v6.0.0

07 Dec 17:43
Compare
Choose a tag to compare

[6.0.0] - 2022-12-07

The latest version of this SDK supports LaunchDarkly's new custom contexts feature. Contexts are an evolution of a previously-existing concept, "users." Contexts let you create targeting rules for feature flags based on a variety of different information, including attributes pertaining to users, organizations, devices, and more. You can even combine contexts to create "multi-contexts."

This feature is only available to members of LaunchDarkly's Early Access Program (EAP). If you're in the EAP, you can use contexts by updating your SDK to the latest version and, if applicable, updating your Relay Proxy. Outdated SDK versions do not support contexts, and will cause unpredictable flag evaluation behavior.

If you are not in the EAP, only use single contexts of kind "user", or continue to use the user type if available. If you try to create contexts, the context will be sent to LaunchDarkly, but any data not related to the user object will be ignored.

For detailed information about this version, please refer to the list below. For information on how to upgrade from the previous version, please read the migration guide.

Added:

  • In go-sdk-common, the new package ldcontext with the types Context and Kind defines the new context model.
  • The ldtestdata flag builder methods have been extended to support now context-related options, such as matching a key for a specific context type other than "user".
  • LDClient.FlushAndWait() is a synchronous version of Flush().

Changed (breaking changes from 5.x):

  • The SDK packages now use regular Go module import paths rather than gopkg.in paths: gopkg.in/launchdarkly/go-server-sdk.v5 is replaced by github.com/launchdarkly/go-server-sdk/v6 and gopkg.in/launchdarkly/go-sdk-common.v2 is replaced by github.com/launchdarkly/go-sdk-common/v3.
  • The type lduser.User has been redefined to be an alias for ldcontext.Context. This means that existing application code referencing lduser.User can still work as long as it is treating the user as an opaque value, and not calling methods on it that were specific to that type.
  • All methods that used the type lduser.User now use ldcontext.Context instead.
  • lduser.NewUser and lduser.UserBuilder now create an instance of Context instead of User. This is as a convenience so that any code that was previously using these methods to construct a user, but did not reference the User type directly for the result, may still be usable without changes. It is still preferable to use the new constructors and builders for Context.
  • The Secondary attribute which existed in User does not exist in Context and is no longer a supported feature.
  • It was previously allowable to set a user key to an empty string. In the new context model, the key is not allowed to be empty. Trying to use an empty key will cause evaluations to fail and return the default value.
  • If you were using JSON serialization to produce a representation of a User, the new type Context uses a different JSON schema, so any code that reads the JSON will need to be adjusted. If you are passing the JSON to other code that uses LaunchDarkly SDKs, make sure you have updated all SDKs to versions that use the new context model. (However, unmarshaling a Context from JSON data will still work correctly even if the JSON is in the old user format.)
  • Types such as DataStore, which define the low-level interfaces of LaunchDarkly SDK components and allow implementation of custom components, have been moved out of the interfaces subpackage into a new subsystems subpackage. Some types have been removed by using generics: for instance, the interface type DataSourceFactory has been replaced by ComponentConfigurer[DataSource]. Application code normally does not refer to these types except possibly to hold a value for a configuration property such as Config.DataStore, so this change is likely to only affect configuration-related logic.

Changed (requirements/dependencies/build):

  • The minimum Go version is now 1.18.

Changed (behavioral changes):

  • The SDK can now evaluate segments that have rules referencing other segments.
  • Analytics event data now uses a new JSON schema due to differences between the context model and the old user model.

Removed:

  • Removed all types, fields, and methods that were deprecated as of the most recent 5.x release.
  • Removed the Secondary meta-attribute in lduser.User and lduser.UserBuilder.
  • The Alias method no longer exists because alias events are not needed in the new context model.
  • The InlineUsersInEvents option no longer exists because it is not relevant in the new context model.