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(gae): migrate regions adding gae_storage prefix #5070

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

OremGLG
Copy link
Contributor

@OremGLG OremGLG commented Jan 13, 2025

Description

Migrate regions in order to create an associate them with an oficial product

Fixes b/389070563

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

Checklist

  • I have followed Contributing Guidelines from CONTRIBUTING.MD
  • Tests pass: go test -v ./.. (see Testing)
  • Code formatted: gofmt (see Formatting)
  • Vetting pass: go vet (see Formatting)
  • 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)
  • 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

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 13, 2025
Copy link

@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 provide my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly understand the changes:

This pull request, submitted by OremGLG, aims to migrate regions and associate them with an official product. The core change involves adding the gae_storage prefix to various sections within the docs/appengine/storage/app.go file. This appears to be a refactoring effort to improve organization and potentially clarify the code's purpose.

Here's a breakdown of the changes:

  • File Modified: docs/appengine/storage/app.go
  • Changes: The primary modifications involve adding gae_storage prefixes to several comment blocks, specifically around import statements, functions for getting the default bucket, writing, reading, copying files, and listing buckets. This suggests a more structured approach to code comments and potentially aligns with a new product or naming convention.
    • Lines 18-19: Added //[START gae_storage_imports] and //[START imports]
    • Lines 36-37: Added //[END imports] and //[END gae_storage_imports]
    • Lines 72-73: Added //[START gae_storage_get_default_bucket] and //[START get_default_bucket]
    • Lines 80-81: Added //[END get_default_bucket] and //[END gae_storage_get_default_bucket]
    • Lines 133-134: Added //[START gae_storage_write] and //[START write]
    • Lines 161-162: Added //[END write] and //[END gae_storage_write]
    • Lines 164-165: Added //[START gae_storage_read] and //[START read]
    • Lines 190-191: Added //[END read] and //[END gae_storage_read]
    • Lines 193-194: Added //[START gae_storage_copy] and //[START copy]
    • Lines 210-211: Added //[END copy] and //[END gae_storage_copy]
    • Lines 252-253: Added //[START gae_storage_list_bucket] and //[START list_bucket]
    • Lines 273-274: Added //[END list_bucket] and //[END gae_storage_list_bucket]

The pull request also includes a checklist to ensure code quality and adherence to guidelines.

I'll provide a more detailed review shortly.

Meanwhile, a little verse to brighten your day:

Code flows like a river,
Prefixes guide its clear path,
Clarity's gentle grace.

Copy link

@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 migrates regions to associate them with an official product by adding the gae_storage prefix. The changes are well-structured and easy to understand. The approach of adding specific start and end tags for each region makes it clear which code blocks belong to which part of the documentation. The checklist is mostly complete, but needs the issue number added.

Comment on lines 18 to 19
//[START gae_storage_imports]
//[START imports]

Choose a reason for hiding this comment

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

low

While the gae_storage_imports region is helpful for organization, it might be redundant since the imports are already enclosed within the "imports" region. Consider removing the gae_storage_imports region to simplify the code.

//[START imports]
import (

@@ -67,6 +69,7 @@
return
}

//[START gae_storage_get_default_bucket]

Choose a reason for hiding this comment

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

low

Add a comment explaining the purpose of using file.DefaultBucketName(ctx).

@@ -126,6 +130,7 @@
}
}

// [START gae_storage_write]

Choose a reason for hiding this comment

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

low

Add a comment explaining the function of createFile and its parameters.


// [START gae_storage_read]

Choose a reason for hiding this comment

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

low

Add a comment explaining the function of readFile and its parameters.


// [START gae_storage_copy]

Choose a reason for hiding this comment

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

low

Add a comment explaining the function of copyFile and its parameters.

@@ -239,6 +249,7 @@
}
}

// [START gae_storage_list_bucket]

Choose a reason for hiding this comment

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

low

Add a comment explaining the function of listBucket.

@OremGLG OremGLG marked this pull request as ready for review January 15, 2025 20:20
@OremGLG OremGLG requested review from a team as code owners January 15, 2025 20:20
Copy link

snippet-bot bot commented Jan 15, 2025

No region tags are edited in this PR.

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

@telpirion telpirion self-assigned this Jan 16, 2025
Copy link
Collaborator

@telpirion telpirion left a comment

Choose a reason for hiding this comment

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

Make sure documentation is updated accordingly.

@OremGLG
Copy link
Contributor Author

OremGLG commented Jan 17, 2025

Make sure documentation is updated accordingly.

It is a frozen sample, according to @iennae "Migrate the region tag in the 'main' branch, but don't update frozen samples in those cases

Eg: GoogleCloudPlatform/python-docs-samples#13047

That's why I am not updating documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants