Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 1f9bce4

Browse files
LaunchDarklyReleaseBoteli-darklyLaunchDarklyCIbwoskow-ldember-stevens
authored
prepare 6.2.1 release (#145)
* remove support for indirect/patch * drop support for .NET <4.5.2, .NET Standard <2.0 * bump CommonSdk to 2.11.1 for EventSource build change (#184) * add CI test jobs for .NET Core 2.1/3.1 and .NET 5 * use LaunchDarkly.Logging * add logging config test + minor cleanup * catch date/time format exception * use LaunchDarkly.InternalSdk * use component-scoped configuration for data sources * make FileData API consistent with Java SDK * rm unnecessary folder refs * use component-scoped configuration for events * test instrumentation + misc cleanup * better range checking * improve diagnostic event tests * rm obsolete warnings * fix base log name * clarify comment * .NET Core 2.0 is EOL * update web link in comments * copyedit message * change default polling base URL to use sdk.launchdarkly.com * rename IDataStoreUpdates to IDataSourceUpdates * rename IDataStoreUpdates to IDataSourceUpdates * update for API improvements in InternalSdk * use LogHelpers.LogException * use a log adapter to capture log output from failed tests * enable test logging in another place * (#1) add data source status tracking (#195) * (#2) use component-scoped configuration for HTTP properties (#196) * (#3) misc Configuration/ConfigurationBuilder cleanup + move ILdClient to Interfaces (#197) * (#4) move stream support code out of InternalSdk back into StreamProcessor (#198) * (#5) add FlagTracker (#199) * (#6) add data store status tracking (#202) * (#7) TaskExecutor fixes and tests (#203) * add smarter stream restart behavior on errors (#204) * use new UserAttribute type * add PrivateAttributeNames test * adjust for new events API in InternalSdk, simplify public events API, use structs not classes (#206) * improvements in persistent data store API to match Java & Go SDKs * make name of PersistentDataStoreBuilder consistent with other SDKs; add diagnostic description logic * make doc comments consistent for factory methods * use IDiagnosticDescription for HTTP properties * add .NET platform details to diagnostic events * update package properties * rename Components.PersistentStore to PersistentDataStore * fix serialization logic for deleted items * misc serialization fixes * add tests for model types * 6.0.0-alpha.3 * implement test data source * revise existing client tests to use TestData * simplify test logger implementation * add shortcut for logging configuration * add .gitattributes * use LaunchDarkly.JsonStream instead of Newtonsoft.Json + misc improvements to model types * preprocess flag and segment data for faster evaluation * general API cleanup (changing getter methods to properties) * (5.x) remove support for indirect/patch * add component-scoped configuration for DataSource & Events, similar to 6.0 * add component-scoped configuration for HTTP * add component-scoped configuration for persistent data store * comments + alpha version * add ability to configure proxy programmatically (and custom headers) * (6.0 - #1) improvements in persistent data store API to match Java & Go SDKs (#207) * (6.0 - #2) implement test data source (#208) * (6.0 - #3) add shortcut for logging configuration (#209) * clarify intention of tests * clarify intention of tests * it's more correct (and possibly works better in Windows) to start background tasks with explicit Task.Run() * move LogNames to Internal namespace * typos * unnecessary else * typos, misc comment fixes * misc comment fixes * fix faulty merge * more fixes for faulty merge * update for jsonstream API changes * update to latest prerelease APIs * 6.0.0-alpha.5 * add DoubleVariation and DoubleVariationDetail * 6.0.0-alpha.6 * fix doc comment * fix error handling in Evaluate, add test * more error handling fixes * rethrow errors more directly * add headers explicitly to polling requests * remove unnecessary CustomHeaders property * change IHttpConfiguration to concrete class HttpConfiguration * doc comments * use LaunchDarkly.Logging 1.0.0 * allow explicit nulls for nullable strings in JSON (#221) * (6.0) make base logger name configurable and standardize log messages (#220) * (5.x) add missing project metadata * Removed the guides link * cleaner stream restart logic using new EventSource method (#222) * misc project cleanup/metadata improvements (#224) * allow null for rollout in flag JSON (#225) * use latest package releases + update internal events API * use LaunchDarkly.EventSource 4.0.0 * fix test * add Alias method * fix release metadata * bump CommonSdk to 2.11.2 * fix test dependency * update release metadata * prepare 5.14.1 release (#135) * Releasing version 5.14.1 * ensure that base paths in base URIs are preserved * prepare 5.14.2 release (#136) * Releasing version 5.14.2 * remove WireMock.Net, use LaunchDarkly.TestHelpers for HTTP testing (#230) * update to latest InternalSdk + misc cleanup (#231) * add .NET Core 2.1 and .NET 5 target frameworks, fuller testing, update readme (#232) * generate docs with DocFX + misc doc improvements (#233) * add HttpConfigurationBuilder.ResponseStartTimeout, change how ConnectTimeout works (#234) * tiny typo * longer timeout for data store status update test * longer timeout for log message expectation * rm irrelevant time expectation from test * fix more overly time-sensitive test expectations * rm unnecessary expectation * fix more overly time-sensitive test expectations * better temp file handling in FileDataSourceTest * fix more overly time-sensitive test expectations * remove DocFX scripts that are now built into Releaser * bump EventSource version for memory leak fix * add interfaces and configuration for big segments * misc API fixes * add missing comments * add all components for big segments except evaluation * fix config builder * fix comment * add log message assertion * implement big segments in flag evaluation * implement traffic allocation changes in flag model & evaluation (#239) * allow big segment store metadata query to return null * allow big segment store metadata to be null * doc comment fixes * use test helper * update dependencies for dotnet-jsonstream numeric parsing bugfix * fix inconsequential "variable wasn't assigned" warning * remove pre-GA changelog entries * add end-to-end tests + minor fixes to startup behavior + doc comments (#245) * add end-to-end tests + minor fixes to data source error handling behavior * rm unused imports * default start wait time should be 5 seconds * better doc comments for LdClient constructor * fix XML tag * add check of Initialized * use LaunchDarkly.CommonSdk 5.1.0 * fix release metadata * linefeeds * add CI job for .NET 6.0 * rm .NET Core 2.0 job since that image is no longer available * update test dependency (older version hangs in .NET 6) * use Releaser v2 config + fix doc comment formatting * fix bullet list format * rm duplicate line * use new concurrency helpers in dotnet-sdk-internal * use newer TestHelpers + misc test cleanup * make build fail if XML comments are missing or invalid * fully qualify LogLevel type name to avoid ambuigity in doc comment references * Updates docs URLs * improve file data implementation so flag change events can work (#248) Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]>
1 parent 0fed653 commit 1f9bce4

File tree

78 files changed

+670
-1313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+670
-1313
lines changed

.circleci/config.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,10 @@ workflows:
2727
requires:
2828
- build-all
2929
- test-netcore-linux:
30-
# .NET Core 2.0 is not a supported platform, but it is the simplest way to test the
31-
# .NET Standard 2.0 target-- since a .NET Core 2.1 application would use the .NET
32-
# Core 2.1 target instead.
33-
name: .NET Standard 2.0 + .NET Core 2.0 - Linux
34-
docker-image: microsoft/dotnet:2.0-sdk-jessie
35-
build-target-framework: netstandard2.0
36-
test-target-framework: netcoreapp2.0
30+
name: .NET 6.0 - Linux
31+
docker-image: mcr.microsoft.com/dotnet/sdk:6.0-focal
32+
build-target-framework: net5.0
33+
test-target-framework: net6.0
3734
requires:
3835
- build-all
3936
- test-windows:

.ldrelease/config.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: 2
2+
13
repo:
24
public: dotnet-server-sdk
35
private: dotnet-server-sdk-private
@@ -6,26 +8,24 @@ publications:
68
- url: https://nuget.org/packages/LaunchDarkly.ServerSdk
79
description: NuGet
810

9-
circleci:
10-
windows:
11-
context: org-global
12-
13-
template:
14-
name: dotnet-windows
15-
env:
16-
# See Releaser docs - this causes the generated documentation to include all public APIs from CommonSdk
17-
LD_RELEASE_DOCS_ASSEMBLIES: LaunchDarkly.ServerSdk LaunchDarkly.CommonSdk
18-
LD_RELEASE_DOCS_TARGET_FRAMEWORK: net452
19-
LD_RELEASE_TEST_TARGET_FRAMEWORK: net452
11+
jobs:
12+
- docker: {}
13+
template:
14+
name: dotnet-linux
15+
env:
16+
# See Releaser docs - this causes the generated documentation to include all public APIs from CommonSdk
17+
LD_RELEASE_DOCS_ASSEMBLIES: LaunchDarkly.ServerSdk LaunchDarkly.CommonSdk
18+
LD_RELEASE_DOCS_TARGET_FRAMEWORK: netstandard2.0
19+
LD_RELEASE_TEST_TARGET_FRAMEWORK: net5.0
2020

21-
releasableBranches:
21+
branches:
2222
- name: master
2323
description: 6.x
2424
- name: 5.x
2525

2626
documentation:
2727
title: LaunchDarkly Server-Side SDK for .NET
28-
githubPages: true
28+
gitHubPages: true
2929

3030
sdk:
3131
displayName: ".NET"

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ The NuGet package name and assembly name will also change. In the 5.6.3 release,
287287

288288
## [5.2.0] - 2018-07-27
289289
### Added:
290-
- New configuration property `UseLdd` allows the client to use the "LaunchDarkly Daemon", i.e. getting feature flag data from a store that is updated by an [`ld-relay`](https://docs.launchdarkly.com/docs/the-relay-proxy) instance. However, this will not be usable until the Redis feature store integration is released (soon).
290+
- New configuration property `UseLdd` allows the client to use the "LaunchDarkly Daemon", i.e. getting feature flag data from a store that is updated by an [`ld-relay`](https://docs.launchdarkly.com/home/relay-proxy) instance. However, this will not be usable until the Redis feature store integration is released (soon).
291291

292292
### Changed:
293293
- If you attempt to evaluate a flag before the client has established a connection, but you are using a feature store that has already been populated, the client will now use the last known values from the store instead of returning default values.
@@ -319,7 +319,7 @@ The NuGet package name and assembly name will also change. In the 5.6.3 release,
319319
## [5.0.0] - 2018-05-10
320320

321321
### Changed:
322-
- To reduce the network bandwidth used for analytics events, feature request events are now sent as counters rather than individual events, and user details are now sent only at intervals rather than in each event. These behaviors can be modified through the LaunchDarkly UI and with the new configuration option `InlineUsersInEvents`. For more details, see [Analytics Data Stream Reference](https://docs.launchdarkly.com/v2.0/docs/analytics-data-stream-reference).
322+
- To reduce the network bandwidth used for analytics events, feature request events are now sent as counters rather than individual events, and user details are now sent only at intervals rather than in each event. These behaviors can be modified through the LaunchDarkly UI and with the new configuration option `InlineUsersInEvents`.
323323
- The `IStoreEvents` interface has been renamed to `IEventProcessor`, has slightly different methods, and includes `IDisposable`. Also, the properties of the `Event` classes have changed. This will only affect developers who created their own implementation of `IStoreEvents`.
324324

325325
### Added:
@@ -370,7 +370,7 @@ The NuGet package name and assembly name will also change. In the 5.6.3 release,
370370

371371
## [3.5.0] - 2018-01-29
372372
### Added
373-
- Support for specifying [private user attributes](https://docs.launchdarkly.com/docs/private-user-attributes) in order to prevent user attributes from being sent in analytics events back to LaunchDarkly. See the `AllAttributesPrivate` and `PrivateAttributeNames` methods on `Configuration` as well as the `AndPrivateX` methods on `User`.
373+
- Support for specifying [private user attributes](https://docs.launchdarkly.com/home/users/attributes#creating-private-user-attributes) in order to prevent user attributes from being sent in analytics events back to LaunchDarkly. See the `AllAttributesPrivate` and `PrivateAttributeNames` methods on `Configuration` as well as the `AndPrivateX` methods on `User`.
374374

375375
### Changed
376376
- The stream connection will now restart when a large feature flag update fails repeatedly to ensure that the client is using most recent flag values.
@@ -468,7 +468,7 @@ The NuGet package name and assembly name will also change. In the 5.6.3 release,
468468
### Added
469469
- Support for multivariate feature flags. New methods `StringVariation`, `JsonVariation` and `IntVariation` and `FloatVariation` for multivariates.
470470
- New `AllFlags` method returns all flag values for a specified user.
471-
- New `SecureModeHash` function computes a hash suitable for the new LaunchDarkly [JavaScript client's secure mode feature](https://docs.launchdarkly.com/docs/js-sdk-reference#section-secure-mode).
471+
- New `SecureModeHash` function computes a hash suitable for the new LaunchDarkly [JavaScript client's secure mode feature](https://docs.launchdarkly.com/sdk/features/secure-mode#configuring-secure-mode-in-the-javascript-client-side-sdk).
472472

473473
### Changed
474474
- LdClient now implements a new interface: ILdClient

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to the LaunchDarkly Server-Side SDK for .NET
22

3-
LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.
3+
LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/sdk/concepts/contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.
44

55
## Submitting bug reports and feature requests
66

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For using LaunchDarkly in *client-side* .NET applications, including mobile (Xam
1010

1111
## LaunchDarkly overview
1212

13-
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/docs/getting-started) using LaunchDarkly today!
13+
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!
1414

1515
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)
1616

@@ -33,7 +33,7 @@ The only differences in the capabilities of the SDK between platforms are these:
3333

3434
## Getting started
3535

36-
Refer to the [SDK documentation](https://docs.launchdarkly.com/docs/dotnet-sdk-reference#section-getting-started) for instructions on getting started with using the SDK.
36+
Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/server-side/dotnet#getting-started) for instructions on getting started with using the SDK.
3737

3838
## Signing
3939

@@ -71,7 +71,7 @@ We encourage pull requests and other contributions from the community. Check out
7171
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
7272
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
7373
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
74-
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/docs) for a complete list.
74+
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.
7575
* Explore LaunchDarkly
7676
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
7777
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides

docs-src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All public types, methods, and properties should have documentation comments in
44

55
Non-public items may have documentation comments as well, since those may be helpful to other developers working on this project, but they will not be included in the HTML documentation.
66

7-
The HTML documentation also includes documentation comments from `LaunchDarkly.CommonSdk` (see "Prerequisites" above). These are included automatically when the documentation is built on release.
7+
The HTML documentation also includes documentation comments from `LaunchDarkly.CommonSdk`. These are included automatically when the documentation is built on release, so that developers can see a single unified API in the documentation rather than having to look in two packages.
88

99
The `docs-src` subdirectory contains additional Markdown content that is included in the documentation build, as follows:
1010

src/LaunchDarkly.ServerSdk/Components.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static class Components
2828
/// <remarks>
2929
/// <para>
3030
/// "Big segments" are a specific type of user segments. For more information, read the LaunchDarkly
31-
/// documentation about user segments: https://docs.launchdarkly.com/home/users
31+
/// documentation about user segments: https://docs.launchdarkly.com/home/users/segments
3232
/// </para>
3333
/// <para>
3434
/// After configuring this object, use <see cref="ConfigurationBuilder.BigSegments(IBigSegmentsConfigurationFactory)"/>
@@ -62,7 +62,7 @@ public static BigSegmentsConfigurationBuilder BigSegments(IBigSegmentStoreFactor
6262
/// <remarks>
6363
/// Passing this to <see cref="ConfigurationBuilder.DataSource(IDataSourceFactory)"/> causes the SDK
6464
/// not to retrieve feature flag data from LaunchDarkly, regardless of any other configuration. This is
65-
/// normally done if you are using the <a href="https://docs.launchdarkly.com/home/advanced/relay-proxy">Relay Proxy</a>
65+
/// normally done if you are using the <a href="https://docs.launchdarkly.com/home/relay-proxy">Relay Proxy</a>
6666
/// in "daemon mode", where an external process-- the Relay Proxy-- connects to LaunchDarkly and populates
6767
/// a persistent data store with the feature flag data. The data store could also be populated by
6868
/// another process that is running the LaunchDarkly SDK. If there is no external process updating
@@ -122,7 +122,7 @@ public static BigSegmentsConfigurationBuilder BigSegments(IBigSegmentStoreFactor
122122
/// is disabled).
123123
/// </para>
124124
/// <para>
125-
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/server-side/dotnet#logging">SDK
125+
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/features/logging#net">SDK
126126
/// SDK reference guide</a>.
127127
/// </para>
128128
/// </remarks>
@@ -159,7 +159,7 @@ public static LoggingConfigurationBuilder Logging() =>
159159
/// For more about log adapters, see <see cref="LoggingConfigurationBuilder.Adapter(ILogAdapter)"/>.
160160
/// </para>
161161
/// <para>
162-
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/server-side/dotnet#logging">SDK
162+
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/features/logging#net">SDK
163163
/// SDK reference guide</a>.
164164
/// </para>
165165
/// </remarks>

src/LaunchDarkly.ServerSdk/ConfigurationBuilder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public Configuration Build()
8484
/// <remarks>
8585
/// <para>
8686
/// "Big segments" are a specific type of user segments. For more information, read the LaunchDarkly
87-
/// documentation about user segments: https://docs.launchdarkly.com/home/users
87+
/// documentation about user segments: https://docs.launchdarkly.com/home/users/segments
8888
/// </para>
8989
/// <para>
9090
/// If you are using this feature, you will normally specify a database implementation that matches how
@@ -226,7 +226,7 @@ public ConfigurationBuilder Http(IHttpConfigurationFactory httpConfigurationFact
226226
/// <see cref="Logging(ILogAdapter)"/> instead.
227227
/// </para>
228228
/// <para>
229-
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/server-side/dotnet#logging">SDK
229+
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/features/logging#net">SDK
230230
/// SDK reference guide</a>.
231231
/// </para>
232232
/// </remarks>
@@ -256,7 +256,7 @@ public ConfigurationBuilder Logging(ILoggingConfigurationFactory loggingConfigur
256256
/// only want to specify the basic logging destination, and do not need to set other log properties.
257257
/// </para>
258258
/// <para>
259-
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/server-side/dotnet#logging">SDK
259+
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/features/logging#net">SDK
260260
/// SDK reference guide</a>.
261261
/// </para>
262262
/// </remarks>

src/LaunchDarkly.ServerSdk/Integrations/BigSegmentsConfigurationBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace LaunchDarkly.Sdk.Server.Integrations
99
/// <remarks>
1010
/// <para>
1111
/// "Big segments" are a specific type of user segments. For more information, read the LaunchDarkly
12-
/// documentation about user segments: https://docs.launchdarkly.com/home/users
12+
/// documentation about user segments: https://docs.launchdarkly.com/home/users/segments
1313
/// </para>
1414
/// <para>
1515
/// If you want to set non-default values for any of these properties, create a builder with

src/LaunchDarkly.ServerSdk/Integrations/EventProcessorBuilder.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,13 @@ public EventProcessorBuilder AllAttributesPrivate(bool allAttributesPrivate)
9393
/// <remarks>
9494
/// You will only need to change this value in the following cases:
9595
/// <list type="bullet">
96-
/// <item>
97-
/// <description>
98-
/// You are using the <a href="https://docs.launchdarkly.com/docs/the-relay-proxy">Relay Proxy</a>.
96+
/// <item><description>
97+
/// You are using the <a href="https://docs.launchdarkly.com/home/relay-proxy">Relay Proxy</a>.
9998
/// Set <c>BaseUri</c> to the base URI of the Relay Proxy instance.
100-
/// </description>
101-
/// </item>
102-
/// <item>
103-
/// <description>
99+
/// </description></item>
100+
/// <item><description>
104101
/// You are connecting to a test server or a nonstandard endpoint for the LaunchDarkly service.
105-
/// </description>
106-
/// </item>
102+
/// </description></item>
107103
/// </list>
108104
/// </remarks>
109105
/// <param name="baseUri">the base URI of the events service; null to use the default</param>

0 commit comments

Comments
 (0)