Update dependency LaunchDarkly.ServerSdk to v8 #87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.13.0
->8.5.0
Release Notes
launchdarkly/dotnet-server-sdk (LaunchDarkly.ServerSdk)
v8.5.0
Compare Source
Features
v8.4.0
Compare Source
Note: This release is an artifact of our automated release process and contains no significant changes from 8.3.0.
Features
v8.3.0
Compare Source
Added:
Changed:
v8.2.0
Compare Source
Changed:
v8.1.0
Compare Source
Added:
v8.0.0
Compare Source
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.
For detailed information about this version, refer to the list below. For information on how to upgrade from the previous version, read the migration guide.
Added:
Migration
type which provides an out-of-the-box configurable migration framework.MigrationVariation
andTrackMigration
methods on LdClient.ApplicationInfo
, for configuration of application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.IsOffline
method toILdClient
. This was previously only available on the concreteLdClient
implementation.Removed:
User
inLdClient
methods. TheContext.FromUser
method can be used to convert aUser
to aContext
. In a future version it may be removed.Changed:
LaunchDarkly.EventSource
to5.1.0
. This will change the minimumLaunchDarkly.Logging
version to2.0.0
for all dependencies.v7.1.0
Compare Source
[7.1.0] - 2023-10-16
Deprecated:
User
type. These methods are removed in 8.0.0. Currently aUser
can be converted to aContext
usingContext.FromUser
. The ability to do this conversion may be removed in a future version.v7.0.3
Compare Source
Changed:
LaunchDarkly.InternalSdk
to3.1.2
.v7.0.2
Compare Source
Fixed:
FullyQualifiedKey
. The key generation was not sorted by the kind, so the key was not stable depending on the order of the context construction. This also affected the generation of the secure mode hash for mulit-contexts.v7.0.1
Compare Source
Changed:
LaunchDarkly.InternalSdk
3.1.1
Fixed:
v7.0.0
Compare Source
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."
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:
LaunchDarkly.Sdk
, the typesContext
andContextKind
define the new context model.User
parameter, there is now a corresponding method that takes aContext
. These are defined as extension methods. The SDK still supportsUser
for now, butContext
is the preferred model andUser
may be removed in a future version.TestData
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 ofFlush()
.Changed (breaking changes from 6.x):
Secondary
meta-attribute that affects percentage rollouts. If you set an attribute with that name in aContext
, it will simply be a custom attribute like any other.Anonymous
attribute inLDUser
is now a simple boolean, with no distinction between a false state and a null state.IDataStore
, which define the low-level interfaces of LaunchDarkly SDK components and allow implementation of custom components, have been moved out of theInterfaces
namespace into a newSubsystems
namespace. Some types have been removed by using generics: for instance, the interface typeIDataSourceFactory
has been replaced byIComponentConfigurer<IDataSource>
. Application code normally does not refer to these types except possibly to hold a value for a configuration property such asConfigurationBuilder.DataStore
, so this change is likely to only affect configuration-related logic.Changed (requirements/dependencies/build):
LaunchDarkly.ServerSdk.Redis
, etc.).LaunchDarkly.JsonStream
. This package existed because some platforms did not support theSystem.Text.Json
API, but that is no longer the case and the SDK now usesSystem.Text.Json
directly for all of its JSON operations.LaunchDarkly.CommonSdk.JsonNet
for interoperability with the Json.NET library, you must update this to the latest major version.Changed (behavioral changes):
Removed:
Secondary
meta-attribute inUser
andUserBuilder
.Alias
method no longer exists because alias events are not needed in the new context model.InlineUsersInEvents
option no longer exists because it is not relevant in the new context model.LaunchDarkly.Sdk.Json.JsonException
: this type is no longer necessary because the SDK now always usesSystem.Text.Json
, so any error when deserializing an object from JSON will throw aSystem.Text.Json.JsonException
.v6.3.5
Compare Source
[6.3.5] - 2023-02-27
Changed:
LaunchDarkly.JsonStream
to version1.1.2
. This version addresses an issue with serializing doubles to JSON values.v6.3.4
Compare Source
[6.3.4] - 2023-02-24
Changed:
LaunchDarkly.JsonStream
version1.1.1
. This version includes a fix for parsing double values using the invariant culture.v6.3.3
Compare Source
Fixed:
v6.3.2
Compare Source
Fixed:
AllFlagsState
to produce bootstrap data for the JavaScript SDK, the .NET SDK was not returning the correct metadata for evaluations that involved an experiment. As a result, the analytics events produced by the JavaScript SDK did not correctly reflect experimentation results.AllFlagsState
was sometimes larger than necessary due to the inclusion of null properties.Error
level, inconsistent with other equivalent kinds of errors. They now useWarn
level.StoreError
. That was not happening.LaunchDarkly.Sdk.UnixMillisecondTime
now serializes and deserializes correctly withSystem.Text.Json
.index
events were including an unnecessarycontextKind
property for anonymous users; this was not in the schema for that type of event and was ignored by LaunchDarkly.v6.3.1
Compare Source
Fixed:
HttpConfigurationBuilder
methodsProxy
andConnectTimeout
were not working correctly: they were being applied to polling requests and analytics event posts, but not streaming requests. Now they apply to all requests. (#148)v6.3.0
Compare Source
Added:
ConfigurationBuilder.ServiceEndpoints
provides a simpler way of setting custom service base URIs, if you are connecting to a LaunchDarkly Relay Proxy instance, a private LaunchDarkly instance, or a test fixture. Previously, this required setting aBaseURI
property for each individual service (streaming, events, etc.). If using the Relay Proxy, simply remove anyBaseURI
calls in your SDK configuration and callServiceEndpoints(Components.ServiceEndpoints().RelayProxy(myRelayProxyUri))
on theIConfigurationBuilder
.LdValue.Dictionary
,LdValue.List
,LdValue.ObjectBuilder.Set
,LdValue.ObjectBuilder.Remove
, andLdValue.ObjectBuilder.Copy
.Fixed:
System.Text.Json
API, temporaryJsonDocument
instances are now disposed of immediately rather than leaving them to be garbage-collected. (Thanks, JeffAshton!)Deprecated:
StreamingDataSourceBuilder.BaseURI
,PollingDataSourceBuilder.BaseURI
, andEventProcessorBuilder.BaseURI
. The preferred way to set these is now withConfigurationBuilder.ServiceEndpoints
.v6.2.2
Compare Source
There are no functional changes in the SDK in this release; its only purpose is to address the version conflict issue mentioned below.
Fixed:
LaunchDarkly.CommonSdk
,LaunchDarkly.Logging
, orSystem.Collections.Immutable
, unless binding redirects were used. Note that it may still be necessary to use a binding redirect if your application (or one of its dependencies) relies on an assembly that is also used by the SDK with a different version.v6.2.1
Compare Source
Changed:
IFlagTracker.FlagChanged
, thesender
parameter will be theLdClient
instance that generated the event. Previously,sender
was being set to one of several internal components that were not useful to application code.Fixed:
IFlagTracker
, flag change events would not fire if the data source wasFileData
and there was a change in the test data file(s). Now, any change to the test data will cause a flag change event to fire for every flag. (#144)IDataSourceStatusProvider.WaitFor
to wait indefinitely or time out even if the desired status was found.v6.2.0
Compare Source
Added:
v6.1.0
Compare Source
Added:
v6.0.0
Compare Source
This is a major rewrite that introduces a cleaner API design, adds new features, and makes the SDK code easier to maintain and extend. See the .NET 5.x to 6.0 migration guide for an in-depth look at the changes in 6.0.0; the following is a summary.
Added:
LdClient.FlagTracker
.LdClient.DataSourceStatusProvider
. This allows you to check the current connection status, and to be notified if this status changes.LdClient.DataStoreStatusProvider
. This allows you to check whether database updates are succeeding, or to be notified if this status changes.TestData
class inLaunchDarkly.Sdk.Server.Integrations
is a new way to inject feature flag data programmatically into the SDK for testing—either with fixed values for each flag, or with targets and/or rules that can return different values for different users. UnlikeFileData
, this mechanism does not use any external resources, only the data that your test code has provided.HttpConfigurationBuilder.Proxy
allows you to specify an HTTP/HTTPS proxy server programmatically, rather than using .NET'sHTTPS_PROXY
environment variable. That was already possibly to do by specifying anHttpClientHandler
that had a proxy; this is a shortcut for the same thing.HttpConfigurationBuilder.CustomHeader
allows you to specify custom HTTP headers that should be added to every HTTP/HTTPS request made by the SDK.HttpConfigurationBuilder.ResponseStartTimeout
sets the timeout interval for "start of request until beginning of server response", which .NET represents asSystem.Net.HttpClient.Timeout
. The SDK previously referred to this asConnectTimeout
, but it was not a real connection timeout in the sense that most TCP/IP frameworks use the term, so the new name more clearly defines the behavior.DoubleVariation
method for getting a numeric flag value as thedouble
type (as opposed toFloatVariation
which returns afloat
).Alias
method ofLdClient
can be used to associate two user objects for analytics purposes with an alias event.ConfigurationBuilder.Logging
is a new configuration category for options related to logging. This includes a new mechanism for specifying where log output should be sent, instead of using theCommon.Logging
framework to configure this.LoggingConfigurationBuilder.LogDataSourceOutageAsErrorAfter
controls the new connection failure logging behavior described below under "behavioral changes".LaunchDarkly.Sdk.Json
namespace provides methods for converting types likeUser
andFeatureFlagsState
to and from JSON.LaunchDarkly.Sdk.UserAttribute
type provides a less error-prone way to refer to user attribute names in configuration, and can also be used to get an arbitrary attribute from a user.LaunchDarkly.Sdk.UnixMillisecondTime
type provides convenience methods for converting to and from the Unix epoch millisecond time format that LaunchDarkly uses for all timestamp values.Changed (requirements/dependencies/build):
Common.Logging
. Instead, it uses a similar but simpler logging facade, theLaunchDarkly.Logging
package, which has adapters for various logging destinations (including one forCommon.Logging
, if you want to keep an existing configuration that uses that framework).Newtonsoft.Json
. It uses theSystem.Text.Json
API internally on platforms where that is available; on others, such as .NET Framework 4.5.x, it uses a lightweight custom implementation. This removes the potential for dependency version conflicts in applications that useNewtonsoft.Json
for their own purposes. Converting data types likeUser
andLdValue
to and from JSON withSystem.Text.Json
will always work; converting them withNewtonsoft.Json
requires an extra package,LaunchDarkly.CommonSdk.JsonNet
.LaunchDarkly.CommonSdk
,LaunchDarkly.EventSource
,LaunchDarkly.InternalSdk
, andLaunchDarkly.JsonStream
. You should not need to reference these assemblies directly, as they are loaded automatically when you install the main NuGet packageLaunchDarkly.ServerSdk
. Previously there was also a variant calledLaunchDarkly.CommonSdk.StrongName
that was used by the release build of the SDK, but that has been removed.Changed (API changes):
LaunchDarkly.Client
are now in eitherLaunchDarkly.Sdk
orLaunchDarkly.Sdk.Server
. TheLaunchDarkly.Sdk
namespace contains types that are not specific to the server-side .NET SDK (that is, they will also be used by the Xamarin SDK):EvaluationDetail
,LdValue
,User
, andUserBuilder
. Types that are specific to the server-side .NET SDK, such asConfiguration
andLdClient
, are inLaunchDarkly.Sdk.Server
.ConfigurationBuilder
, into sub-builders that are specific to one area of functionality (such as streaming, or analytics events). SeeConfigurationBuilder
andComponents
.User
andConfiguration
objects are now immutable. To specify properties for these classes, you must now useUser.Builder
andConfiguration.Builder
.LdValue
instead ofJToken
: custom attribute values inUser.Custom
; JSON flag variations returned byJsonVariation
,JsonVariationDetail
, andAllFlags
; the optional data parameter ofLdClient.Track
.EvaluationReason
is now a single struct type rather than a base class.LaunchDarkly.Client.Files.FileComponents
has been moved toLaunchDarkly.Sdk.Server.Integrations.FileData
.LdClient.Initialized
is now a read-only property rather than a method.IFeatureStore
, now have a new namespace (LaunchDarkly.Sdk.Server.Interfaces
), new names, and somewhat different semantics due to changes in the SDK's internal architecture. Any existing custom component implementations will need to be revised to work with .NET SDK 5.x.ILdClient
interface is now inLaunchDarkly.Sdk.Server.Interfaces
instead of the main namespace.IConfigurationBuilder
interface has been replaced by the concrete classConfigurationBuilder
.Changed (behavioral changes):
PersistentDataStoreConfiguration
), the stream will not restart after a database error; instead, all updates will still be accumulated in the cache, and will be written to the database automatically if the database becomes available again.LaunchDarkly.Sdk.Server.LdClient
, while messages about specific areas of functionality are logged under that name plus.DataSource
(streaming, polling, file data, etc.),.DataStore
(database integrations),.Evaluation
(unexpected errors during flag evaluations), or.Events
(analytics event processing).Error
level in most cases but sometimes atWarn
level. They are now all atWarn
level, but with a new behavior: if connection failures continue without a successful retry for a certain amount of time, the SDK will log a specialError
-level message to warn you that this is not just a brief outage. The amount of time is one minute by default, but can be changed with the newLogDataSourceOutageAsErrorAfter
option inLoggingConfigurationBuilder
.Components.NoEvents
, the SDK now avoids generating any analytics event objects internally. Previously they were created and then discarded, causing unnecessary heap churn.IntVariation
, it will now truncate (round toward zero) rather than rounding to the nearest integer. This is consistent with normal C# behavior and with most other LaunchDarkly SDKs.HttpConfigurationBuilder.ConnectTimeout
now sets the timeout for making a network connection, so it is consistent with what is called a connection timeout in other LaunchDarkly SDKs and in most networking libraries. It only has an effect in .NET Core 2.1+ and .NET 5.0+; other .NET platforms do not support this kind of timeout.Fixed:
ConfigurationBuilder.StartWaitTime
was documented as being 5 seconds, but the actual value was 10 seconds. It is now really 5 seconds, consistent with other LaunchDarkly server-side SDKs.Removed:
ConfigurationBuilder
methods, which have been replaced by the modular configuration syntax that was already added in the 5.14.0 release. See the migration guide for details on how to update your configuration code if you were using the older syntax.v5.14.2
Compare Source
Fixed:
http://my-proxy/launchdarkly-stream/some-endpoint-path
tohttps://stream.launchdarkly.com/some-endpoint-path
. In this example, the/launchdarkly-stream
part was being dropped from the request URL, preventing this type of proxy configuration from working. Now the base path will always be preserved.v5.14.1
Compare Source
Fixed:
v5.14.0
Compare Source
The purpose of this release is to introduce newer APIs for configuring the SDK, corresponding to how configuration will work in the upcoming 6.0 release. These are very similar to the configuration APIs in the recent 5.x releases of the LaunchDarkly server-side Java and Go SDKs.
The corresponding older APIs are now deprecated. If you update to this release, you will see deprecation warnings where you have used them, but they will still work. This should make it easier to migrate your code to the newer APIs, in order to be ready to update to the 6.0 release in the future without drastic changes. For details, see below, and also see the API documentation for
IConfigurationBuilder
.Other than the configuration methods, there are no changes to SDK functionality in this release.
Added:
IConfigurationBuilder
. These are being superseded by builders that are specific to one area of functionality: for instance,Components.StreamingDataSource()
andComponents.PollingDataSource()
provide builders/factories that have options specific to streaming or polling, the SDK's many options related to analytics events are now in a builder returned byComponents.SendEvents()
, and HTTP-related options such asConnectTimeout
are now in a builder returned byComponents.HttpConfiguration()
. Using this newer API makes it clearer which options are for what, and makes it impossible to write contradictory configurations like.IsStreamingEnabled(false).StreamUri(someUri)
.Components.PersistentDataStore
and one of the new integration factories in the namespaceLaunchdarkly.Client.Integrations
. The next releases of the integration packages for Redis, Consul, and DynamoDB will use these semantics.Changed:
IFeatureStore
andIUpdateProcessor
for backward compatibility, but the newer configuration methods use the new names. The interfaces will be renamed in the next major version.ExternalUpdatesOnly
. It is now an option for theDataSource
configuration method.Deprecated:
IConfigurationBuilder
: all methods for setting individual properties related to streaming, polling, events, and HTTP configuration; also, theUseLdd
option (see above).Components
:DefaultEventProcessor
,DefaultUpdateProcessor
,InMemoryFeatureStore
,NullEventProcessor
,NullUpdateProcessor
. Replacements for these are described in the API documentation.v5.13.1
Compare Source
Changed:
LaunchDarkly.EventSource
dependency to a version that has a specific target for .NET Standard 2.0. Previously, that package targeted only .NET Standard 1.4 and .NET Framework 4.5. There is no functional difference between these targets, but .NET Core application developers may wish to avoid linking to any .NET Standard 1.x assemblies on general principle.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.