Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/google-cloud-serverless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@sentry/node-core": "10.38.0"
},
"devDependencies": {
"@google-cloud/bigquery": "^5.3.0",
"@google-cloud/bigquery": "^8.1.1",
Copy link

Choose a reason for hiding this comment

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

Version mismatch between @google-cloud/common devDependency and transitive dependency

Medium Severity

The @google-cloud/bigquery@^8.1.1 update requires @google-cloud/common@^6.0.0 as a transitive dependency, but the devDependency still specifies @google-cloud/common@^3.4.1. This causes both v3.6.0 and v6.0.0 to be installed. The integration code in google-cloud-http.ts does require('@google-cloud/common') which resolves to v3.x, while BigQuery internally uses v6.x. Since these are separate module instances, the test patches the wrong Service.prototype.request and may not accurately test the integration with BigQuery v8.

Additional Locations (1)

Fix in Cursor Fix in Web

"@google-cloud/common": "^3.4.1",
Copy link

Choose a reason for hiding this comment

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

Bug: The @google-cloud/bigquery upgrade creates a version conflict with @google-cloud/common, causing the Sentry patch to not apply and silently disabling tracing for BigQuery requests.
Severity: MEDIUM

Suggested Fix

Update the @google-cloud/common dependency in devDependencies to match the version required by @google-cloud/bigquery@8.1.1, which is ^6.0.0. This will resolve the version conflict and ensure the Sentry integration correctly patches the module used by the BigQuery client.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: packages/google-cloud-serverless/package.json#L57

Potential issue: The `package.json` is being updated to use
`@google-cloud/bigquery@8.1.1`, which has a dependency on `@google-cloud/common@^6.0.0`.
However, the `devDependencies` in the same `package.json` still explicitly require an
older, incompatible version, `@google-cloud/common@^3.4.1`. This version mismatch can
lead to `yarn` installing both versions. The Sentry integration patches the older
version (`^3.4.1`), while the new BigQuery library uses the newer version (`^6.0.0`). As
a result, the patch will not be applied to BigQuery's requests, causing a silent failure
where BigQuery operations are not traced by Sentry.

"@types/express": "^5.0.6",
"@types/node": "^18.19.1",
Expand Down
Loading
Loading