ImportError: cannot import name 'IS_POSTGRES_OR_GRPC_BACKEND' after base image update to 0.7.2 #1121

Closed
opened 2026-02-20 17:43:09 -05:00 by yindo · 0 comments
Owner

Originally created by @mulligandev on GitHub (Jan 20, 2026).

Checked other resources

  • This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/).
  • I added a clear and detailed title that summarizes the issue.
  • I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
  • I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.

Example Code

# No user code required - this is a bug in the Docker base image itself.
# The error occurs on container startup before any user code is executed.
#
# Dockerfile:
# FROM langchain/langgraph-api:3.12
#
# The server fails to start with an ImportError in the platform's internal components.

Error Message and Stack Trace (if applicable)

File "/usr/local/lib/python3.12/site-packages/langgraph_api/server.py", line 32, in <module>
       from langgraph_api.api import (
   File "/usr/local/lib/python3.12/site-packages/langgraph_api/api/__init__.py", line 17, in <module>
       from langgraph_api.api.assistants import assistants_routes
   File "/usr/local/lib/python3.12/site-packages/langgraph_api/api/assistants.py", line 24, in <module>
       from langgraph_api.grpc.ops import Assistants as GrpcAssistants
   File "/usr/local/lib/python3.12/site-packages/langgraph_api/grpc/ops/__init__.py", line 370, in <module>
       from .threads import Threads
   File "/usr/local/lib/python3.12/site-packages/langgraph_api/grpc/ops/threads.py", line 40, in <module>
       from langgraph_runtime.checkpoint import Checkpointer
   File "/usr/local/lib/python3.12/site-packages/langgraph_runtime/__init__.py", line 21, in <module>
       from langgraph_runtime_postgres import (
   File "/storage/langgraph_runtime_postgres/__init__.py", line 1, in <module>
       from langgraph_runtime_postgres import (
   File "/storage/langgraph_runtime_postgres/database.py", line 12, in <module>
   ImportError: cannot import name 'IS_POSTGRES_OR_GRPC_BACKEND' from 'langgraph_api.feature_flags'
   (/usr/local/lib/python3.12/site-packages/langgraph_api/feature_flags.py)

Description

  • What I'm trying to do: Deploy a LangGraph application using the official Docker base image langchain/langgraph-api:3.12
  • Expected behavior: The server should start successfully as it did before the image update
  • Actual behavior: The server fails to start with an ImportError - the langgraph_runtime_postgres component expects
    IS_POSTGRES_OR_GRPC_BACKEND from langgraph_api.feature_flags, but this symbol doesn't exist
  • Root cause: Version mismatch between internal components in the 0.7.2 Docker image. The /storage/langgraph_runtime_postgres/ expects a feature
    flag that the bundled /usr/local/lib/python3.12/site-packages/langgraph_api/ doesn't export.
  • Timeline: Started occurring after the 3.12 image was updated to 0.7.2 on January 20, 2026. The same deployment worked previously.
  • Potential workaround: Rolling back to langchain/langgraph-api:0.7.1-py3.12 (unverified)

System Info

Docker image: langchain/langgraph-api:3.12 (0.7.2, updated 2026-01-20)
Platform: LangGraph Cloud (self-hosted)
Python: 3.12

Note: Cannot run python -m langchain_core.sys_info as the container fails to start.

Originally created by @mulligandev on GitHub (Jan 20, 2026). ### Checked other resources - [x] This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/). - [x] I added a clear and detailed title that summarizes the issue. - [x] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example). - [x] I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue. ### Example Code ```python # No user code required - this is a bug in the Docker base image itself. # The error occurs on container startup before any user code is executed. # # Dockerfile: # FROM langchain/langgraph-api:3.12 # # The server fails to start with an ImportError in the platform's internal components. ``` ### Error Message and Stack Trace (if applicable) ```shell File "/usr/local/lib/python3.12/site-packages/langgraph_api/server.py", line 32, in <module> from langgraph_api.api import ( File "/usr/local/lib/python3.12/site-packages/langgraph_api/api/__init__.py", line 17, in <module> from langgraph_api.api.assistants import assistants_routes File "/usr/local/lib/python3.12/site-packages/langgraph_api/api/assistants.py", line 24, in <module> from langgraph_api.grpc.ops import Assistants as GrpcAssistants File "/usr/local/lib/python3.12/site-packages/langgraph_api/grpc/ops/__init__.py", line 370, in <module> from .threads import Threads File "/usr/local/lib/python3.12/site-packages/langgraph_api/grpc/ops/threads.py", line 40, in <module> from langgraph_runtime.checkpoint import Checkpointer File "/usr/local/lib/python3.12/site-packages/langgraph_runtime/__init__.py", line 21, in <module> from langgraph_runtime_postgres import ( File "/storage/langgraph_runtime_postgres/__init__.py", line 1, in <module> from langgraph_runtime_postgres import ( File "/storage/langgraph_runtime_postgres/database.py", line 12, in <module> ImportError: cannot import name 'IS_POSTGRES_OR_GRPC_BACKEND' from 'langgraph_api.feature_flags' (/usr/local/lib/python3.12/site-packages/langgraph_api/feature_flags.py) ``` ### Description - **What I'm trying to do:** Deploy a LangGraph application using the official Docker base image `langchain/langgraph-api:3.12` - **Expected behavior:** The server should start successfully as it did before the image update - **Actual behavior:** The server fails to start with an `ImportError` - the `langgraph_runtime_postgres` component expects `IS_POSTGRES_OR_GRPC_BACKEND` from `langgraph_api.feature_flags`, but this symbol doesn't exist - **Root cause:** Version mismatch between internal components in the 0.7.2 Docker image. The `/storage/langgraph_runtime_postgres/` expects a feature flag that the bundled `/usr/local/lib/python3.12/site-packages/langgraph_api/` doesn't export. - **Timeline:** Started occurring after the `3.12` image was updated to 0.7.2 on January 20, 2026. The same deployment worked previously. - **Potential workaround:** Rolling back to `langchain/langgraph-api:0.7.1-py3.12` (unverified) ### System Info Docker image: langchain/langgraph-api:3.12 (0.7.2, updated 2026-01-20) Platform: LangGraph Cloud (self-hosted) Python: 3.12 Note: Cannot run `python -m langchain_core.sys_info` as the container fails to start.
yindo added the bugpending labels 2026-02-20 17:43:09 -05:00
yindo closed this issue 2026-02-20 17:43:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#1121