Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
prepare 6.2.1 release (#145)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
7 people authored Sep 28, 2021
1 parent 0fed653 commit 1f9bce4
Show file tree
Hide file tree
Showing 78 changed files with 670 additions and 1,313 deletions.
11 changes: 4 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ workflows:
requires:
- build-all
- test-netcore-linux:
# .NET Core 2.0 is not a supported platform, but it is the simplest way to test the
# .NET Standard 2.0 target-- since a .NET Core 2.1 application would use the .NET
# Core 2.1 target instead.
name: .NET Standard 2.0 + .NET Core 2.0 - Linux
docker-image: microsoft/dotnet:2.0-sdk-jessie
build-target-framework: netstandard2.0
test-target-framework: netcoreapp2.0
name: .NET 6.0 - Linux
docker-image: mcr.microsoft.com/dotnet/sdk:6.0-focal
build-target-framework: net5.0
test-target-framework: net6.0
requires:
- build-all
- test-windows:
Expand Down
26 changes: 13 additions & 13 deletions .ldrelease/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

repo:
public: dotnet-server-sdk
private: dotnet-server-sdk-private
Expand All @@ -6,26 +8,24 @@ publications:
- url: https://nuget.org/packages/LaunchDarkly.ServerSdk
description: NuGet

circleci:
windows:
context: org-global

template:
name: dotnet-windows
env:
# See Releaser docs - this causes the generated documentation to include all public APIs from CommonSdk
LD_RELEASE_DOCS_ASSEMBLIES: LaunchDarkly.ServerSdk LaunchDarkly.CommonSdk
LD_RELEASE_DOCS_TARGET_FRAMEWORK: net452
LD_RELEASE_TEST_TARGET_FRAMEWORK: net452
jobs:
- docker: {}
template:
name: dotnet-linux
env:
# See Releaser docs - this causes the generated documentation to include all public APIs from CommonSdk
LD_RELEASE_DOCS_ASSEMBLIES: LaunchDarkly.ServerSdk LaunchDarkly.CommonSdk
LD_RELEASE_DOCS_TARGET_FRAMEWORK: netstandard2.0
LD_RELEASE_TEST_TARGET_FRAMEWORK: net5.0

releasableBranches:
branches:
- name: master
description: 6.x
- name: 5.x

documentation:
title: LaunchDarkly Server-Side SDK for .NET
githubPages: true
gitHubPages: true

sdk:
displayName: ".NET"
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ The NuGet package name and assembly name will also change. In the 5.6.3 release,

## [5.2.0] - 2018-07-27
### Added:
- 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).
- 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).

### Changed:
- 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.
Expand Down Expand Up @@ -319,7 +319,7 @@ The NuGet package name and assembly name will also change. In the 5.6.3 release,
## [5.0.0] - 2018-05-10

### Changed:
- 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).
- 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`.
- 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`.

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

## [3.5.0] - 2018-01-29
### Added
- 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`.
- 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`.

### Changed
- 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.
Expand Down Expand Up @@ -468,7 +468,7 @@ The NuGet package name and assembly name will also change. In the 5.6.3 release,
### Added
- Support for multivariate feature flags. New methods `StringVariation`, `JsonVariation` and `IntVariation` and `FloatVariation` for multivariates.
- New `AllFlags` method returns all flag values for a specified user.
- 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).
- 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).

### Changed
- LdClient now implements a new interface: ILdClient
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to the LaunchDarkly Server-Side SDK for .NET

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.
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.

