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

feat: Support AbortIncompleteMultipartUpload LifecycleAction #1347

Merged
merged 7 commits into from
Jun 7, 2022

Conversation

sydney-munro
Copy link
Collaborator

Fixes #1339 ☕️

If you write sample code, please follow the samples format.

@sydney-munro sydney-munro requested a review from a team as a code owner April 7, 2022 23:05
@sydney-munro sydney-munro self-assigned this Apr 7, 2022
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Apr 7, 2022
@sydney-munro sydney-munro changed the title Support AbortIncompleteMultipartUpload LifecycleAction feat: Support AbortIncompleteMultipartUpload LifecycleAction Apr 7, 2022
@sydney-munro sydney-munro marked this pull request as draft April 7, 2022 23:07
@sydney-munro sydney-munro added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 7, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 7, 2022
@sydney-munro sydney-munro added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 7, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 7, 2022
@sydney-munro sydney-munro added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 8, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 8, 2022
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Apr 8, 2022
@sydney-munro sydney-munro marked this pull request as ready for review April 8, 2022 21:28
Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

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

One nit; otherwise LGTM

try {
assertEquals(AbortIncompleteMPUAction.TYPE, lifecycleRule.getAction().getActionType());
assertEquals(1, lifecycleRule.getCondition().getAge().intValue());
} finally {
Copy link
Member

Choose a reason for hiding this comment

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

ah interesting; didn't think of wrapping asserts with a try {} so you can do clean up afterwards, clever.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Apr 14, 2022
@sydney-munro sydney-munro requested a review from frankyn April 14, 2022 18:50
@@ -346,6 +351,9 @@ public void testLifecycleRules() {
setStorageClassLifecycleRule.getAction().getStorageClass());
assertTrue(setStorageClassLifecycleRule.getCondition().getIsLive());
assertEquals(10, setStorageClassLifecycleRule.getCondition().getNumNewerVersions().intValue());
assertTrue(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just added these in since I didn't see us testing all the cases of the fromPb switch statement.

Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @sydney-munro!

suztomo pushed a commit to suztomo/java-storage that referenced this pull request Apr 21, 2022
@sydney-munro sydney-munro requested a review from shaffeeullah May 13, 2022 18:17
@sydney-munro sydney-munro merged commit 7c3aba2 into main Jun 7, 2022
@sydney-munro sydney-munro deleted the abortmpu branch June 7, 2022 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support AbortIncompleteMultipartUpload LifecycleAction
4 participants