Skip to content

Conversation

@yu-iskw
Copy link
Contributor

@yu-iskw yu-iskw commented Dec 29, 2025

I encounter the conflicts between dbt-bigquery and elementary-data. So, I want to loosen the version constrains of google-cloud-storage.

  • dbt-core: 1.10.5
  • dbt-bigquery: 1.10.3

https://github.com/dbt-labs/dbt-adapters/blob/1e7448f9b6c3440d28fefd5b34b6dcf86c36def1/dbt-bigquery/pyproject.toml#L30

$ dbt debug
03:08:01  Running with dbt=1.10.15
03:08:01  dbt version: 1.10.15
03:08:01  python version: 3.12.3
03:08:01  python path: /Users/yu/local/src/xxxjaffle_shop/.venv/bin/python3
03:08:01  os info: macOS-15.6.1-arm64-arm-64bit
/Users/yu/local/src/xxx/jaffle_shop/.venv/lib/python3.12/site-packages/google/cloud/aiplatform/models.py:52: FutureWarning: Support for google-cloud-storage < 3.0.0 will be removed in a future version of google-cloud-aiplatform. Please upgrade to google-cloud-storage >= 3.0.0.
  from google.cloud.aiplatform.utils import gcs_utils
03:08:23  Using profiles dir at /Users/yu/local/src/xxx/jaffle_shop
03:08:23  Using profiles.yml file at /Users/yu/local/src/xxx/jaffle_shop/profiles.yml
03:08:23  Using dbt_project.yml file at /Users/yu/local/src/xxxjaffle_shop/dbt_project.yml
03:08:23  adapter type: bigquery
03:08:23  adapter version: 1.10.3
03:08:23  Configuration:
03:08:23    profiles.yml file [OK found and valid]
03:08:23    dbt_project.yml file [OK found and valid]
03:08:23  Required dependencies:
03:08:23   - git [OK found]

03:08:23  Connection:
03:08:23    method: oauth
03:08:23    database: xxx-data-engineering-dev
03:08:23    execution_project: xxx-data-engineering-dev
03:08:23    schema: jaffle_shop
03:08:23    location: asia-northeast1
03:08:23    priority: None
03:08:23    maximum_bytes_billed: None
03:08:23    impersonate_service_account: dbt-jaffle-shop@xxxx-data-engineering-dev.iam.gserviceaccount.com
03:08:23    job_retry_deadline_seconds: None
03:08:23    job_retries: 1
03:08:23    job_creation_timeout_seconds: None
03:08:23    job_execution_timeout_seconds: None
03:08:23    timeout_seconds: None
03:08:23    client_id: None
03:08:23    token_uri: None
03:08:23    compute_region: None
03:08:23    dataproc_cluster_name: None
03:08:23    gcs_bucket: None
03:08:23    dataproc_batch: None
03:08:23  Registered adapter: bigquery=1.10.3
03:08:24    Connection test: [ERROR]

03:08:24  1 check failed:
03:08:24  dbt was unable to connect to the specified database.
The database returned the following error:

  >Database Error
  'str' object is not callable

Check your database credentials and try again. For more information, visit:
https://docs.getdbt.com/docs/configure-your-profile

Summary by CodeRabbit

  • Chores
    • Updated Google Cloud Storage dependency constraints to support a broader range of compatible versions.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Yu Ishikawa <yu-iskw@users.noreply.github.com>
@coderabbitai
Copy link

coderabbitai bot commented Dec 29, 2025

📝 Walkthrough

Walkthrough

The google-cloud-storage dependency constraint in pyproject.toml has been updated from "<3.0.0" to ">=2.4,<4.0", expanding the supported version range to include version 3.x releases while maintaining a minimum version requirement.

Changes

Cohort / File(s) Summary
Dependency version constraint update
pyproject.toml
Updated google-cloud-storage version constraint from "<3.0.0" to ">=2.4,<4.0"

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A version update hops into view,
google-cloud-storage now accepts what's new,
From 2.4 to 3.x, we expand the range,
A dependency shift, a comfortable change! ☁️

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Update the version constrains of google-cloud-storage' directly and clearly describes the main change—updating version constraints for a dependency. However, it contains a grammatical error ('constrains' should be 'constraints').
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

👋 @yu-iskw
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in this pull request.

