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

fix(storagetransfer): deleted old region tags (all) #9939

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

Conversation

OremGLG
Copy link
Contributor

@OremGLG OremGLG commented Dec 30, 2024

Description

Delete old region tag "all"

Fixes b/347826316

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

@OremGLG OremGLG requested review from yoshi-approver and a team as code owners December 30, 2024 16:29
Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi team,

I'm currently reviewing this pull request and will have a full review ready in a few minutes. In the meantime, here's a quick summary to help you and other reviewers get up to speed:

This pull request, submitted by OremGLG, aims to clean up the java-docs-samples repository by removing outdated region tags. Specifically, it removes the now-obsolete "all" region tag from the storage-transfer sample's test files (TransferJobUtils.java).

Here's a breakdown of the changes:

  • Files Affected:
    • storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/util/TransferJobUtils.java
      • Removed the // [START all] and // [END all] comments from lines 17-18 and 71-72 respectively. This removes the old region tag that is no longer relevant.

The intent is to improve code clarity and maintainability by removing redundant and outdated code comments. The changes are straightforward and well-documented.

Short poem for your enjoyment:

Old tags removed with care,
Code now cleaner, fresh, and fair.
Review's swift and bright,
Happy coding, day and night!

Thanks,
Gemini

@product-auto-label product-auto-label bot added api: storagetransfer Issues related to the Storage Transfer Service API. samples Issues that are directly related to samples. labels Dec 30, 2024
Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request removes the outdated region tag "all", which is a good change. The checklist is appropriately filled out. Since a style guide wasn't explicitly provided, I'm defaulting to the Google Java Style Guide.

One small suggestion is to add a brief comment explaining why the all tag was removed, for future reference. This will improve the maintainability of the codebase.

@@ -15,7 +15,6 @@
*/

// [START storagetransfer_transfer_all]
Copy link
Contributor

Choose a reason for hiding this comment

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

low

It's great that you removed the outdated all region tag! To improve maintainability, consider adding a brief comment explaining the reason for its removal. This will help future developers understand the change. Per the Google Java Style Guide, comments should be clear and concise, explaining the why, not the what. For example, you could add a comment like // Removed outdated 'all' region tag (see b/347826316).

Suggested change
// [START storagetransfer_transfer_all]
// Removed outdated 'all' region tag (see b/347826316)
// [START storagetransfer_transfer_all]

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi team,

I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, here's a quick summary to get everyone up to speed:

This pull request, submitted by OremGLG, aims to clean up the java-docs-samples repository by removing outdated region tags. Specifically, it removes the now-obsolete "all" region tag from the storage-transfer sample's test files (TransferJobUtils.java).

Here's a breakdown of the changes:

  • Files Affected:
    • storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/util/TransferJobUtils.java : The "all" tag was removed from lines 18 and 71. This removes the old tag and cleans up the code.

The intent is to improve code clarity and maintainability by removing redundant or outdated comments. The change directly addresses issue b/347826316.

Short and sweet, a haiku to greet:

Old tags now removed,
Code cleaner, bright and new,
Review's swift and done.

Thanks,
Gemini

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request correctly removes the outdated region tag "all" and cleans up the associated start and end tags. The provided checklist is also comprehensive and accurately filled. This change improves code clarity and maintainability. The PR is ready to merge. I've referenced the Sample Format Guide linked in the PR description in this review.

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi OremGLG and reviewers,

I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, here's a quick summary to get everyone up to speed:

This pull request aims to fix issue b/347826316 by removing outdated region tags. Specifically, the "all" tag has been deleted from the storage-transfer samples.

Here's a breakdown of the changes:

  • storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/util/TransferJobUtils.java: This file had two instances of the // [START all] and // [END all] comments removed. These comments were likely placeholders for a previous implementation and are no longer needed.
    • Lines 17-18 (before) and 17-18 (after) show the removal of // [START all]
    • Lines 68-71 (before) and 69-70 (after) show the removal of // [END all]

The changes are straightforward and appear to correctly address the issue. The removal of the outdated comments improves code clarity.


And now, a little haiku to lighten the mood:

Old tags now removed,
Code cleaner, bright and new,
Review's swift and done.

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request removes the outdated region tag "all" from the storage-transfer sample code. The changes are minimal and correct. The checklist is also appropriately filled out. It looks like the changes adhere to the Sample Format Guide as specified in the PR description.

I've summarized the referenced elements from the style guide below:

  • Comment Tags: The removal of the all tag adheres to the guide's recommendation to use specific region tags (though not explicitly stated, the removal implies a focus on specific regions over a general "all" tag).

