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

chore(gae): migrate region taskqueue_host #5105

Conversation

OremGLG
Copy link
Contributor

@OremGLG OremGLG commented Jan 24, 2025

Description

Migrate region tag "taskqueue_host" by adding "gae_" prefix in order to associate it with an official GCP product.

Fixes
b/392110136

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

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, authored by OremGLG, aims to migrate the region tag taskqueue_host by adding the prefix gae_. This change is intended to better associate the tag with an official GCP product and addresses issue b/392110136.

Summary of Changes:

The primary change is within the file docs/appengine/taskqueue/taskqueue.go. Specifically, lines 63-71 have been modified. The existing // [START taskqueue_host] and // [END taskqueue_host] comments have been wrapped with new comments // [START gae_taskqueue_host] and // [END gae_taskqueue_host]. This effectively adds a gae_ prefix to the existing tag.

Checklist: The pull request includes a checklist indicating that tests, code formatting, and vetting have passed. However, there are some outstanding items related to API enabling, environment variables, and potential updates to CODEOWNERS and the blunderbuss.yml file.

I'll provide a more detailed review shortly, but this summary should give everyone a head start.

And now, a little haiku to lighten the mood:

Code flows like a stream,
Fixes found, a bug is slain,
Clean code, joy abounds.

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 24, 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.

This pull request migrates the region tag "taskqueue_host" by adding the "gae_" prefix. This change correctly addresses the issue and improves clarity by associating the tag with an official GCP product. The updated documentation now clearly distinguishes between the general "taskqueue_host" tag and the App Engine specific "gae_taskqueue_host" tag. No issues were found with the code changes themselves, and the documentation updates are accurate and helpful. The commit message clearly explains the purpose of the change, and the pull request description provides additional context and links to the relevant issue.

Comment on lines +63 to +71
// [START gae_taskqueue_host]
// [START taskqueue_host]
h := http.Header{}
h.Add("Host", "versionHostname")
task := taskqueue.Task{
Header: h,
}
// [END taskqueue_host]
// [END gae_taskqueue_host]

Choose a reason for hiding this comment

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

low

The Effective Go style guide recommends grouping related declarations together. Consider declaring the http.Header and taskqueue.Task closer to where they are used, or consider extracting this code snippet into a separate function for better organization. This will improve readability and make it easier to understand the purpose of this code snippet.

Suggested change
// [START gae_taskqueue_host]
// [START taskqueue_host]
h := http.Header{}
h.Add("Host", "versionHostname")
task := taskqueue.Task{
Header: h,
}
// [END taskqueue_host]
// [END gae_taskqueue_host]
// [START gae_taskqueue_host]
// [START taskqueue_host]
task := taskqueue.Task{
Header: http.Header{
"Host": []string{"versionHostname"},
},
}
// [END taskqueue_host]
// [END gae_taskqueue_host]

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

snippet-bot bot commented Jan 24, 2025

Here is the summary of changes.

You are about to add 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

@iennae iennae merged commit 7fd711d into GoogleCloudPlatform:main Jan 26, 2025
8 checks passed
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