Skip to content

chore(AnalyticsData): remove orphaned files from previous proto refactors - #9521

Open
sofisl wants to merge 1 commit into
mainfrom
chore/remove-orphaned-analytics-data-files
Open

chore(AnalyticsData): remove orphaned files from previous proto refactors#9521
sofisl wants to merge 1 commit into
mainfrom
chore/remove-orphaned-analytics-data-files

Conversation

@sofisl

@sofisl sofisl commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

This PR removes legacy/orphaned PHP files in AnalyticsData that no longer correspond to upstream googleapis definitions.

Historically, when proto files or messages were renamed/moved in googleapis, the PHP generator (via OwlBot) successfully generated the new files but failed to delete the old ones, leaving dead code in the repository. We discovered these while testing the new Librarian migration tool, which strictly cleans output directories and correctly flags these as deletions.

Evidence & Tracing:

  • Origin: Generated from google/analytics/data/v1alpha/analytics_data_api.proto.
  • The Change: In googleapis commit 97bcfbd777f7cdac49a5ee0c00ef6553000826ef, the upstream team explicitly removed the SheetExportAudienceList method and its associated resources.
  • Result: OwlBot correctly removed these from the generated client methods and protobuf metadata, but left behind the old PHP class files and samples.

Safety / Backwards Compatibility Note:
Any customer code attempting to use these deleted classes is already broken and crashing in production.
Because the upstream .proto definitions were removed, the protobuf compiler previously removed these classes from the generated GPBMetadata descriptor pool. Because OwlBot left the PHP class files behind, they can still be referenced in code, but attempting to instantiate them immediately throws a Fatal PHP Exception before any API call is made.

Example instantiation of an orphaned class:

$request = new \Google\Analytics\Data\V1alpha\SheetExportAudienceListRequest();

Output:

PHP Fatal error:  Uncaught InvalidArgumentException: Google\Analytics\Data\V1alpha\SheetExportAudienceListRequest is not found in descriptor pool. Only generated classes may derive from Message.

Deleting these files simply cleans up the dead code and allows static analysis tools to correctly flag them as non-existent.

BREAKING_CHANGE_REASON=Removing legacy orphaned proto files that were left behind by OwlBot to ensure accurate 0-diff parity testing.

For googleapis/librarian#7366

@sofisl
sofisl requested a review from a team as a code owner August 20, 2026 21:44
@snippet-bot

snippet-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

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

@product-auto-label product-auto-label Bot added the api: analyticsdata Issues related to the Analytics Data API API. label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: analyticsdata Issues related to the Analytics Data API API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant