Skip to content

chore: remove redundant region tags from GcsEvent POJOs#10275

Open
Kef131 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
Kef131:refactor(functions)--removing-redudant-region-tags-from-gscEvents
Open

chore: remove redundant region tags from GcsEvent POJOs#10275
Kef131 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
Kef131:refactor(functions)--removing-redudant-region-tags-from-gscEvents

Conversation

@Kef131
Copy link
Copy Markdown
Contributor

@Kef131 Kef131 commented Jun 2, 2026

Description

Fixes b/385748009

Removes the duplicate functions_helloworld_gcs_event region tags from the GcsEvent POJO files in both functions/imagemagick and functions/ocr/ocr-process-image

The file GcsEvent.java is used in the implementation of ImageMagick.java. However, its region tag is currently duplicated across multiple locations on repository.

Affected File Paths

The duplicate region tags are found in the following GcsEvent.java files:

  1. functions/helloworld/hello-gcs/src/main/java/functions/eventpojos/GcsEvent.java
  2. functions/ocr/ocr-process-image/src/main/java/functions/eventpojos/GcsEvent.java
  3. functions/imagemagick/src/main/java/functions/eventpojos/GcsEvent.java

in the case of functions/hello-gsc, it keeps a metadata reference on functions.txtpb which trigger an error if is removed.

Context and References

  • Status of ImageMagick.java: This file is not orphaned. Its region tags (functions_imagemagick_setup, functions_imagemagick_analyze, and functions_imagemagick_blur) are actively referenced by the 1st Generation ImageMagick Tutorial (imagemagick-1st-gen.md).
  • Reference Links:

Checklist

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR (No changes required since this only refactors comments/region tags in existing files)
  • [] These samples need a new API enabled in testing projects to pass (None)
  • [] These samples need a new/updated env vars in testing projects set to pass (None)
  • Tests pass: mvn clean verify required (Integration tests require configured GCS buckets and Vision API credentials in local testing. The codebase structure remains intact and CI will execute them with target credentials)
  • Lint passes: mvn -P lint checkstyle:check required (Both modified projects ran and passed with 0 checkstyle violations)
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only (No code logic was added or changed)
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample (N/A - modified existing files only)
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample (N/A)
  • Please merge this PR for me once it is approved

@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: cloudfunctions Issues related to the Cloud Run functions API. labels Jun 2, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-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.

Code Review

This pull request removes the functions_helloworld_gcs_event region tags from the GcsEvent.java files across multiple Cloud Functions samples, including hello-gcs, imagemagick, and ocr-process-image. There are no review comments, and I have no feedback to provide on these changes.

@Kef131 Kef131 marked this pull request as ready for review June 2, 2026 20:00
@Kef131 Kef131 requested review from a team and yoshi-approver as code owners June 2, 2026 20:00
@snippet-bot
Copy link
Copy Markdown

snippet-bot Bot commented Jun 2, 2026

Here is the summary of changes.

You are about to delete 2 region tags.

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

@Kef131 Kef131 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2026
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2026
@Kef131 Kef131 force-pushed the refactor(functions)--removing-redudant-region-tags-from-gscEvents branch from e6b5745 to 39c2af5 Compare June 2, 2026 20:39
Copy link
Copy Markdown
Contributor

@angelcaamal angelcaamal left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: cloudfunctions Issues related to the Cloud Run functions API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants