Skip to content

Conversation

@dhasani23
Copy link
Contributor

Problem

setMaven is being executed unnecessarily.

Solution

Move the call to happen just before the local build starts.


  • 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.

@dhasani23 dhasani23 requested review from a team as code owners January 16, 2025 22:21
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • 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.

await setMaven()
const versionInfo = await getVersionData()
const mavenVersionInfoMessage = `${versionInfo[0]} (${transformByQState.getMavenName()})`
telemetry.record({ buildSystemVersion: mavenVersionInfoMessage })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was always recording [undefined, undefined] since the user hasn't selected a project to transform at this point. Plus, we already emit this in the totalRunTime metric at the very end of a transformation anyway.

}

export async function prepareProjectDependencies(dependenciesFolder: FolderInfo, rootPomPath: string) {
await setMaven()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better to set the Maven to use (mvn, mvnw, mvnw.cmd) just before the local build happens to ensure we're using the correct Maven executable.

})
}
transformByQState.setPolledJobStatus(status)
getLogger().info(`CodeTransformation: polled job status = ${status}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: getLogger() now has a "topic" feature so you can do this at the top of the module:

const logger = getLogger('CodeTransformation')

then logger.info() will prepend the topic name.

@justinmk3 justinmk3 merged commit 4b47b04 into aws:master Jan 17, 2025
25 of 26 checks passed
karanA-aws pushed a commit to karanA-aws/aws-toolkit-vscode that referenced this pull request Jan 17, 2025
## Problem
`setMaven` is being executed unnecessarily.

## Solution
Move the call to happen just before the local build starts.
kevluu-aws pushed a commit to kevluu-aws/aws-toolkit-vscode that referenced this pull request Jan 23, 2025
## Problem
`setMaven` is being executed unnecessarily.

## Solution
Move the call to happen just before the local build starts.
chungjac pushed a commit to chungjac/aws-toolkit-vscode that referenced this pull request Jan 24, 2025
## Problem
`setMaven` is being executed unnecessarily.

## Solution
Move the call to happen just before the local build starts.
s7ab059789 pushed a commit to s7ab059789/aws-toolkit-vscode that referenced this pull request Feb 19, 2025
## Problem
`setMaven` is being executed unnecessarily.

## Solution
Move the call to happen just before the local build starts.
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