Skip to content

Conversation

@spfink
Copy link
Contributor

@spfink spfink commented Nov 14, 2024

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

When a customizationArnOverride is present from an AB feature response, the toolkit will currently default to displaying the name of the last selected customization by the user rather than a name for the customization that was overridden. With this change, we'll use the AB variation field to specify a name for the customizationArn override and use it for display.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@spfink spfink requested review from a team as code owners November 14, 2024 23:07
@@ -0,0 +1,4 @@
{
"type" : "feature",
"description" : "Uses AB variation as the name for overriden customizations"
Copy link
Contributor

@rli rli Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe bug fix: fix issue where incorrect customization is shown when local setting is overridden by the amazon q service

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We didn't really have a contract for how we plumb this additional data through so marked it as a feature because it's new but could go either way

@spfink spfink closed this Nov 15, 2024
@spfink spfink reopened this Nov 15, 2024

fun getCustomizationArnOverride(): String = getFeatureValueForKey(CUSTOMIZATION_ARN_OVERRIDE_NAME).stringValue()

fun getCustomizationOverrideName(): String = getFeatureVariationForKey(CUSTOMIZATION_ARN_OVERRIDE_NAME)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we merge these 2 methods

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with a generic method

Comment on lines 128 to 126
private fun getFeatureVariationForKey(name: String): String =
featureConfigs[name]?.variation.orEmpty()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should have a generic one instead

private fun getFeature(k: String): FeatureContext = featureConfigs[k]

@rli rli merged commit 7fd65de into aws:main Nov 20, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants