Skip to content

Conversation

@singhpk234
Copy link
Contributor

@singhpk234 singhpk234 commented Mar 3, 2023

Bumps AWS java sdk to latest version i.e 2.20.18

cc @jackye1995 @amogh-jahagirdar

@singhpk234
Copy link
Contributor Author

fix failures due to adobe/S3Mock#880, seems like sdk v2 since 2.18 updated.

There may be some behavior changes related to endpoint resolution as as the the endpoint resolution is now
standardised across SDKs so this release also bumps the minor version of the SDK to 2.18.

Notably, there are some changes in S3: when including and endpoint override, the SDK will use virtual bucket addressing as long as the bucket is a valid DNS label. This is different from the previous behavior where this only happens if the endpoint override begins with 's3'.

Will run AWS integration tests as well shortly if UNIT tests passes.

@nastra nastra self-requested a review March 4, 2023 08:51
@singhpk234 singhpk234 force-pushed the enhancement/bump-sdk-version branch from a4f82ed to 0f4f4cc Compare March 7, 2023 00:10
Arrays.asList("application/json"),
"User-Agent",
Arrays.asList("aws-sdk-java/2.17.257", "Linux/5.4.0-126")))
Arrays.asList("aws-sdk-java/2.20.16", "Linux/5.4.0-126")))
Copy link
Contributor

Choose a reason for hiding this comment

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

updating this isn't really necessary. When I wrote the test I just wanted to have some real headers :)

We can also just update this to have some random number if that's confusing people.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's perfectly fine :), In my case I just greped the existing version of sdk and replaced it !

@amogh-jahagirdar
Copy link
Contributor

The code changes look good to me but it looks like CI is failing, it looks like we're missing passing the part number here https://github.com/apache/iceberg/blame/50863d7c028ea36c4cfb5d857f1324f7f978e579/aws/src/test/java/org/apache/iceberg/aws/s3/signer/TestS3RestSigner.java#L180

@nastra
Copy link
Contributor

nastra commented Mar 7, 2023

it looks like 2.20.18 is now available, should we upgrade to that version?

@singhpk234 singhpk234 force-pushed the enhancement/bump-sdk-version branch from 0f4f4cc to c0d391b Compare March 7, 2023 19:12
@singhpk234
Copy link
Contributor Author

Thanks @amogh-jahagirdar, the S3Signer is failing for the same have updated the partNumber, The S3FileIO / S3InputStream / S3OutputStream were also failing, i have added a hacky fix, basically earlier even if we wanted to create a bucket when there was already an existing bucket with same name it use to pass some how (talking of @before annotation), now it fails which is kind of expected, the tricky part is I tried @BeforeClass as well but seems like it has port finding issue and was consistently failing in my local. For now I have explicitly catched the bucket exists exception (will think of a more cleaner fix, all suggestions are welcomed :)) !

@singhpk234
Copy link
Contributor Author

it looks like 2.20.18 is now available, should we upgrade to that version?

Definitely @nastra ! Thanks for calling this out, have updated the pr with the same.

@singhpk234 singhpk234 changed the title AWS: bump aws sdk version to 2.20.16 AWS: bump aws sdk version to 2.20.18 Mar 7, 2023
}

@Test
@Ignore
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ignored the test for the meanwhile it's failing with, will get back to it

software.amazon.awssdk.services.s3.model.NoSuchUploadException: The specified multipart upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed. (Service: S3, Status Code: 404, Request ID: 174A3A53489A348F)

Copy link
Contributor Author

@singhpk234 singhpk234 Mar 7, 2023

Choose a reason for hiding this comment

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

needed to modify this test as this test was using a random upload id rather than the one which we got from creating a multipart upload.

@singhpk234 singhpk234 force-pushed the enhancement/bump-sdk-version branch from 0023281 to 884ed33 Compare March 7, 2023 22:21
testImplementation "org.apache.httpcomponents.client5:httpclient5"
testImplementation 'org.mock-server:mockserver-netty'
testImplementation 'org.mock-server:mockserver-client-java'
testImplementation 'javax.xml.bind:jaxb-api'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

required by s3 mock now

Copy link
Contributor

@jackye1995 jackye1995 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing all the test failures!!

Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar left a comment

Choose a reason for hiding this comment

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

Thanks LGTM!

@nastra nastra added this to the Iceberg 1.2.0 milestone Mar 8, 2023
@jackye1995
Copy link
Contributor

Given this is just a version bump and all tests passed, I will go ahead to merge it without waiting for more approvals. Thanks everyone for the review! @amogh-jahagirdar @nastra , and thanks @singhpk234 for fixing all the breaking tests!

@jackye1995 jackye1995 merged commit ccb82f7 into apache:master Mar 8, 2023
krvikash pushed a commit to krvikash/iceberg that referenced this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants