Repository navigation
HDDS-17707. Remove AWS SDK for Java v1 - #11939
Conversation
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
jojochuang
left a comment
There was a problem hiding this comment.
Separately, we can also remove aws cli v1 from ozone-runner docker image https://github.com/apache/ozone-docker-runner/blob/master/Dockerfile#L77
|
Thanks for porting the missing v1 coverage, especially the operation tests that weren’t equivalent to the similarly named ownership-header tests. I have a few compatibility and coverage concerns:
The public Freon helper changes ( |
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @yandrey321 for working on this.
AWS SDK is kept in prod only for 3 Freon classes:
hadoop-ozone/freon/src/main/java/org/apache/hadoop/ozone/freon/S3EntityGenerator.java
hadoop-ozone/freon/src/main/java/org/apache/hadoop/ozone/freon/S3KeyGenerator.java
hadoop-ozone/freon/src/main/java/org/apache/hadoop/ozone/freon/FreonS3TraceContextInterceptor.java
I think we should remove them and make AWS SDK test-only. These Freon generators can be replaced with third-party tools.
Also, we may keep SDK V1 in tests. Test dependencies are not part of the binary distribution, so there is no overhead or security risk. Either way is OK for me.
CC @ivandika3
|
opened apache/ozone-docker-runner#122 for ozone docker runner. |
|
@jojochuang addressed review comments:
Added compatibility notes in JIRA's release notes. |
|
@adoroszlai I think it would be safer and cleaner to remove aws sdk v1 from the code base. A complete ban is simpler and harder to get wrong. With v1 gone, the enforcer can ban
|
@yandrey321 You may have missed this. It's about making AWS SDK v2 test-only. |
|
@adoroszlai Lets open a follow up JIRA for removing aws sdk v2 usage from freon and moving it to test-only dependency. I'll pick it up as a follow up work item. |
That would mean undoing a whole lot of changes being made in this PR (license, notice, jar-report, pom, etc.). I prefer to do it in one step. |
|
@adoroszlai I removed aws sdk 2 usage from freon and made aws sdk 2 test only dependency. |
…dency Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @yandrey321 for updating the patch. I will need to check s3_om_fcq.robot changes, but the rest LGTM.
Will wait for feedback on the patch from others, including @chungen0126 @ivandika3 @peterxcli.
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @yandrey321 for the patch, LGTM.
@chungen0126 @ivandika3 @peterxcli would you like to take a look?
|
Thanks @yandrey321 for the patch, @chungen0126, @jojochuang for the review. |
What changes were proposed in this pull request?
Problem. AWS SDK for Java v1 is end of life, and Ozone still used it in two places:
ozone freon s3kgands3bg. Because of freon, the distribution shipsaws-java-sdk-core,aws-java-sdk-s3andaws-java-sdk-kms, plusjmespath-javaandjackson-dataformat-cbor.AbstractS3SDKV1Tests, about 3,200 lines.Change.
s3kg,s3bgand their base classS3EntityGenerator, with thetrace-context request handler they used.
ships no AWS SDK at all.
awsCLI or third-party S3 benchmark tools.s3/freon.robot, which only tested those commands, is removed;fcq/s3_om_fcq.robotuseds3kgonly to send S3 traffic through the gateway. It now uploads 100 small files withone
aws s3 cp --recursive, and checks that they all arrived before it checks the caller in the OM'sDecayRpcSchedulermetrics.AbstractS3SDKV2Testsfor the missing or partial coverage, in the areas listed underTesting.
integration-test-s3, and the
com.amazonawslogger entries in bothlog4j.propertiesfiles.ban-importsbanscom.amazonaws.**imports, in main and test code;ban-aws-sdk-v1execution (bannedDependencies) fails a module that depends on anycom.amazonawsartifact, even transitively.
jar-report.txtandLICENSE.txt.Key decisions.
NOTICEto the distribution, for twoload-generator commands.
something else (the expected-bucket-owner header), so their v1 counterparts were ported too:
testDeleteBucket,testListMultipartUploadsandtestListParts.ErrorType, andnullreturns where v2 already asserts the 412 or 404;doesBucketExist*.aws-java-sdk-bundlestays. It keeps Ranger's transitive v1 out, whichthe new dependency ban now requires anyway.
Side effects.
ozone freon s3kgandozone freon s3bgno longer exist. This is a user-facing change and needs a releasenote.
jmespath-javaandjackson-dataformat-cbor), none added.joda-timestays; other dependencies use it.share/ozone/libmust bring its own.Co-authored-by: Claude Opus 5.5 noreply@anthropic.com
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17707
How was this patch tested?
Unit + integration tests. CI: https://github.com/yandrey321/ozone/actions/runs/42002529466