-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yggdrasil engine #256
base: main
Are you sure you want to change the base?
Yggdrasil engine #256
Conversation
a18e9a7
to
ea0c94b
Compare
ea0c94b
to
0420d5c
Compare
0e5d253
to
629636e
Compare
<groupId>io.getunleash</groupId> | ||
<artifactId>yggdrasil-engine</artifactId> | ||
<version>0.1.0-alpha.9</version> | ||
<classifier>x86_64-linux</classifier> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Classifier needs to be fixed before releasing this but I think that's a chunk of work distinct enough to want its own PR
@@ -107,17 +107,6 @@ public void disableAllExcept(String... excludedFeatures) { | |||
} | |||
} | |||
|
|||
@Override | |||
public Variant deprecatedGetVariant(String toggleName, UnleashContext context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a public interface change. This was in place to support legacy evaluation of variants. We're removing that in the next major, as per #234
@@ -176,15 +165,5 @@ public List<EvaluatedToggle> evaluateAllToggles(@Nullable UnleashContext context | |||
getVariant(toggleName))) | |||
.collect(Collectors.toList()); | |||
} | |||
|
|||
@Override | |||
public void count(String toggleName, boolean enabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Public interface change. I don't see a reason why anyone would be using this but it is public. The Yggdrasil engine is now the sink for this data
@@ -33,6 +35,7 @@ public DefaultHttpMetricsSender(UnleashConfig unleashConfig) { | |||
this.gson = | |||
new GsonBuilder() | |||
.registerTypeAdapter(LocalDateTime.class, new DateTimeSerializer()) | |||
.registerTypeAdapter(Instant.class, new InstantSerializer()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yggdrasil deals in Instants not Datetimes. This allows us to serialize those to ISO 8601 when we send metrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
@@ -1,5 +1,6 @@ | |||
package io.getunleash.metric; | |||
|
|||
import io.getunleash.engine.MetricsBucket; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a bit sneaky but this was a drop in replacement for the existing metrics bucket. All I needed to do was include the new import and the code is unchanged
src/main/java/io/getunleash/metric/UnleashMetricServiceImpl.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Gastón Fournier <[email protected]>
Swaps out the evaluation of feature toggles for Yggdrasil
Notable changes
To do