Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(amazonq): java21 support #6414

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

dhasani23
Copy link
Contributor

Problem

Support transformations to Java 21.

Solution

Add support.


  • 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 22, 2025 20:45
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.

@dhasani23
Copy link
Contributor Author

TO-DO: add changelog

@@ -483,6 +483,11 @@ export class GumbyController {
message.tabID
)

if (fromJDKVersion === JDKVersion.JDK21 && toJDKVersion === JDKVersion.JDK17) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why block this but allow other downgrades? e.g. 21 -> 11

Copy link
Contributor Author

@dhasani23 dhasani23 Jan 23, 2025

Choose a reason for hiding this comment

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

Only this one is possible

The source Java versions we show in dropdown form are: 8, 11, 17, 21
The target Java versions we show in dropdown form are: 17, 21

So the only downgrade possible for user to select is 21 -> 17

Copy link
Contributor

Choose a reason for hiding this comment

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

So in other words you don't allow downgrades. This is a confusing if statement if that is the original intent, can we maybe check that source version is not >= target version? Or a comment at the very least.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added comment

Copy link
Contributor

Choose a reason for hiding this comment

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

Added another comment to make it more specific but after that LGTM

@@ -22,9 +22,12 @@ export const AWSTemplateKeyWords = ['AWSTemplateFormatVersion', 'Resources', 'AW

export const AWSTemplateCaseInsensitiveKeyWords = ['cloudformation', 'cfn', 'template', 'description']

// TO-DO: make sure all Strings look good for Java 21
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you still working on this TODO or did we just want to keep it in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strings should be good, will remove this comment when confirmed

'This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks.',
'This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks in Java 17.',
'Prepare minimal upgrade to Java 21':
'This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks in Java 21.',
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't looked at the closures for java 21 (I can look), but assuming they make the same corresponding upgrades as the first patch for java 17

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes will confirm, but that should be true

@@ -436,6 +436,9 @@ export async function zipCode(
export async function startJob(uploadId: string) {
const sourceLanguageVersion = `JAVA_${transformByQState.getSourceJDKVersion()}`
const targetLanguageVersion = `JAVA_${transformByQState.getTargetJDKVersion()}`
// TO-DO: remove these logs statements
console.log('sourceLanguageVersion', sourceLanguageVersion)
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming you'll be removing these

Copy link
Contributor

Choose a reason for hiding this comment

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

Oops I just saw the GitHub comments my bad!

@dhasani23 dhasani23 marked this pull request as draft January 24, 2025 23:09
@dhasani23
Copy link
Contributor Author

Need to receive confirmation that backend is ready for Java 21, so converting this PR to draft so that it is not accidentally merged, but it is ready.

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