Open nunogois opened 3 months ago
Rebased this and cleaned it up a bit. @sighphyre let me know when you think it's a good time to merge this. I suggest taking another look just in case 😄
What architectures are going to be supported in docker containers? I've been getting burned by rust/go .NET integrations lately where the producing teams do not have access to ARM64 platforms on which to build and code that runs on my local machine, fails to build in a docker on ARM64 Macs.
What architectures are going to be supported in docker containers? I've been getting burned by rust/go .NET integrations lately where the producing teams do not have access to ARM64 platforms on which to build and code that runs on my local machine, fails to build in a docker on ARM64 Macs.
Out the box, likely x86 Windows/MacOS/Linux + ARM MacOS. Right now there's no Github runners for ARM Windows/Linux, not a blocker but we likely won't go through the dance of setting up a custom runner unless someone asks
Edit: Okay Linux ARM builds will be in by default too, probably
https://linear.app/unleash/issue/2-1545/yggdrasil-net-integrate-into-unleashclient-net-sdk
This incorporates Yggdrasil into the .NET SDK, using the new Unleash.Yggdrasil NuGet package.
The PR tries to target as small of a change surface as possible, however some things simply no longer made sense or needed to change to accommodate this change to the new Yggdrasil engine.
After this change we can consider removing a big part of what can now be considered "dead code". There are a lot of refactoring opportunities. We should also consider favoring state literal strings in tests over constructing the state with the current classes. However all of this is out of scope for this PR.
Some changes that affect the public interface and usability of the SDK include:
FeatureToggles
;GetVariants
;IStrategy
->Yggdrasil.IStrategy
at Unleash client creation, for custom strategies;IToggleBootstrapProvider.Read()
should now return a state string instead of aToggleCollection
;UnleashServices
now logs an error and emits aFileCache
error wheneverYggdrasilEngine
fails to load initial state;Some changes that are internal to the SDK include:
FetchTogglesResult
dropsToggleCollection
in favor ofState
;SendMetrics
now takes in anYggdrasil.MetricsBucket
instead of aThreadSafeMetricsBucket
;CachedFilesLoader
no longer needs a serializer, since it uses the file string content as is;CachedFilesLoader
dropsInitialToggleCollection
in favor ofInitialState
;UnleashServices
now holds a list ofDefaultStrategyNames
in order to register them as part of metrics;UnleashServices
no longer initializes aToggleCollection
andMetricsBucket
. Instead, it initializes anYggdrasilEngine
;Variant
now inherits fromYggdrasil.Variant
;Payload
now inherits fromYggdrasil.Payload
;UnleashContext
now inherits fromYggdrasil.Context
;ClientMetricsBackgroundTask
dropsThreadSafeMetricsBucket
in favor ofYggdrasilEngine
;FetchFeatureTogglesTask
dropsThreadSafeToggleCollection
andIJsonSerializer
in favor ofYggdrasilEngine
;We also fixed some SDK behaviors that followed wrong assumptions.
For more details, feel free to ask or check the diff directly.