fix(error_reporting): respect quota_project configuration#34610
Open
torreypayne wants to merge 13 commits into
Open
fix(error_reporting): respect quota_project configuration#34610torreypayne wants to merge 13 commits into
torreypayne wants to merge 13 commits into
Conversation
added 2 commits
June 11, 2026 18:10
Allows configuring quota_project explicitly in Google::Cloud::ErrorReporting.new and via configuration. This resolves issues where the default quota project from credentials is used but has the Error Reporting API disabled.
added 6 commits
June 12, 2026 20:15
aandreassa
requested changes
Jun 16, 2026
aandreassa
left a comment
Contributor
There was a problem hiding this comment.
Looks great! A couple nits
…ymous block forwarding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(error_reporting): respect quota_project configuration
This PR fixes an issue where the
Google::Cloud::ErrorReportingclient was completely ignoring thequota_projectconfiguration parameter, causing API calls to default billing to the project associated with the credentials. This resulted inPermissionDeniedError(Error Reporting API not enabled) for users attempting to report errors to a target project that was different from their credentials project (e.g., issue #25862).closes: #25862
Changes
Google::Cloud::ErrorReporting.newto correctly resolvequota_projectfrom the library configuration and pipe it down to the internalServicelayer.Google::Cloud::ErrorReporting::Serviceto acceptquota_project(falling back to credentials) and apply it to the underlying gRPC client configuration.README.mdandAUTHENTICATION.md.Google::Cloud::ErrorReporting::Project#reportto use Ruby 3.2+ anonymous block forwarding (*args, &), resolving pre-existing RuboCop style offenses.Expectation Setting: Target Project vs. Quota Project
In Google Cloud APIs, the Target Project (where resources are stored/written) and the Quota Project (which project is billed for the API call) are intentionally separate concepts:
quota_projectvia library configuration or theGOOGLE_CLOUD_QUOTA_PROJECTenvironment variable.Configuration Example: