Skip to content

Commit 69c7f49

Browse files
committed
address comments and fix tests
1 parent 71e10da commit 69c7f49

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/customization/CodeWhispererModelConfigurator.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class DefaultCodeWhispererModelConfigurator : CodeWhispererModelConfigurator, Pe
7676

7777
private val hasShownNewCustomizationNotification = AtomicBoolean(false)
7878

79+
@Deprecated("Use customizationArnOverrideV2 for the latest arn override persistence")
7980
private var serviceDefaultArn: String? = null
8081

8182
private var customizationArnOverrideV2: String? = null
@@ -299,6 +300,7 @@ class CodeWhispererCustomizationState : BaseState() {
299300
@get:MapAnnotation
300301
val previousAvailableCustomizations by map<String, MutableList<String>>()
301302

303+
@Deprecated("Use customizationArnOverrideV2 for the latest arn override persistence")
302304
@get:Property
303305
var serviceDefaultArn by string()
304306

plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererModelConfiguratorTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ class CodeWhispererModelConfiguratorTest {
421421
)
422422
)
423423

424-
this.serviceDefaultArn = "arn:aws:codewhisperer:default"
424+
this.customizationArnOverrideV2 = "arn:aws:codewhisperer:default"
425425
}
426426

427427
XmlSerializer.serializeInto(state, element)
@@ -470,7 +470,7 @@ class CodeWhispererModelConfiguratorTest {
470470
val actual = XmlSerializer.deserialize(element, CodeWhispererCustomizationState::class.java)
471471
assertThat(actual.connectionIdToActiveCustomizationArn).hasSize(0)
472472
assertThat(actual.previousAvailableCustomizations).hasSize(0)
473-
assertThat(actual.serviceDefaultArn).isNull()
473+
assertThat(actual.customizationArnOverrideV2).isNull()
474474
}
475475

476476
@Test
@@ -509,7 +509,7 @@ class CodeWhispererModelConfiguratorTest {
509509
"""
510510
)
511511
val actual = XmlSerializer.deserialize(element, CodeWhispererCustomizationState::class.java)
512-
assertThat(actual.serviceDefaultArn).isEqualTo("arn:aws:codewhisperer:default")
512+
assertThat(actual.customizationArnOverrideV2).isEqualTo("arn:aws:codewhisperer:default")
513513
assertThat(actual.connectionIdToActiveCustomizationArn).hasSize(1)
514514
assertThat(actual.connectionIdToActiveCustomizationArn["fake-sso-url"]).isEqualTo(
515515
CodeWhispererCustomization(
@@ -546,7 +546,7 @@ class CodeWhispererModelConfiguratorTest {
546546
)
547547
val actual = XmlSerializer.deserialize(element, CodeWhispererCustomizationState::class.java)
548548
assertThat(actual.connectionIdToActiveCustomizationArn).hasSize(0)
549-
assertThat(actual.serviceDefaultArn).isNull()
549+
assertThat(actual.customizationArnOverrideV2).isNull()
550550
assertThat(actual.previousAvailableCustomizations).hasSize(1)
551551
assertThat(actual.previousAvailableCustomizations["fake-sso-url"]).isEqualTo(listOf("arn_1", "arn_2", "arn_3"))
552552
}

0 commit comments

Comments
 (0)