Skip to content

Releases: dolittle/DotNET.SDK

Release v24.1.2

05 Feb 11:10
aa3cece
Compare
Choose a tag to compare

Summary

Hardened SDK assembly loading, and fixed an issue where analyzer DLL's were packaged with the application.

Fixed

  • Fixed issue where a failed assembly loading could prevent services from starting
  • Ensured the transitive roslyn DLL's are not packaged with applications

Release v24.1.1

03 Feb 11:36
5c16061
Compare
Choose a tag to compare

Summary

Fixed a MongoDB serialization regression with ConceptAs in combination with DateTimeOffset and the MongoDB 3.0 driver.

This version combines compatibility with older serialized documents, as well as MongoDB driver 3.0 and newer.

In addition, this release upgrades Microsoft extensions, OpenTelemetry & Protobuf dependencies to the latest version

Fixed

  • ConceptAs serialization

Release v24.1.0

07 Jan 10:40
7e27362
Compare
Choose a tag to compare

Summary

Adds stream position metadata to event context, as well as adding the ability to programmatically decide the processing range of event handlers.

Stream position metadata requires runtime version 9.9.0 or newer.

Usage

EventHandlerWithRangeSelectorAttribute<T> can be used instead of the EventHandler attribute, where T is an IProcessRangeSelector. The given range selector will be used to determine what time range will be processed by the handler.

Added

  • EventContext: Added StreamPosition
  • EventHandlerWithRangeSelector: New attribute that supports programmatic process range selection.

Release v24.0.0

13 Nov 14:05
4a99379
Compare
Choose a tag to compare

Summary

This release adds support for .NET 9, while removing .NET 6 & 7, as they are no longer in support.

Upgraded Microsoft & OpenTelemetry libraries to the latest supported versions.

There are some minor optimizations related to .NET 9 features, but there should not be any other breaking changes than the removed dotnet versions.

Added

  • .NET 9 builds

Removed

  • .NET 6 support
  • .NET 7 support

Release v23.5.2

13 Nov 11:02
e7cf799
Compare
Choose a tag to compare

Summary

This release fixes some issues that can be experienced if you use Guids in read models without annotating the type with BsonGuidRepresentation.

It also gives access to the underlying connection string & MongoUrl per tenant, if the user requires more control over connection setup.

Added

  • Default serialized representation of Guid, with the ability to override defaults. By default, this brings the behavior back to MongoDB's pre 3.0.0-drivers.
  • Ability to access underlying connection string / MongoUrl per tenant

Fixed

  • Now allows non-annotated Guids in read models again

Release v23.5.1

07 Nov 12:41
c4d510a
Compare
Choose a tag to compare

Summary

This PR upgrades the included MongoDB drivers to the latest version.

It also adds a Roslyn code fix for missing identity parameters on EventType, Projections, EventHandler and AggregateRoot.

Added

  • Codefix for CS7036, when there is no attribute identity specified on an identity attribute.

Release v23.5.0

23 Oct 07:30
6368abb
Compare
Choose a tag to compare

Summary

This adds support for retroactively redacting personal data details from previously committed events. Redactions are scoped to a single EventSourceId, and a single event type, and allow you to overwrite or remove specific fields.

This feature requires runtime version 9.7.0

How to use it

Events that should be redacted must be annotated to target the fields that should be updated or removed

[EventType("24e3a119-57d5-45d7-b7ef-a736fe6331e7")]
public class CustomerRegistered
{
    // The generic type will replace the value
    [RedactablePersonalData<string>("<redacted>")]
    public string Name { get; init; }
    
    //  The non-generic one will remove the field altogether
    [RedactablePersonalData]
    public Address? CustomerAddress { get; init; }
}

They can then be redacted by committing a targeted redaction event on the same eventsourceId as the redacted events.

It can either be done with the built-in event

    public void GdprForget(string reason, string performedBy)
    {
        Apply(Redactions.Create<CustomerRegistered>(reason, performedBy));
    }

or a user-created event

[EventType("de1e7e17-bad5-da7a-a4f7-e409ae1785dc")]
public class CustomerDetailsForgotten : PersonalDataRedactedForEvent<CustomerRegistered>
{
}

Applied like this

    public void GdprForget(string reason, string performedBy)
    {
        Apply(Redactions.Create<CustomerRegistered, CustomerDetailsForgotten>(reason, performedBy));
    }

What about read models and aggregate state ?

Aggregates and read models should handle the redactions as normal events, and update state accordingly.

Ex

    public void On(CustomerDetailsForgotten evt)
    {
        _address = null;
        _name = null;
        _gdprRedacted = true;
    }

Read models are not automagically updated, but should handle the redaction events themselves. Redaction events after being committed behave exactly as any other event, and can be processed by both eventhandlers and projections.

Since you would want the eventhandlers to only handle as few events as needed, user defined redaction events are the suggested way to perform redactions.

How does it work?

The runtime will recognize the redaction event type with the redaction prefix "de1e7e17-bad5-da7a", and if the events have the correctly formatted structure, it will perform the redactions in the same transaction as the new events are being added.

It will replace overridden properties as specified in RedactedProperties, and remove properties that are defined with null values.

Redaction events themselves cannot be redacted, to ensure auditability of the system.

Added

  • Dolittle.SDK.Events.Redaction.PersonalDataRedactedForEvent - Built in event that can redact any event type
  • Dolittle.SDK.Events.Redaction.PersonalDataRedactedForEvent<TEvent> - Class to extend in order to create redactions for specific events
  • Dolittle.SDK.Events.Redaction - Use this to simplify creation of redaction events

Updated

Release v23.4.0

02 Oct 10:32
aaee0ba
Compare
Choose a tag to compare

Summary

Allow projection read models to get dependencies from IServiceProvider By extending IRequireDependencies<T>. It will then get a callback when initialized, and can resolve external dependencies scoped to its current tenant. This can enable logging use cases on init, mutations etc.

Added

Dolittle.SDK.Projections.IRequireDependencies<T>, interface for read models to be able to inject dependencies

Release v23.3.0

31 Jul 12:36
c39f5f3
Compare
Choose a tag to compare

Summary

This release is primarily focused on update and maintenance of SDK dependencies.

In addition it has updates to the aggregate test helpers.

Changed

  • Aggregate test helpers refactored
    • Changed ShouldHaveEvent -> ShouldHaveEvents, to assert on potentially several events of a type
    • Added new ShouldHaveEvent to assert on a single event of a type

Removed

  • Removed dependency on BaselineTypeDiscovery.

Release v23.2.5

20 Jun 09:23
d129a46
Compare
Choose a tag to compare

Summary

This patch adds analyzers to verify that mutations do not throw exceptions. In addition it adds a few new helper methods to aggregate test classes

Added

  • Diagnostic: ExceptionInMutation
  • AggregateRootTests exception helpers