@yu-iskw yu-iskw deployed to elementary_test_env December 29, 2025 03:11 — with GitHub Actions Active
@yu-iskw yu-iskw marked this pull request as ready for review January 6, 2026 01:10
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In @pyproject.toml:
- Line 25: The google-cloud-storage version range in pyproject.toml is too
permissive (>=2.4,<4.0) and must be tightened to <3.2 for compatibility with
dbt-bigquery 1.10.3; update the dependency constraint for google-cloud-storage
to use an upper bound of <3.2 in pyproject.toml and run dependency
resolution/tests to ensure nothing in the code (especially any uses of
bucket/blob APIs that rely on checksum behavior, num_retries, text_mode, or
retry semantics) breaks with google-cloud-storage 3.x before accepting any
broader range.
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3624b8b and cc9d5f2.

📒 Files selected for processing (1)
  • pyproject.toml

posthog = "<3.0.0"
boto3 = "<2.0.0"
google-cloud-storage = "<3.0.0"
google-cloud-storage = ">=2.4,<4.0"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check latest google-cloud-storage version and any 4.x releases
echo "=== google-cloud-storage releases (3.x and 4.x) ==="
curl -s https://pypi.org/pypi/google-cloud-storage/json | jq -r '.releases | keys[]' | grep -E '^(3\.|4\.)' | sort -V | tail -20

echo -e "\n=== dbt-bigquery 1.10.3 requirements ==="
curl -s https://pypi.org/pypi/dbt-bigquery/1.10.3/json | jq -r '.info.requires_dist[]? | select(contains("google-cloud-storage"))' 2>/dev/null || echo "Could not fetch dbt-bigquery info"

echo -e "\n=== Current google-cloud-storage latest version ==="
curl -s https://pypi.org/pypi/google-cloud-storage/json | jq -r '.info.version'

Repository: elementary-data/elementary

Length of output: 328


🌐 Web query:

google-cloud-storage 3.0 breaking changes migration python

💡 Result:

Key breaking changes in google-cloud-storage 3.0 (Python) and how to migrate:

  1. Default checksum behavior changed
  • Upload default checksum changed from None -> "auto" (checksums computed/validated automatically).
  • Download default checksum changed from "md5" -> "auto".
  • Action: explicitly set checksum if you relied on the old behavior (e.g., blob.upload_from_file(..., checksum="md5"/None) or blob.download_as_bytes(..., checksum="md5"/None)) and test uploads/downloads. [1][2]
  1. Retry/argument changes
  • Deprecated positional argument num_retries removed; use the retry parameter (named) with google.api_core.retry.Retry or library retry helpers instead. Replace calls like blob.download_to_filename("f", 3) with blob.download_to_filename("f", retry=my_retry). [1][2]
  1. text_mode removed
  • Any API that accepted text_mode has that argument removed; pass/encode bytes instead or handle text decoding yourself before/after calls. [1][2]
  1. Media retry behavior
  • Media operation retries now behave the same as other retries (this may change effective retry semantics/defaults). Action: review and, if needed, supply explicit retry policies for media operations. [1]
  1. Blob.download_to_filename() behavior change
  • On 404, the client now deletes an empty destination file created before the download. Action: if your code relied on an empty file remaining on 404, adjust logic to check for existence or catch the NotFound error. [1]

Migration checklist

  • Search/replace positional num_retries usages → named retry parameter.
  • Audit places using text_mode and remove/replace with explicit encoding/decoding.
  • Set explicit checksum options where your code depends on MD5/no-checksum.
  • Review retry policies for media operations and tests for download-on-404 behavior.
  • Run integration tests (uploads/downloads, error paths) after upgrade. [1][2][3]

Sources:

  • Google Cloud Storage release notes / 3.0.0 changelog. [1]
  • google-cloud-storage changelog / docs page. [2]
  • 3.0.0 client reference / README (migration notes). [3]

Fix the upper bound to <3.2 for compatibility with dbt-bigquery 1.10.3.

The current constraint >=2.4,<4.0 is incompatible with dbt-bigquery 1.10.3, which requires google-cloud-storage<3.2,>=2.4. The upper bound should be <3.2 instead of <4.0. Versions 3.2 through 3.7.0 exist and will break dbt-bigquery 1.10.3 compatibility.

Additionally, google-cloud-storage 3.0 introduced several breaking changes (checksum behavior, removed num_retries parameter, removed text_mode, modified retry semantics) that require testing to ensure the codebase is compatible.

🤖 Prompt for AI Agents
In @pyproject.toml around line 25, The google-cloud-storage version range in
pyproject.toml is too permissive (>=2.4,<4.0) and must be tightened to <3.2 for
compatibility with dbt-bigquery 1.10.3; update the dependency constraint for
google-cloud-storage to use an upper bound of <3.2 in pyproject.toml and run
dependency resolution/tests to ensure nothing in the code (especially any uses
of bucket/blob APIs that rely on checksum behavior, num_retries, text_mode, or
retry semantics) breaks with google-cloud-storage 3.x before accepting any
broader range.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant