Skip to content

Commit 722d36a

Browse files
committed
fix(feature dev): adding required files to upload for execution engine
1 parent 4d9bb7e commit 722d36a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ class FeatureDevSessionContextTest : FeatureDevTestBase(HeavyJavaCodeInsightTest
9696
"License.md",
9797
"node_modules/express",
9898
"build/outputs",
99-
"dist/bundle.js"
99+
"dist/bundle.js",
100+
"gradle/wrapper/gradle-wrapper.jar",
100101
)
101102

102103
val zipResult = featureDevSessionContext.getProjectZip(false)
@@ -120,6 +121,7 @@ class FeatureDevSessionContextTest : FeatureDevTestBase(HeavyJavaCodeInsightTest
120121
"builder/GetTestBuilder.java",
121122
"settings.gradle",
122123
"build.gradle",
124+
"gradle/wrapper/gradle-wrapper.jar",
123125
)
124126

125127
assertTrue(zippedFiles == expectedFiles)

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/FeatureDevSessionContext.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class RepoSizeLimitError(override val message: String) : RuntimeException(), Rep
4747
class FeatureDevSessionContext(val project: Project, val maxProjectSizeBytes: Long? = null) {
4848
// TODO: Need to correct this class location in the modules going further to support both amazonq and codescan.
4949

50+
private val requiredFilesForExecution = setOf("gradle/wrapper/gradle-wrapper.jar")
5051
private val additionalGitIgnoreRules = setOf(
5152
".aws-sam",
5253
".gem",
@@ -136,6 +137,9 @@ class FeatureDevSessionContext(val project: Project, val maxProjectSizeBytes: Lo
136137
suspend fun ignoreFile(file: VirtualFile): Boolean = ignoreFile(file.presentableUrl)
137138

138139
suspend fun ignoreFile(path: String): Boolean {
140+
if (requiredFilesForExecution.any { path.endsWith(it) }) {
141+
return false
142+
}
139143
// this method reads like something a JS dev would write and doesn't do what the author thinks
140144
val deferredResults = ignorePatternsWithGitIgnore.map { pattern ->
141145
withContext(coroutineContext) {

0 commit comments

Comments
 (0)