Overall, the changes are small, focused, and improve the clarity of the code. I recommend merging this PR after addressing the minor suggestions below.

@@ -68,5 +67,4 @@ public static TimeOfDay createTimeOfDay(String timeString)
return time;
}
}
// [END all]
// [END storagetransfer_transfer_all]
Copy link
Contributor

Choose a reason for hiding this comment

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

low

While the removal of the [END all] tag is correct, ensure there are no other unintended changes in this file or other related files due to the removal of this global tag. Sometimes, global tags are used for broader code organization, and their removal might have unforeseen consequences. Double-check to ensure everything related to the removal of the "all" tag has been addressed.

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi team,

I'm currently reviewing this pull request and will have a full review ready in a few minutes. In the meantime, here's a quick summary to get everyone up to speed:

This pull request, submitted by OremGLG, aims to clean up the java-docs-samples repository by removing outdated region tags. Specifically, it removes the now-obsolete "all" region tag from the storage-transfer samples. The changes are focused on removing these tags from the TransferJobUtils.java file. The intent is to improve code clarity and maintainability by removing redundant or obsolete code.

Here's a breakdown of the changes:

  • Files Changed:
    • storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/util/TransferJobUtils.java:
      • Removed the // [START all] and // [END all] comments from lines 17-18 and 71-72 respectively. This removes the old region tag from the code.

The pull request addresses issue b/347826316.

And now, a little haiku to lighten the mood:

Old tags now removed,
Code cleaner, bright, and new,
Joy in the review.

Thanks,
Gemini

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request removes the outdated region tag "all", which is a good cleanup. The changes are minimal and straightforward. The checklist is also appropriately filled. I've summarized the style guide elements I referenced below.

Google Java Style Guide Reference:

  • Javadoc comments: I've checked for the presence and completeness of Javadoc comments, especially for public methods.

I didn't find any issues with the current changes, but I have a minor suggestion below.

@@ -15,7 +15,6 @@
*/

// [START storagetransfer_transfer_all]
Copy link
Contributor

Choose a reason for hiding this comment

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

low

Since the all tag is being removed, it might be a good idea to add a comment explaining why this tag is being removed and what it was used for previously. This will help future maintainers understand the history of the code. Per the Google Java Style Guide, Javadoc is preferred for documenting classes and methods.

Suggested change
// [START storagetransfer_transfer_all]
// [START storagetransfer_transfer_all]
// The region tag "all" is removed as it is no longer used. It was previously used for ...

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi team,

I'm currently reviewing this pull request and will have a full review ready in a few minutes. In the meantime, here's a quick summary to get everyone up to speed:

This pull request, submitted by OremGLG, aims to clean up the java-docs-samples repository by removing outdated region tags. Specifically, it removes the now-obsolete "all" region tag from the storage-transfer sample's test files (TransferJobUtils.java).

Here's a breakdown of the changes:

  • Files Affected:
    • storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/util/TransferJobUtils.java : This file had two instances of the "all" tag, one at lines 17-18 and another at line 71. These lines have been removed in this PR.

The intent is to improve code clarity and maintainability by removing redundant or obsolete code. The removal of the "all" tag likely reflects a change in the underlying Google Cloud Storage Transfer Service API or best practices.

If there's anything unclear or if you need more details, let me know!

And now, a little haiku to lighten the mood:

Old tags now removed,
Code cleaner, bright, and new,
Reviewing is fun!

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request correctly removes the outdated region tag "all" as requested in the linked issue. The changes are minimal and appear correct. The checklist is also appropriately filled out. Since the change only involves deleting a region tag, there are no correctness, efficiency, security, or maintainability concerns related to the code logic itself. The Sample Format Guide you linked was referenced in this review.

One small suggestion is to double-check if any other instances of the all region tag exist elsewhere in the codebase and remove them for consistency.

@@ -15,7 +15,6 @@
*/

// [START storagetransfer_transfer_all]
Copy link
Contributor

Choose a reason for hiding this comment

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

low

According to the Sample Format Guide, region tags should be in the format [START product_region_shortdesc] and [END product_region_shortdesc]. While removing all is correct, is the storagetransfer_transfer_all tag sufficient on its own, or is there a more specific region that applies to this code snippet? Consider adding a more specific region tag if applicable. I'm making this suggestion based on the Sample Format Guide you linked in the PR description.

Copy link

snippet-bot bot commented Dec 30, 2024

Here is the summary of changes.

You are about to delete 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storagetransfer Issues related to the Storage Transfer Service API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants