Skip to content

Bumping openrewrite to 3.6.1 #6040

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

Closed

Conversation

greg-at-moderne
Copy link
Contributor

@greg-at-moderne greg-at-moderne commented Apr 16, 2025

Bumping OpenRewrite to 3.6.1 of (rewrite-recipe-bom), which actually uses OpenRewrite v8.50.2.

Motivation and Context

To make sure AWS customers and OpenRewrite users can use the latest of OpenRewrite.

Testing

  • mvn install worked
  • also I have executed:
mvn org.openrewrite.maven:rewrite-maven-plugin:dryRun \ 
  -Drewrite.recipeArtifactCoordinates=software.amazon.awssdk:v2-migration:2.31.23-SNAPSHOT-PREVIEW \
  -Drewrite.activeRecipes=software.amazon.awssdk.v2migration.AwsSdkJavaV1ToV2

against a third-party project using AWS SDK v1 and it worked. A reasonable patch was generated, no errors were observed.

Screenshots (if appropriate)

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Not sure what to select here.

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@greg-at-moderne greg-at-moderne requested a review from a team as a code owner April 16, 2025 09:27
@timtebeek
Copy link

As a quick heads up you'll want to look at these lines:

newMethodName: awsErrorDetails().errorCode
- org.openrewrite.java.ChangeMethodName:
methodPattern: com.amazonaws.AmazonServiceException getServiceName()
newMethodName: awsErrorDetails().serviceName
- org.openrewrite.java.ChangeMethodName:
methodPattern: com.amazonaws.AmazonServiceException getErrorMessage()
newMethodName: awsErrorDetails().errorMessage
- org.openrewrite.java.ChangeMethodName:
methodPattern: com.amazonaws.AmazonServiceException getStatusCode()
newMethodName: awsErrorDetails().sdkHttpResponse().statusCode
### TODO: v2 returns Map<String, List<String>>. Convert it to Map<String, String>
- org.openrewrite.java.ChangeMethodName:
methodPattern: com.amazonaws.AmazonServiceException getHttpHeaders()
newMethodName: awsErrorDetails().sdkHttpResponse().headers
- org.openrewrite.java.ChangeMethodName:
methodPattern: com.amazonaws.AmazonServiceException getRawResponse()
newMethodName: awsErrorDetails().rawResponse().asByteArray
- org.openrewrite.java.ChangeMethodName:
methodPattern: com.amazonaws.AmazonServiceException getRawResponseContent()
newMethodName: awsErrorDetails().rawResponse().asUtf8String

Following this recent validation step

@Fred1155
Copy link
Contributor

Hi the mvn clean install -P quick -pl :v2-migration-tests will fail for this version with the below error: error: package org.apache.commons.io does not exist.

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.

5 participants