## Submitting bug reports and feature requests

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For using LaunchDarkly in *client-side* .NET applications, including mobile (Xam

## LaunchDarkly overview

[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!
[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!

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

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

## Getting started

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.
Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/server-side/dotnet#getting-started) for instructions on getting started with using the SDK.

## Signing

Expand Down Expand Up @@ -71,7 +71,7 @@ We encourage pull requests and other contributions from the community. Check out
* 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?).
* 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.
* 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.
* 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.
* 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.
* Explore LaunchDarkly
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
Expand Down
2 changes: 1 addition & 1 deletion docs-src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All public types, methods, and properties should have documentation comments in

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.

The HTML documentation also includes documentation comments from `LaunchDarkly.CommonSdk` (see "Prerequisites" above). These are included automatically when the documentation is built on release.
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.

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

Expand Down
8 changes: 4 additions & 4 deletions src/LaunchDarkly.ServerSdk/Components.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static class Components
/// <remarks>
/// <para>
/// "Big segments" are a specific type of user segments. For more information, read the LaunchDarkly
/// documentation about user segments: https://docs.launchdarkly.com/home/users
/// documentation about user segments: https://docs.launchdarkly.com/home/users/segments
/// </para>
/// <para>
/// After configuring this object, use <see cref="ConfigurationBuilder.BigSegments(IBigSegmentsConfigurationFactory)"/>
Expand Down Expand Up @@ -62,7 +62,7 @@ public static BigSegmentsConfigurationBuilder BigSegments(IBigSegmentStoreFactor
/// <remarks>
/// Passing this to <see cref="ConfigurationBuilder.DataSource(IDataSourceFactory)"/> causes the SDK
/// not to retrieve feature flag data from LaunchDarkly, regardless of any other configuration. This is
/// normally done if you are using the <a href="https://docs.launchdarkly.com/home/advanced/relay-proxy">Relay Proxy</a>
/// normally done if you are using the <a href="https://docs.launchdarkly.com/home/relay-proxy">Relay Proxy</a>
/// in "daemon mode", where an external process-- the Relay Proxy-- connects to LaunchDarkly and populates
/// a persistent data store with the feature flag data. The data store could also be populated by
/// another process that is running the LaunchDarkly SDK. If there is no external process updating
Expand Down Expand Up @@ -122,7 +122,7 @@ public static BigSegmentsConfigurationBuilder BigSegments(IBigSegmentStoreFactor
/// is disabled).
/// </para>
/// <para>
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/server-side/dotnet#logging">SDK
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/features/logging#net">SDK
/// SDK reference guide</a>.
/// </para>
/// </remarks>
Expand Down Expand Up @@ -159,7 +159,7 @@ public static LoggingConfigurationBuilder Logging() =>
/// For more about log adapters, see <see cref="LoggingConfigurationBuilder.Adapter(ILogAdapter)"/>.
/// </para>
/// <para>
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/server-side/dotnet#logging">SDK
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/features/logging#net">SDK
/// SDK reference guide</a>.
/// </para>
/// </remarks>
Expand Down
6 changes: 3 additions & 3 deletions src/LaunchDarkly.ServerSdk/ConfigurationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public Configuration Build()
/// <remarks>
/// <para>
/// "Big segments" are a specific type of user segments. For more information, read the LaunchDarkly
/// documentation about user segments: https://docs.launchdarkly.com/home/users
/// documentation about user segments: https://docs.launchdarkly.com/home/users/segments
/// </para>
/// <para>
/// If you are using this feature, you will normally specify a database implementation that matches how
Expand Down Expand Up @@ -226,7 +226,7 @@ public ConfigurationBuilder Http(IHttpConfigurationFactory httpConfigurationFact
/// <see cref="Logging(ILogAdapter)"/> instead.
/// </para>
/// <para>
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/server-side/dotnet#logging">SDK
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/features/logging#net">SDK
/// SDK reference guide</a>.
/// </para>
/// </remarks>
Expand Down Expand Up @@ -256,7 +256,7 @@ public ConfigurationBuilder Logging(ILoggingConfigurationFactory loggingConfigur
/// only want to specify the basic logging destination, and do not need to set other log properties.
/// </para>
/// <para>
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/server-side/dotnet#logging">SDK
/// For more about how logging works in the SDK, see the <a href="https://docs.launchdarkly.com/sdk/features/logging#net">SDK
/// SDK reference guide</a>.
/// </para>
/// </remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace LaunchDarkly.Sdk.Server.Integrations
/// <remarks>
/// <para>
/// "Big segments" are a specific type of user segments. For more information, read the LaunchDarkly
/// documentation about user segments: https://docs.launchdarkly.com/home/users
/// documentation about user segments: https://docs.launchdarkly.com/home/users/segments
/// </para>
/// <para>
/// If you want to set non-default values for any of these properties, create a builder with
Expand Down
14 changes: 5 additions & 9 deletions src/LaunchDarkly.ServerSdk/Integrations/EventProcessorBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,13 @@ public EventProcessorBuilder AllAttributesPrivate(bool allAttributesPrivate)
/// <remarks>
/// You will only need to change this value in the following cases:
/// <list type="bullet">
/// <item>
/// <description>
/// You are using the <a href="https://docs.launchdarkly.com/docs/the-relay-proxy">Relay Proxy</a>.
/// <item><description>
/// You are using the <a href="https://docs.launchdarkly.com/home/relay-proxy">Relay Proxy</a>.
/// Set <c>BaseUri</c> to the base URI of the Relay Proxy instance.
/// </description>
/// </item>
/// <item>
/// <description>
/// </description></item>
/// <item><description>
/// You are connecting to a test server or a nonstandard endpoint for the LaunchDarkly service.
/// </description>
/// </item>
/// </description></item>
/// </list>
/// </remarks>
/// <param name="baseUri">the base URI of the events service; null to use the default</param>
Expand Down
6 changes: 3 additions & 3 deletions src/LaunchDarkly.ServerSdk/Integrations/FileData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public static class FileData
/// contain an object with three possible properties:
/// </para>
/// <list type="bullet">
/// <item><c>flags</c>: Feature flag definitions.</item>
/// <item><c>flagVersions</c>: Simplified feature flags that contain only a value.</item>
/// <item><c>segments</c>: User segment definitions.</item>
/// <item><description><c>flags</c>: Feature flag definitions.</description></item>
/// <item><description><c>flagVersions</c>: Simplified feature flags that contain only a value.</description></item>
/// <item><description><c>segments</c>: User segment definitions.</description></item>
/// </list>
/// <para>
/// The format of the data in <c>flags</c> and <c>segments</c> is defined by the LaunchDarkly application
Expand Down
Loading

0 comments on commit 1f9bce4

Please sign in to comment.