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

Migration tool ObjectMetadata transforms #5970

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidh44
Copy link
Contributor

Motivation and Context

Add transforms for ObjectMetadata setters, moving them to PutObjectRequest, and pass ContentLength to RequestBody

ContentLength
ContentEncoding
ContentType
ContentLanguage
CacheControl
ContentDisposition
ContentMD5
SSEAlgorithm
ServerSideEncryption
SSECustomerKeyMd5
BucketKeyEnabled

TODO in follow up PRs:

  • Remove ObjectMetadata instantiation (transformed to HeadObjectRespoonse)
  • Support transforms for remaining setters which are feasible:
ExpirationTimeRuleId
OngoingRestore
RequesterCharged

setHeader
addUserMetadata

(Date to Instant)
LastModified
HttpExpiresDate
ExpirationTime
RestoreExpirationTime

Modifications

Updated JavaIsoVisitor to JavaVisitor in S3PutObjectRequestToV2 in order to return a statement:

from:
request.setMetadata(metadata);

to:
request = request.toBuilder().setXX(..).setYY(..).build();

Testing

added end to end tests

@davidh44 davidh44 requested a review from a team as a code owner March 18, 2025 17:56
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

1 participant