Skip to content

Commit 457f21b

Browse files
authored
Merge branch 'main' into manodnyb/addEnvVarsToRunTests
2 parents e5d91fd + ab9f5bc commit 457f21b

File tree

10 files changed

+50
-18
lines changed

10 files changed

+50
-18
lines changed

.changes/3.61.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"date" : "2025-03-27",
3+
"version" : "3.61",
4+
"entries" : [ {
5+
"type" : "feature",
6+
"description" : "Amazon Q: Moved \"Include suggestions with code references\" setting to General"
7+
}, {
8+
"type" : "feature",
9+
"description" : "Add support for 2025.1"
10+
}, {
11+
"type" : "bugfix",
12+
"description" : "Amazon Q: Attempt to reduce thread pool contention locking IDE caused by `@workspace` making a large number of requests"
13+
}, {
14+
"type" : "deprecation",
15+
"description" : "An upcoming release will remove support for JetBrains Gateway version 2024.3 and for IDEs based on the 2024.1 platform"
16+
} ]
17+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Gracefully handle additional fields in Amazon Q /dev code generation result without throwing errors"
4+
}

.changes/next-release/bugfix-e06391bd-f5ae-4c2a-a102-580d30f3be8d.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.changes/next-release/deprecation-90102050-86a4-4c19-9ecc-70c6e033b949.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.changes/next-release/feature-45f6e6a7-fc5b-4b14-89e2-0d9a2b138c65.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.changes/next-release/feature-c88b1af5-2318-4ca3-903c-a289e5494b1d.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# _3.61_ (2025-03-27)
2+
- **(Feature)** Amazon Q: Moved "Include suggestions with code references" setting to General
3+
- **(Feature)** Add support for 2025.1
4+
- **(Bug Fix)** Amazon Q: Attempt to reduce thread pool contention locking IDE caused by `@workspace` making a large number of requests
5+
- **(Deprecation)** An upcoming release will remove support for JetBrains Gateway version 2024.3 and for IDEs based on the 2024.1 platform
6+
17
# _3.60_ (2025-03-20)
28
- **(Feature)** AmazonQ /test now displays a concise test plan summary to users.
39
- **(Bug Fix)** Fix inline completion failure due to context length exceeding the threshold

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# Toolkit Version
5-
toolkitVersion=3.61-SNAPSHOT
5+
toolkitVersion=3.62-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/util/FeatureDevService.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
package software.aws.toolkits.jetbrains.services.amazonqFeatureDev.util
55

6+
import com.fasterxml.jackson.databind.DeserializationFeature
67
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
78
import com.fasterxml.jackson.module.kotlin.readValue
89
import com.intellij.openapi.project.Project
@@ -37,6 +38,9 @@ import software.aws.toolkits.telemetry.Result
3738
private val logger = getLogger<FeatureDevClient>()
3839

3940
class FeatureDevService(val proxyClient: FeatureDevClient, val project: Project) {
41+
private val objectMapper = jacksonObjectMapper()
42+
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
43+
4044
fun createConversation(): String {
4145
val startTime = System.currentTimeMillis()
4246
var failureReason: String? = null
@@ -238,7 +242,7 @@ class FeatureDevService(val proxyClient: FeatureDevClient, val project: Project)
238242
val parsedResult: ExportTaskAssistResultArchiveStreamResult
239243
try {
240244
val result = exportResponse.reduce { acc, next -> acc + next } // To map the result it is needed to combine the full byte array
241-
parsedResult = jacksonObjectMapper().readValue(result)
245+
parsedResult = objectMapper.readValue(result)
242246
} catch (e: Exception) {
243247
logger.error(e) { "Failed to parse downloaded code results" }
244248
throw ExportParseException(operation = FeatureDevOperation.ExportTaskAssistArchiveResult.toString(), desc = null, e.cause)

plugins/amazonq/chat/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/util/FeatureDevServiceTest.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,23 @@ class FeatureDevServiceTest : FeatureDevTestBase() {
351351
}.isExactlyInstanceOf(ExportParseException::class.java)
352352
}
353353

354+
@Test
355+
fun `test exportTaskAssistArchiveResult ignore extra fields in the response`() {
356+
runTest {
357+
val codeGenerationJson = "{" +
358+
"\"code_generation_result\":{\"new_file_contents\":{\"test.ts\":\"contents\"},\"deleted_files\":[],\"references\":[],\"extra_filed\":[]}" +
359+
"}"
360+
361+
whenever(featureDevClient.exportTaskAssistResultArchive(testConversationId)).thenReturn(mutableListOf(codeGenerationJson.toByteArray()))
362+
363+
val actual = featureDevService.exportTaskAssistArchiveResult(testConversationId)
364+
assertThat(actual).isInstanceOf(CodeGenerationStreamResult::class.java)
365+
assertThat(actual.new_file_contents).isEqualTo(mapOf(Pair("test.ts", "contents")))
366+
assertThat(actual.deleted_files).isEqualTo(emptyList<String>())
367+
assertThat(actual.references).isEqualTo(emptyList<CodeReferenceGenerated>())
368+
}
369+
}
370+
354371
@Test
355372
fun `test exportTaskAssistArchiveResult returns correct parsed result`() =
356373
runTest {

0 commit comments

Comments
 (0)