chore(AnalyticsAdmin): remove orphaned files from previous proto refactors - #9520
chore(AnalyticsAdmin): remove orphaned files from previous proto refactors#9520sofisl wants to merge 1 commit into
Conversation
|
Here is the summary of changes. You are about to delete 17 region tags.
This comment is generated by snippet-bot.
|
|
will wait till I get a review to add BREAKING_CHANGE_REASON=Removing legacy orphaned proto files that were left behind by OwlBot to ensure accurate 0-diff parity testing. |
|
For reviewers concerned about backwards compatibility: Any customer code attempting to use these deleted classes is already broken and crashing in production. Because the upstream Example instantiation of an orphaned class: $request = new \Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagRequest();Output: Deleting these files simply cleans up the dead code and allows static analysis tools to correctly flag them as non-existent. |
This PR removes legacy/orphaned PHP files in
AnalyticsAdminthat no longer correspond to upstreamgoogleapisdefinitions.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 newLibrarianmigration tool, which strictly cleans output directories and correctly flags these as deletions.Evidence & Tracing:
ConnectedSiteTagandAutomatedGa4ConfigurationOptOutresources and methodsgoogle/analytics/admin/v1alpha/analytics_admin.proto.googleapiscommit 2032c33b2df0fd3b2dc9bfcb6fc747e139a0d87d, the upstream team explicitly removedConnectedSiteTagand its related RPCs (e.g.,CreateConnectedSiteTag,DeleteConnectedSiteTag) and resources.ConnectedSiteTag.phpand its request/response classes, along with their samples.UserLinkmethodsgoogle/analytics/admin/v1alpha/analytics_admin.proto.googleapiscommit a3006dd1ff2e3c7f4ff7e7538af8adf2ea9e815b, the upstream team deleted allUserLinkmethods (e.g.,BatchDeleteUserLinks,CreateUserLink,AuditUserLinks).CreateSubpropertygoogleapiscommit b479bc2f1e74671fddcbef85d6e4796d1f5ba94c, theCreateSubpropertycustom method was renamed toProvisionSubproperty.create_subproperty.phpwas orphaned.Removing these 29 obsolete files cleans up dead code and enables accurate 0-diff parity testing.
\n\nSafety / Backwards Compatibility Note:\nAny customer code attempting to use these deleted classes is already broken and crashing in production. \nBecause the upstream
.protodefinitions were removed, the protobuf compiler previously removed these classes from the generatedGPBMetadatadescriptor 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.\n\nExample instantiation of an orphaned class:\nphp\n<?php\nrequire __DIR__ . '/vendor/autoload.php';\nuse Google\Analytics\Admin\V1alpha\ConnectedSiteTag;\n\n$tag = new ConnectedSiteTag();\n\nOutput:\n\nPHP Fatal error: Uncaught InvalidArgumentException: Google\Analytics\Admin\V1alpha\ConnectedSiteTag is not found in descriptor pool. Only generated classes may derive from Message.\n\nDeleting these files simply cleans up the dead code and allows static analysis tools to correctly flag them as non-existent.\n\nBREAKING_CHANGE_REASON=Removing legacy orphaned proto files that were left behind by OwlBot to ensure accurate 0-diff parity testing.For googleapis/librarian#7366