Skip to content

Add PrismObjectType tag to S3 objects#8

Merged
shimpeko merged 6 commits into
masterfrom
sk/add-s3-object-tag
May 21, 2025
Merged

Add PrismObjectType tag to S3 objects#8
shimpeko merged 6 commits into
masterfrom
sk/add-s3-object-tag

Conversation

@shimpeko
Copy link
Copy Markdown
Contributor

What:
This changes add PrismObjectType tag for each object type, live/delayed/merged to S3 objects.

Why:
To apply S3 lifecycle rules that targets each types.

For example, I'm planning to move merged objects to Amazon S3 Intelligent-Tiering storage class using lifecycle rule.

@shimpeko shimpeko force-pushed the sk/add-s3-object-tag branch 3 times, most recently from 2097dd7 to 386fd7d Compare April 17, 2025 12:45
@shimpeko shimpeko requested a review from Copilot April 17, 2025 12:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • shared/Dockerfile: Language not supported

@shimpeko shimpeko force-pushed the sk/add-s3-object-tag branch 3 times, most recently from 76bfbb0 to 2d76f35 Compare May 14, 2025 22:10
@shimpeko shimpeko requested review from Copilot and eagletmt May 14, 2025 22:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a new PrismObjectType tag to S3 objects to enable targeted lifecycle rules, and bumps various build and dependency settings.

  • Introduce createPutRequestWithTag helper and tag uploads as live, delayed, or merged.
  • Migrate Gradle dependencies from compile to implementation/api, upgrade Jib plugin, and bump Gradle wrapper.
  • Update Dockerfile to use Apache archive mirror for Hadoop downloads.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
stream/build.gradle Upgrade Jib plugin to 3.4.5 and switch from compile to implementation.
shared/src/main/java/com/cookpad/prism/objectstore/PrismObjectStore.java Add helper method for tagging and apply tags on live/delayed/merged put operations.
shared/build.gradle Apply java-library plugin and change dependencies from compile to api.
shared/Dockerfile Change Hadoop download URL to archive.apache.org mirror.
merge/build.gradle Upgrade Jib plugin to 3.4.5 and switch from compile to implementation.
gradlew Replace non‐POSIX /usr/bin/env sh startup with generated POSIX‐compliant script.
gradle/wrapper/gradle-wrapper.properties Bump Gradle distribution to 7.6.4 and add networkTimeout.
batch/build.gradle Upgrade Jib plugin to 3.4.5 and switch from compile to implementation.
Comments suppressed due to low confidence (2)

shared/src/main/java/com/cookpad/prism/objectstore/PrismObjectStore.java:33

  • [nitpick] Modifier ordering is inconsistent; using 'private final' is more idiomatic and improves readability.
final private AmazonS3 s3;

shared/src/main/java/com/cookpad/prism/objectstore/PrismObjectStore.java:66

  • Consider adding unit tests for createPutRequestWithTag and each put*ObjectFile method to verify that the correct tags are applied.
PutObjectRequest putRequest = createPutRequestWithTag(

Comment thread shared/src/main/java/com/cookpad/prism/objectstore/PrismObjectStore.java Outdated
Comment thread shared/src/main/java/com/cookpad/prism/objectstore/PrismObjectStore.java Outdated
@eagletmt
Copy link
Copy Markdown
Member

Could you split this pull request into two parts, one for the build fixes and one for the tagging, so that we can easily revert the changes separately?

@shimpeko shimpeko force-pushed the sk/add-s3-object-tag branch from 2d76f35 to 99f2eb9 Compare May 15, 2025 09:53
@shimpeko shimpeko changed the base branch from master to sk/fix-ci-failure May 15, 2025 09:59
@shimpeko shimpeko changed the base branch from sk/fix-ci-failure to master May 15, 2025 10:02
@shimpeko
Copy link
Copy Markdown
Contributor Author

#9

shimpeko added 5 commits May 19, 2025 11:21
What:
This changes add PrismObjectType tag for each object type,
live/delayed/merged to S3 objects.

Why:
To apply S3 lifecycle rules that targets each types.

For example, I'm planning to move merged objects to Amazon S3
Intelligent-Tiering storage class using lifecycle rule.
Test newly added createPutRequestWithTag() method through the
putLiveObjectFile().

Updated build.gradle to resolve log4j delegation loop.
ref. https://www.slf4j.org/codes.html#log4jDelegationLoop

Why the delegatoin loop started to happen? Because I have added test
case for method in a class which has @slf4j annotation. I'm not sure why
the error doesn't occur in running application.
@shimpeko shimpeko force-pushed the sk/add-s3-object-tag branch from 8c9dd91 to c8179b6 Compare May 19, 2025 10:31
@shimpeko
Copy link
Copy Markdown
Contributor Author

@eagletmt could you take a look?

@shimpeko
Copy link
Copy Markdown
Contributor Author

thank you for the review

@shimpeko shimpeko merged commit 774f6e2 into master May 21, 2025
4 checks passed
@shimpeko shimpeko deleted the sk/add-s3-object-tag branch May 21, 2025 09:11
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