Skip to content

Conversation

@laileni-aws
Copy link
Contributor

Problem

  • In /test, sometimes target source file is not being collected as part of zip and this is causing the backend to fail.

Solution

  • Adding target source file to the zip before traversing the repository.

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions
Copy link

  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@laileni-aws laileni-aws marked this pull request as ready for review February 19, 2025 01:10
@laileni-aws laileni-aws requested review from a team as code owners February 19, 2025 01:10
@laileni-aws laileni-aws enabled auto-merge (squash) February 19, 2025 01:13
@ctlai95 ctlai95 changed the title fix(amazonq): Adding target source file to the zip before traversing the respository fix(amazonq): Adding target source file to the zip before traversing the repository Feb 19, 2025
Comment on lines +367 to +383
const relativePath = getWorkspaceRelativePath(filePath, { workspaceFolders })

if (relativePath) {
const fileStat = await fs.stat(targetUri)

const fileContent = await readFile(targetUri)
if (fileContent !== undefined) {
totalSizeBytes += fileStat.size
storage.push({
workspaceFolder: relativePath.workspaceFolder,
relativeFilePath: relativePath.relativePath,
fileUri: targetUri,
fileContent: fileContent,
zipFilePath: prefixWithFolderPrefix(relativePath.workspaceFolder, relativePath.relativePath),
})
}
}
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 probably simplify this since you do the same thing in lines 402-429

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please de-dup this code

auto-merge was automatically disabled February 19, 2025 21:19

Pull request was closed

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.

4 participants