Skip to content
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

Change logic for customization override to not override if user has manually selected a customization #5231

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

spfink
Copy link
Contributor

@spfink spfink commented Jan 7, 2025

Types of changes

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

Description

Changes the logic for when a customization will be overridden if the user is part of an AB group that has a customization override. With this change, if the user has manually selected a customization, it will not be overridden by the AB customization.

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 January 7, 2025 18:11
@spfink spfink force-pushed the finks/default-custom branch from a4619da to 31d7927 Compare January 7, 2025 19:00
if (selectedCustomization != null) {
return selectedCustomization
} else {
val customizationFeature = CodeWhispererFeatureConfigService.getInstance().getCustomizationFeature()
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we rename the variable to be val customizationOverride = ...

@@ -113,17 +113,37 @@ class CodeWhispererModelConfiguratorTest {
}

@Test
fun `should override customization arn if there is one under AB test`() {
fun `should not override customization arn if there is one under AB test and manual selection has not been made`() {
Copy link
Contributor

Choose a reason for hiding this comment

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

is it supposed to should not override ... and manual selection has been made

@Will-ShaoHua Will-ShaoHua self-requested a review January 7, 2025 19:42
@spfink spfink force-pushed the finks/default-custom branch from 31d7927 to 09a5ec6 Compare January 7, 2025 20:09
@spfink spfink force-pushed the finks/default-custom branch from 09a5ec6 to 4accc9e Compare January 7, 2025 20:50
@manodnyab manodnyab enabled auto-merge (squash) January 7, 2025 23:10
@manodnyab manodnyab merged commit 2e39dc0 into aws:main Jan 7, 2025
11 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