Skip to content

Commit

Permalink
prepare 5.0.2 release (#228)
Browse files Browse the repository at this point in the history
## [5.0.2] - 2023-09-19
### Fixed:
- Fixed a rare bug in key generation in some contexts generated by the
Auto Environment Attributes feature.

---------

Co-authored-by: Ember Stevens <[email protected]>
Co-authored-by: Ember Stevens <[email protected]>
Co-authored-by: Todd Anderson <[email protected]>
Co-authored-by: tanderson-ld <[email protected]>
Co-authored-by: ld-repository-standards[bot] <113625520+ld-repository-standards[bot]@users.noreply.github.com>
Co-authored-by: Kane Parkinson <[email protected]>
Co-authored-by: LaunchDarklyReleaseBot <[email protected]>
Co-authored-by: Matthew M. Keeler <[email protected]>
Co-authored-by: Louis Chan <[email protected]>
  • Loading branch information
10 people authored Sep 19, 2023
1 parent ddcd6d8 commit b778f38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ private List<ContextRecipe> makeRecipeList() {
new ContextRecipe(
ldApplicationKind,
() -> LDUtil.urlSafeBase64Hash(
Objects.toString(environmentReporter.getApplicationInfo().getApplicationId(), "") + ":"
+ Objects.toString(environmentReporter.getApplicationInfo().getApplicationVersion(), "")
Objects.toString(environmentReporter.getApplicationInfo().getApplicationId(), "")
),
applicationCallables
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ public void adheresToSchemaTest() {
// it is important that we create this expected context after the code runs because there
// will be persistence side effects
ContextKind applicationKind = ContextKind.of(AutoEnvContextModifier.LD_APPLICATION_KIND);
String expectedApplicationKey = LDUtil.urlSafeBase64Hash(
reporter.getApplicationInfo().getApplicationId() + ":"
+ reporter.getApplicationInfo().getApplicationVersion()
);
String expectedApplicationKey = LDUtil.urlSafeBase64Hash(reporter.getApplicationInfo().getApplicationId());
LDContext expectedAppContext = LDContext.builder(applicationKind, expectedApplicationKey)
.set(AutoEnvContextModifier.ENV_ATTRIBUTES_VERSION, AutoEnvContextModifier.SPEC_VERSION)
.set(AutoEnvContextModifier.ATTR_ID, LDPackageConsts.SDK_NAME)
Expand Down Expand Up @@ -180,7 +177,7 @@ public void generatedApplicationKeyWithVersionMissing() {
// it is important that we create this expected context after the code runs because there
// will be persistence side effects
ContextKind applicationKind = ContextKind.of(AutoEnvContextModifier.LD_APPLICATION_KIND);
String expectedApplicationKey = LDUtil.urlSafeBase64Hash(reporter.getApplicationInfo().getApplicationId() + ":");
String expectedApplicationKey = LDUtil.urlSafeBase64Hash(reporter.getApplicationInfo().getApplicationId());

LDContext expectedAppContext = LDContext.builder(applicationKind, expectedApplicationKey)
.set(AutoEnvContextModifier.ENV_ATTRIBUTES_VERSION, AutoEnvContextModifier.SPEC_VERSION)
Expand Down

0 comments on commit b778f38

Please sign in to comment.