Skip to content

fix(deps): cap grpcio below 1.82.0 to avoid protobuf 7.x incompatibility#33979

Closed
0xliam wants to merge 2 commits into
dagster-io:masterfrom
0xliam:pin-grpcio
Closed

fix(deps): cap grpcio below 1.82.0 to avoid protobuf 7.x incompatibility#33979
0xliam wants to merge 2 commits into
dagster-io:masterfrom
0xliam:pin-grpcio

Conversation

@0xliam

@0xliam 0xliam commented Jul 6, 2026

Copy link
Copy Markdown

Summary & Motivation

The latest version of grpcio/grpcio-health-checking (18.2.0 - released a few hours ago) ships with a dependency of protobuf==7.35.1, however Dagster pins protobuf>=4,<7.

After running uvx create-dagster@latest and dg dev, the following error is received:

google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime 6.33.6. Runtime version cannot be older than the linked gencode version. See Protobuf version guarantees at https://protobuf.dev/support/cross-version-runtime-guarantee.

Additionally, when running the Python test suite, tests were failing prior to this change:

========================================================================= short test summary info =========================================================================
ERROR python_modules/dagster/dagster_tests/api_tests/test_api_get_current_runs.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/api_tests/test_api_launch_run.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/api_tests/test_api_snapshot_schedule_execution_data.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/api_tests/test_api_snapshot_sensor.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/cli_tests/command_tests/dagster_dev_command_tests/test_dagster_dev_command.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/cli_tests/command_tests/test_backfill_command.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/cli_tests/command_tests/test_cli_commands.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/cli_tests/command_tests/test_execute_command.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/cli_tests/command_tests/test_launch_command.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/cli_tests/command_tests/test_list_command.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/cli_tests/command_tests/test_print_command.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/cli_tests/command_tests/test_scaffold_command.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/cli_tests/command_tests/test_schedule_commands.py - google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_health/v1/health.proto: gencode 7.35.0 runtime...
ERROR python_modules/dagster/dagster_tests/cli_tests/command_tests/test

Test Plan

Running the test suite no longer fails with these errors.

@greptile-apps

greptile-apps Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR caps grpcio and grpcio-health-checking to <1.82.0 in both pyproject.toml and uv.lock to prevent a protobuf 7.x gencode/runtime version mismatch introduced by grpcio 1.82.0, which ships stubs compiled against protobuf 7.35.0 while Dagster pins protobuf<7.

  • pyproject.toml: Adds <1.82.0 upper bound to grpcio and grpcio-health-checking across both Python version markers (>=3.13 and <3.13).
  • uv.lock: Reflects the updated specifiers consistently; grpcio-tools (test-only) is uncapped but resolvers will naturally align it with the grpcio constraint.

Confidence Score: 5/5

Straightforward dependency cap that unblocks broken installs and test runs; no runtime logic changes.

The change is a two-line addition of upper-bound specifiers on two tightly-coupled packages, matched by a consistent lock-file update. The root cause (grpcio 1.82.0 pulling in protobuf 7.x stubs) is well-documented in the PR, the fix directly addresses it, and no application logic is touched.

No files require special attention. The only minor gap is that grpcio-tools (test dep) lacks the matching cap, though resolvers will generally handle it automatically.

Important Files Changed

Filename Overview
python_modules/dagster/pyproject.toml Adds <1.82.0 upper bound to both grpcio and grpcio-health-checking for all Python version branches, preventing the protobuf 7.x gencode/runtime incompatibility introduced by grpcio 1.82.0. The grpcio-tools test dependency is left uncapped.
python_modules/dagster/uv.lock Lock file updated to reflect the new <1.82.0 specifiers for grpcio and grpcio-health-checking; consistent with the pyproject.toml changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["pip/uv install dagster"] --> B{grpcio version resolved}
    B -->|">=1.44.0,<1.82.0 (py<3.13)"| C["grpcio 1.81.x"]
    B -->|">=1.66.2,<1.82.0 (py>=3.13)"| C
    C --> D["grpcio-health-checking <1.82.0\n(stubs compiled against protobuf <=6.x)"]
    D --> E{protobuf runtime}
    E -->|"<7 (Dagster constraint)"| F["✅ Compatible — gencode & runtime both <=6.x"]
    G["grpcio 1.82.0 (uncapped)"] --> H["grpcio-health-checking 1.82.0\n(stubs compiled against protobuf 7.35.0)"]
    H --> I{protobuf runtime}
    I -->|"<7 (Dagster constraint)"| J["❌ VersionError: gencode 7.35.0 > runtime 6.x"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["pip/uv install dagster"] --> B{grpcio version resolved}
    B -->|">=1.44.0,<1.82.0 (py<3.13)"| C["grpcio 1.81.x"]
    B -->|">=1.66.2,<1.82.0 (py>=3.13)"| C
    C --> D["grpcio-health-checking <1.82.0\n(stubs compiled against protobuf <=6.x)"]
    D --> E{protobuf runtime}
    E -->|"<7 (Dagster constraint)"| F["✅ Compatible — gencode & runtime both <=6.x"]
    G["grpcio 1.82.0 (uncapped)"] --> H["grpcio-health-checking 1.82.0\n(stubs compiled against protobuf 7.35.0)"]
    H --> I{protobuf runtime}
    I -->|"<7 (Dagster constraint)"| J["❌ VersionError: gencode 7.35.0 > runtime 6.x"]
Loading

Reviews (3): Last reviewed commit: "fix(deps): cap grpcio-health-checking be..." | Re-trigger Greptile

Comment thread python_modules/dagster/pyproject.toml Outdated
@0xliam

0xliam commented Jul 6, 2026

Copy link
Copy Markdown
Author

Force pushed as I forgot to update uv.lock - this should now be ready for review.

@jieyu-lin

Copy link
Copy Markdown

@0xliam Thank you to bring up this PR. I wonder if you are merging to latest 1.13 version of dagster for this patch and may not recently backfill to previous version.

@0xliam

0xliam commented Jul 6, 2026

Copy link
Copy Markdown
Author

@0xliam Thank you to bring up this PR. I wonder if you are merging to latest 1.13 version of dagster for this patch and may not recently backfill to previous version.

I'd be happy to backport this if needed - I'll await review from the maintainers to confirm how they'd like me to proceed.

@0xliam

0xliam commented Jul 8, 2026

Copy link
Copy Markdown
Author

Closing as this is now resolved by a249c55

@0xliam 0xliam closed this Jul 8, 2026
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.

2 participants