Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(langgraph-base): create async get_tuple method + tests #325

Open
wants to merge 11 commits into
base: langgraph-base
Choose a base branch
from

Conversation

Feromar98
Copy link

Change Log:

[ ] Create async get_tuple method

[ ] Create test for method

@Feromar98 Feromar98 requested review from a team as code owners January 22, 2025 03:02
@product-auto-label product-auto-label bot added the api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. label Jan 22, 2025
Copy link
Collaborator

@averikitsch averikitsch left a comment

Choose a reason for hiding this comment

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

This seems similar to the alist PR and doesn't contain get_tuple method.

@averikitsch
Copy link
Collaborator

Please reopen when there are changes.

@averikitsch averikitsch closed this Feb 7, 2025
@Feromar98
Copy link
Author

@averikitsch how can I open the PR?
I've pushed the changes but they're not showing here.

@averikitsch averikitsch reopened this Feb 12, 2025
@averikitsch
Copy link
Collaborator

/gcbrun

@averikitsch
Copy link
Collaborator

/gcbrun

Comment on lines +442 to +445
result = await conn.execute(text(query), args)
result_map = result.mappings()
results = result_map.fetchall()
for value in results:
Copy link
Collaborator

Choose a reason for hiding this comment

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

To be truly async we need to fetch asynchronously not fetchall into memory.

Suggested change
result = await conn.execute(text(query), args)
result_map = result.mappings()
results = result_map.fetchall()
for value in results:
result_proxy = await conn.execute(text(query), args)
while True:
value = result_proxy.fetchone()

)
from langgraph.checkpoint.serde.base import SerializerProtocol
from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer
from langgraph.checkpoint.serde.types import TASKS
from langgraph.checkpoint.serde.types import TASKS
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove double import

Comment on lines 29 to 30
CheckpointTuple,
get_checkpoint_id,
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove double import

AND cw.checkpoint_id = c.parent_checkpoint_id
AND cw.channel = '{TASKS}'
) AS pending_sends
FROM "{self.schema_name}".'{CHECKPOINTS_TABLE}' c
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use double quotes around all table name

metadata,
(
SELECT array_agg(array[cw.task_id::text::bytea, cw.channel::bytea, cw.type::bytea, cw.blob] order by cw.task_id, cw.idx)
FROM "{self.schema_name}".'{CHECKPOINT_WRITES_TABLE}' cw
Copy link
Collaborator

Choose a reason for hiding this comment

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

All table names should refer to the self.table_name and self.table_name_writes

},
checkpoint=self._load_checkpoint(
value["checkpoint"],
value["channel_values"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

How are we calculating this?

async with self.pool.connect() as conn:
result = await conn.execute(text(SELECT + where), args)
result_map = result.mappings()
results = result_map.fetchall()
Copy link
Collaborator

Choose a reason for hiding this comment

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

use fetchone()

@averikitsch
Copy link
Collaborator

Step #3 - "Run integration tests": =================================== FAILURES ===================================
Step #3 - "Run integration tests": ____________________________ test_checkpoint_alist _____________________________
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_cursor object at 0x7f82ebea0100>
Step #3 - "Run integration tests": operation = '\n        SELECT\n            thread_id,\n            checkpoint,\n            checkpoint_ns,\n            checkpoint... ) AS pending_sends\n        FROM "public".\'checkpoints\' c\n        WHERE metadata @> $1 ORDER BY checkpoint_id DESC'
Step #3 - "Run integration tests": parameters = ('{"source": "input"}',)
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     async def _prepare_and_execute(self, operation, parameters):
Step #3 - "Run integration tests":         adapt_connection = self._adapt_connection
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         async with adapt_connection._execute_mutex:
Step #3 - "Run integration tests":             if not adapt_connection._started:
Step #3 - "Run integration tests":                 await adapt_connection._start_transaction()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             if parameters is None:
Step #3 - "Run integration tests":                 parameters = ()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             try:
Step #3 - "Run integration tests": >               prepared_stmt, attributes = await adapt_connection._prepare(
Step #3 - "Run integration tests":                     operation, self._invalidate_schema_cache_asof
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:514: 
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:760: in _prepare
Step #3 - "Run integration tests":     prepared_stmt = await self._connection.prepare(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/asyncpg/connection.py:635: in prepare
Step #3 - "Run integration tests":     return await self._prepare(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/asyncpg/connection.py:653: in _prepare
Step #3 - "Run integration tests":     stmt = await self._get_statement(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/asyncpg/connection.py:432: in _get_statement
Step #3 - "Run integration tests":     statement = await self._protocol.prepare(
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": >   ???
Step #3 - "Run integration tests": E   asyncpg.exceptions.PostgresSyntaxError: syntax error at or near "'checkpoint_writes'"
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": asyncpg/protocol/protocol.pyx:165: PostgresSyntaxError
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": The above exception was the direct cause of the following exception:
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <sqlalchemy.engine.base.Connection object at 0x7f82eb9dbe20>
Step #3 - "Run integration tests": dialect = <sqlalchemy.dialects.postgresql.asyncpg.PGDialect_asyncpg object at 0x7f82eba43dc0>
Step #3 - "Run integration tests": context = <sqlalchemy.dialects.postgresql.asyncpg.PGExecutionContext_asyncpg object at 0x7f82eb9d8a30>
Step #3 - "Run integration tests": statement = <sqlalchemy.dialects.postgresql.asyncpg.PGCompiler_asyncpg object at 0x7f82eb9dbee0>
Step #3 - "Run integration tests": parameters = [('{"source": "input"}',)]
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     def _exec_single_context(
Step #3 - "Run integration tests":         self,
Step #3 - "Run integration tests":         dialect: Dialect,
Step #3 - "Run integration tests":         context: ExecutionContext,
Step #3 - "Run integration tests":         statement: Union[str, Compiled],
Step #3 - "Run integration tests":         parameters: Optional[_AnyMultiExecuteParams],
Step #3 - "Run integration tests":     ) -> CursorResult[Any]:
Step #3 - "Run integration tests":         """continue the _execute_context() method for a single DBAPI
Step #3 - "Run integration tests":         cursor.execute() or cursor.executemany() call.
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         """
Step #3 - "Run integration tests":         if dialect.bind_typing is BindTyping.SETINPUTSIZES:
Step #3 - "Run integration tests":             generic_setinputsizes = context._prepare_set_input_sizes()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             if generic_setinputsizes:
Step #3 - "Run integration tests":                 try:
Step #3 - "Run integration tests":                     dialect.do_set_input_sizes(
Step #3 - "Run integration tests":                         context.cursor, generic_setinputsizes, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":                 except BaseException as e:
Step #3 - "Run integration tests":                     self._handle_dbapi_exception(
Step #3 - "Run integration tests":                         e, str(statement), parameters, None, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         cursor, str_statement, parameters = (
Step #3 - "Run integration tests":             context.cursor,
Step #3 - "Run integration tests":             context.statement,
Step #3 - "Run integration tests":             context.parameters,
Step #3 - "Run integration tests":         )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         effective_parameters: Optional[_AnyExecuteParams]
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if not context.executemany:
Step #3 - "Run integration tests":             effective_parameters = parameters[0]
Step #3 - "Run integration tests":         else:
Step #3 - "Run integration tests":             effective_parameters = parameters
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if self._has_events or self.engine._has_events:
Step #3 - "Run integration tests":             for fn in self.dispatch.before_cursor_execute:
Step #3 - "Run integration tests":                 str_statement, effective_parameters = fn(
Step #3 - "Run integration tests":                     self,
Step #3 - "Run integration tests":                     cursor,
Step #3 - "Run integration tests":                     str_statement,
Step #3 - "Run integration tests":                     effective_parameters,
Step #3 - "Run integration tests":                     context,
Step #3 - "Run integration tests":                     context.executemany,
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if self._echo:
Step #3 - "Run integration tests":             self._log_info(str_statement)
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             stats = context._get_cache_stats()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             if not self.engine.hide_parameters:
Step #3 - "Run integration tests":                 self._log_info(
Step #3 - "Run integration tests":                     "[%s] %r",
Step #3 - "Run integration tests":                     stats,
Step #3 - "Run integration tests":                     sql_util._repr_params(
Step #3 - "Run integration tests":                         effective_parameters,
Step #3 - "Run integration tests":                         batches=10,
Step #3 - "Run integration tests":                         ismulti=context.executemany,
Step #3 - "Run integration tests":                     ),
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":             else:
Step #3 - "Run integration tests":                 self._log_info(
Step #3 - "Run integration tests":                     "[%s] [SQL parameters hidden due to hide_parameters=True]",
Step #3 - "Run integration tests":                     stats,
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         evt_handled: bool = False
Step #3 - "Run integration tests":         try:
Step #3 - "Run integration tests":             if context.execute_style is ExecuteStyle.EXECUTEMANY:
Step #3 - "Run integration tests":                 effective_parameters = cast(
Step #3 - "Run integration tests":                     "_CoreMultiExecuteParams", effective_parameters
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":                 if self.dialect._has_events:
Step #3 - "Run integration tests":                     for fn in self.dialect.dispatch.do_executemany:
Step #3 - "Run integration tests":                         if fn(
Step #3 - "Run integration tests":                             cursor,
Step #3 - "Run integration tests":                             str_statement,
Step #3 - "Run integration tests":                             effective_parameters,
Step #3 - "Run integration tests":                             context,
Step #3 - "Run integration tests":                         ):
Step #3 - "Run integration tests":                             evt_handled = True
Step #3 - "Run integration tests":                             break
Step #3 - "Run integration tests":                 if not evt_handled:
Step #3 - "Run integration tests":                     self.dialect.do_executemany(
Step #3 - "Run integration tests":                         cursor,
Step #3 - "Run integration tests":                         str_statement,
Step #3 - "Run integration tests":                         effective_parameters,
Step #3 - "Run integration tests":                         context,
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":             elif not effective_parameters and context.no_parameters:
Step #3 - "Run integration tests":                 if self.dialect._has_events:
Step #3 - "Run integration tests":                     for fn in self.dialect.dispatch.do_execute_no_params:
Step #3 - "Run integration tests":                         if fn(cursor, str_statement, context):
Step #3 - "Run integration tests":                             evt_handled = True
Step #3 - "Run integration tests":                             break
Step #3 - "Run integration tests":                 if not evt_handled:
Step #3 - "Run integration tests":                     self.dialect.do_execute_no_params(
Step #3 - "Run integration tests":                         cursor, str_statement, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":             else:
Step #3 - "Run integration tests":                 effective_parameters = cast(
Step #3 - "Run integration tests":                     "_CoreSingleExecuteParams", effective_parameters
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":                 if self.dialect._has_events:
Step #3 - "Run integration tests":                     for fn in self.dialect.dispatch.do_execute:
Step #3 - "Run integration tests":                         if fn(
Step #3 - "Run integration tests":                             cursor,
Step #3 - "Run integration tests":                             str_statement,
Step #3 - "Run integration tests":                             effective_parameters,
Step #3 - "Run integration tests":                             context,
Step #3 - "Run integration tests":                         ):
Step #3 - "Run integration tests":                             evt_handled = True
Step #3 - "Run integration tests":                             break
Step #3 - "Run integration tests":                 if not evt_handled:
Step #3 - "Run integration tests": >                   self.dialect.do_execute(
Step #3 - "Run integration tests":                         cursor, str_statement, effective_parameters, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1967: 
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py:941: in do_execute
Step #3 - "Run integration tests":     cursor.execute(statement, parameters)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:572: in execute
Step #3 - "Run integration tests":     self._adapt_connection.await_(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:132: in await_only
Step #3 - "Run integration tests":     return current.parent.switch(awaitable)  # type: ignore[no-any-return,attr-defined] # noqa: E501
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:196: in greenlet_spawn
Step #3 - "Run integration tests":     value = await result
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:550: in _prepare_and_execute
Step #3 - "Run integration tests":     self._handle_exception(error)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:501: in _handle_exception
Step #3 - "Run integration tests":     self._adapt_connection._handle_exception(error)
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <AdaptedConnection <asyncpg.connection.Connection object at 0x7f82f10f86d0>>
Step #3 - "Run integration tests": error = PostgresSyntaxError('syntax error at or near "\'checkpoint_writes\'"')
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     def _handle_exception(self, error):
Step #3 - "Run integration tests":         if self._connection.is_closed():
Step #3 - "Run integration tests":             self._transaction = None
Step #3 - "Run integration tests":             self._started = False
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if not isinstance(error, AsyncAdapt_asyncpg_dbapi.Error):
Step #3 - "Run integration tests":             exception_mapping = self.dbapi._asyncpg_error_translate
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             for super_ in type(error).__mro__:
Step #3 - "Run integration tests":                 if super_ in exception_mapping:
Step #3 - "Run integration tests":                     translated_error = exception_mapping[super_](
Step #3 - "Run integration tests":                         "%s: %s" % (type(error), error)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":                     translated_error.pgcode = translated_error.sqlstate = (
Step #3 - "Run integration tests":                         getattr(error, "sqlstate", None)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests": >                   raise translated_error from error
Step #3 - "Run integration tests": E                   sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.ProgrammingError: <class 'asyncpg.exceptions.PostgresSyntaxError'>: syntax error at or near "'checkpoint_writes'"
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:784: ProgrammingError
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": The above exception was the direct cause of the following exception:
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": async_engine = <langchain_google_alloydb_pg.engine.AlloyDBEngine object at 0x7f82eba40520>
Step #3 - "Run integration tests": checkpointer = <langchain_google_alloydb_pg.async_checkpoint.AsyncAlloyDBSaver object at 0x7f82eb9d9240>
Step #3 - "Run integration tests": test_data = {'checkpoints': [{'channel_values': {'my_key': 'meow', 'node': 'node'}, 'channel_versions': {'__start__': 2, 'my_key':...rce': 'input', 'step': 2, 'writes': {}}, {'parents': None, 'source': 'loop', 'step': 1, 'writes': {'foo': 'bar'}}, {}]}
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     @pytest.mark.asyncio
Step #3 - "Run integration tests":     async def test_checkpoint_alist(
Step #3 - "Run integration tests":         async_engine: AlloyDBEngine,
Step #3 - "Run integration tests":         checkpointer: AsyncAlloyDBSaver,
Step #3 - "Run integration tests":         test_data: dict[str, Any],
Step #3 - "Run integration tests":     ) -> None:
Step #3 - "Run integration tests":         configs = test_data["configs"]
Step #3 - "Run integration tests":         checkpoints = test_data["checkpoints"]
Step #3 - "Run integration tests":         metadata = test_data["metadata"]
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         await checkpointer.aput(configs[1], checkpoints[1], metadata[0], {})
Step #3 - "Run integration tests":         await checkpointer.aput(configs[2], checkpoints[2], metadata[1], {})
Step #3 - "Run integration tests":         await checkpointer.aput(configs[3], checkpoints[3], metadata[2], {})
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         # call method / assertions
Step #3 - "Run integration tests":         query_1 = {"source": "input"}  # search by 1 key
Step #3 - "Run integration tests":         query_2 = {
Step #3 - "Run integration tests":             "step": 1,
Step #3 - "Run integration tests":             "writes": {"foo": "bar"},
Step #3 - "Run integration tests":         }  # search by multiple keys
Step #3 - "Run integration tests":         query_3: dict[str, Any] = {}  # search by no keys, return all checkpoints
Step #3 - "Run integration tests":         query_4 = {"source": "update", "step": 1}  # no match
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests": >       search_results_1 = [c async for c in checkpointer.alist(None, filter=query_1)]
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": tests/test_async_checkpoint.py:250: 
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": tests/test_async_checkpoint.py:250: in <listcomp>
Step #3 - "Run integration tests":     search_results_1 = [c async for c in checkpointer.alist(None, filter=query_1)]
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/langchain_google_alloydb_pg/async_checkpoint.py:442: in alist
Step #3 - "Run integration tests":     result = await conn.execute(text(query), args)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/ext/asyncio/engine.py:657: in execute
Step #3 - "Run integration tests":     result = await greenlet_spawn(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:201: in greenlet_spawn
Step #3 - "Run integration tests":     result = context.throw(*sys.exc_info())
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1418: in execute
Step #3 - "Run integration tests":     return meth(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py:515: in _execute_on_connection
Step #3 - "Run integration tests":     return connection._execute_clauseelement(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1640: in _execute_clauseelement
Step #3 - "Run integration tests":     ret = self._execute_context(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1846: in _execute_context
Step #3 - "Run integration tests":     return self._exec_single_context(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1986: in _exec_single_context
Step #3 - "Run integration tests":     self._handle_dbapi_exception(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:2355: in _handle_dbapi_exception
Step #3 - "Run integration tests":     raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1967: in _exec_single_context
Step #3 - "Run integration tests":     self.dialect.do_execute(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py:941: in do_execute
Step #3 - "Run integration tests":     cursor.execute(statement, parameters)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:572: in execute
Step #3 - "Run integration tests":     self._adapt_connection.await_(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:132: in await_only
Step #3 - "Run integration tests":     return current.parent.switch(awaitable)  # type: ignore[no-any-return,attr-defined] # noqa: E501
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:196: in greenlet_spawn
Step #3 - "Run integration tests":     value = await result
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:550: in _prepare_and_execute
Step #3 - "Run integration tests":     self._handle_exception(error)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:501: in _handle_exception
Step #3 - "Run integration tests":     self._adapt_connection._handle_exception(error)
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <AdaptedConnection <asyncpg.connection.Connection object at 0x7f82f10f86d0>>
Step #3 - "Run integration tests": error = PostgresSyntaxError('syntax error at or near "\'checkpoint_writes\'"')
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     def _handle_exception(self, error):
Step #3 - "Run integration tests":         if self._connection.is_closed():
Step #3 - "Run integration tests":             self._transaction = None
Step #3 - "Run integration tests":             self._started = False
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if not isinstance(error, AsyncAdapt_asyncpg_dbapi.Error):
Step #3 - "Run integration tests":             exception_mapping = self.dbapi._asyncpg_error_translate
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             for super_ in type(error).__mro__:
Step #3 - "Run integration tests":                 if super_ in exception_mapping:
Step #3 - "Run integration tests":                     translated_error = exception_mapping[super_](
Step #3 - "Run integration tests":                         "%s: %s" % (type(error), error)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":                     translated_error.pgcode = translated_error.sqlstate = (
Step #3 - "Run integration tests":                         getattr(error, "sqlstate", None)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests": >                   raise translated_error from error
Step #3 - "Run integration tests": E                   sqlalchemy.exc.ProgrammingError: (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.PostgresSyntaxError'>: syntax error at or near "'checkpoint_writes'"
Step #3 - "Run integration tests": E                   [SQL: 
Step #3 - "Run integration tests": E                           SELECT
Step #3 - "Run integration tests": E                               thread_id,
Step #3 - "Run integration tests": E                               checkpoint,
Step #3 - "Run integration tests": E                               checkpoint_ns,
Step #3 - "Run integration tests": E                               checkpoint_id,
Step #3 - "Run integration tests": E                               parent_checkpoint_id,
Step #3 - "Run integration tests": E                               metadata,
Step #3 - "Run integration tests": E                               (
Step #3 - "Run integration tests": E                                   SELECT array_agg(array[cw.task_id::text::bytea, cw.channel::bytea, cw.type::bytea, cw.blob] order by cw.task_id, cw.idx)
Step #3 - "Run integration tests": E                                   FROM "public".'checkpoint_writes' cw
Step #3 - "Run integration tests": E                                   where cw.thread_id = c.thread_id
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_ns = c.checkpoint_ns
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_id = c.checkpoint_id
Step #3 - "Run integration tests": E                               ) AS pending_writes,
Step #3 - "Run integration tests": E                               (
Step #3 - "Run integration tests": E                                   SELECT array_agg(array[cw.type::bytea, cw.blob] order by cw.task_path, cw.task_id, cw.idx)
Step #3 - "Run integration tests": E                                   FROM "public".'checkpoint_writes' cw
Step #3 - "Run integration tests": E                                   WHERE cw.thread_id = c.thread_id
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_ns = c.checkpoint_ns
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_id = c.parent_checkpoint_id
Step #3 - "Run integration tests": E                                       AND cw.channel = '__pregel_tasks'
Step #3 - "Run integration tests": E                               ) AS pending_sends
Step #3 - "Run integration tests": E                           FROM "public".'checkpoints' c
Step #3 - "Run integration tests": E                           WHERE metadata @> $1 ORDER BY checkpoint_id DESC]
Step #3 - "Run integration tests": E                   [parameters: ('{"source": "input"}',)]
Step #3 - "Run integration tests": E                   (Background on this error at: https://sqlalche.me/e/20/f405)
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:784: ProgrammingError
Step #3 - "Run integration tests": __________________________ test_checkpoint_aget_tuple __________________________
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_cursor object at 0x7f82eba9a500>
Step #3 - "Run integration tests": operation = '\n        SELECT\n            thread_id,\n            checkpoint,\n            checkpoint_ns,\n            checkpoint...s\n        FROM "public".\'checkpoints\' c\n        WHERE thread_id = $1 AND checkpoint_ns = $2 AND checkpoint_id = $3'
Step #3 - "Run integration tests": parameters = ('thread-1', '', '1')
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     async def _prepare_and_execute(self, operation, parameters):
Step #3 - "Run integration tests":         adapt_connection = self._adapt_connection
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         async with adapt_connection._execute_mutex:
Step #3 - "Run integration tests":             if not adapt_connection._started:
Step #3 - "Run integration tests":                 await adapt_connection._start_transaction()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             if parameters is None:
Step #3 - "Run integration tests":                 parameters = ()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             try:
Step #3 - "Run integration tests": >               prepared_stmt, attributes = await adapt_connection._prepare(
Step #3 - "Run integration tests":                     operation, self._invalidate_schema_cache_asof
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:514: 
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:760: in _prepare
Step #3 - "Run integration tests":     prepared_stmt = await self._connection.prepare(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/asyncpg/connection.py:635: in prepare
Step #3 - "Run integration tests":     return await self._prepare(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/asyncpg/connection.py:653: in _prepare
Step #3 - "Run integration tests":     stmt = await self._get_statement(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/asyncpg/connection.py:432: in _get_statement
Step #3 - "Run integration tests":     statement = await self._protocol.prepare(
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": >   ???
Step #3 - "Run integration tests": E   asyncpg.exceptions.PostgresSyntaxError: syntax error at or near "'checkpoint_writes'"
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": asyncpg/protocol/protocol.pyx:165: PostgresSyntaxError
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": The above exception was the direct cause of the following exception:
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <sqlalchemy.engine.base.Connection object at 0x7f82ebc9bdf0>
Step #3 - "Run integration tests": dialect = <sqlalchemy.dialects.postgresql.asyncpg.PGDialect_asyncpg object at 0x7f82eb7e6110>
Step #3 - "Run integration tests": context = <sqlalchemy.dialects.postgresql.asyncpg.PGExecutionContext_asyncpg object at 0x7f82ebc860e0>
Step #3 - "Run integration tests": statement = <sqlalchemy.dialects.postgresql.asyncpg.PGCompiler_asyncpg object at 0x7f82ebc86410>
Step #3 - "Run integration tests": parameters = [('thread-1', '', '1')]
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     def _exec_single_context(
Step #3 - "Run integration tests":         self,
Step #3 - "Run integration tests":         dialect: Dialect,
Step #3 - "Run integration tests":         context: ExecutionContext,
Step #3 - "Run integration tests":         statement: Union[str, Compiled],
Step #3 - "Run integration tests":         parameters: Optional[_AnyMultiExecuteParams],
Step #3 - "Run integration tests":     ) -> CursorResult[Any]:
Step #3 - "Run integration tests":         """continue the _execute_context() method for a single DBAPI
Step #3 - "Run integration tests":         cursor.execute() or cursor.executemany() call.
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         """
Step #3 - "Run integration tests":         if dialect.bind_typing is BindTyping.SETINPUTSIZES:
Step #3 - "Run integration tests":             generic_setinputsizes = context._prepare_set_input_sizes()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             if generic_setinputsizes:
Step #3 - "Run integration tests":                 try:
Step #3 - "Run integration tests":                     dialect.do_set_input_sizes(
Step #3 - "Run integration tests":                         context.cursor, generic_setinputsizes, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":                 except BaseException as e:
Step #3 - "Run integration tests":                     self._handle_dbapi_exception(
Step #3 - "Run integration tests":                         e, str(statement), parameters, None, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         cursor, str_statement, parameters = (
Step #3 - "Run integration tests":             context.cursor,
Step #3 - "Run integration tests":             context.statement,
Step #3 - "Run integration tests":             context.parameters,
Step #3 - "Run integration tests":         )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         effective_parameters: Optional[_AnyExecuteParams]
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if not context.executemany:
Step #3 - "Run integration tests":             effective_parameters = parameters[0]
Step #3 - "Run integration tests":         else:
Step #3 - "Run integration tests":             effective_parameters = parameters
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if self._has_events or self.engine._has_events:
Step #3 - "Run integration tests":             for fn in self.dispatch.before_cursor_execute:
Step #3 - "Run integration tests":                 str_statement, effective_parameters = fn(
Step #3 - "Run integration tests":                     self,
Step #3 - "Run integration tests":                     cursor,
Step #3 - "Run integration tests":                     str_statement,
Step #3 - "Run integration tests":                     effective_parameters,
Step #3 - "Run integration tests":                     context,
Step #3 - "Run integration tests":                     context.executemany,
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if self._echo:
Step #3 - "Run integration tests":             self._log_info(str_statement)
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             stats = context._get_cache_stats()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             if not self.engine.hide_parameters:
Step #3 - "Run integration tests":                 self._log_info(
Step #3 - "Run integration tests":                     "[%s] %r",
Step #3 - "Run integration tests":                     stats,
Step #3 - "Run integration tests":                     sql_util._repr_params(
Step #3 - "Run integration tests":                         effective_parameters,
Step #3 - "Run integration tests":                         batches=10,
Step #3 - "Run integration tests":                         ismulti=context.executemany,
Step #3 - "Run integration tests":                     ),
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":             else:
Step #3 - "Run integration tests":                 self._log_info(
Step #3 - "Run integration tests":                     "[%s] [SQL parameters hidden due to hide_parameters=True]",
Step #3 - "Run integration tests":                     stats,
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         evt_handled: bool = False
Step #3 - "Run integration tests":         try:
Step #3 - "Run integration tests":             if context.execute_style is ExecuteStyle.EXECUTEMANY:
Step #3 - "Run integration tests":                 effective_parameters = cast(
Step #3 - "Run integration tests":                     "_CoreMultiExecuteParams", effective_parameters
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":                 if self.dialect._has_events:
Step #3 - "Run integration tests":                     for fn in self.dialect.dispatch.do_executemany:
Step #3 - "Run integration tests":                         if fn(
Step #3 - "Run integration tests":                             cursor,
Step #3 - "Run integration tests":                             str_statement,
Step #3 - "Run integration tests":                             effective_parameters,
Step #3 - "Run integration tests":                             context,
Step #3 - "Run integration tests":                         ):
Step #3 - "Run integration tests":                             evt_handled = True
Step #3 - "Run integration tests":                             break
Step #3 - "Run integration tests":                 if not evt_handled:
Step #3 - "Run integration tests":                     self.dialect.do_executemany(
Step #3 - "Run integration tests":                         cursor,
Step #3 - "Run integration tests":                         str_statement,
Step #3 - "Run integration tests":                         effective_parameters,
Step #3 - "Run integration tests":                         context,
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":             elif not effective_parameters and context.no_parameters:
Step #3 - "Run integration tests":                 if self.dialect._has_events:
Step #3 - "Run integration tests":                     for fn in self.dialect.dispatch.do_execute_no_params:
Step #3 - "Run integration tests":                         if fn(cursor, str_statement, context):
Step #3 - "Run integration tests":                             evt_handled = True
Step #3 - "Run integration tests":                             break
Step #3 - "Run integration tests":                 if not evt_handled:
Step #3 - "Run integration tests":                     self.dialect.do_execute_no_params(
Step #3 - "Run integration tests":                         cursor, str_statement, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":             else:
Step #3 - "Run integration tests":                 effective_parameters = cast(
Step #3 - "Run integration tests":                     "_CoreSingleExecuteParams", effective_parameters
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":                 if self.dialect._has_events:
Step #3 - "Run integration tests":                     for fn in self.dialect.dispatch.do_execute:
Step #3 - "Run integration tests":                         if fn(
Step #3 - "Run integration tests":                             cursor,
Step #3 - "Run integration tests":                             str_statement,
Step #3 - "Run integration tests":                             effective_parameters,
Step #3 - "Run integration tests":                             context,
Step #3 - "Run integration tests":                         ):
Step #3 - "Run integration tests":                             evt_handled = True
Step #3 - "Run integration tests":                             break
Step #3 - "Run integration tests":                 if not evt_handled:
Step #3 - "Run integration tests": >                   self.dialect.do_execute(
Step #3 - "Run integration tests":                         cursor, str_statement, effective_parameters, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1967: 
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py:941: in do_execute
Step #3 - "Run integration tests":     cursor.execute(statement, parameters)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:572: in execute
Step #3 - "Run integration tests":     self._adapt_connection.await_(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:132: in await_only
Step #3 - "Run integration tests":     return current.parent.switch(awaitable)  # type: ignore[no-any-return,attr-defined] # noqa: E501
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:196: in greenlet_spawn
Step #3 - "Run integration tests":     value = await result
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:550: in _prepare_and_execute
Step #3 - "Run integration tests":     self._handle_exception(error)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:501: in _handle_exception
Step #3 - "Run integration tests":     self._adapt_connection._handle_exception(error)
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <AdaptedConnection <asyncpg.connection.Connection object at 0x7f82f10f84f0>>
Step #3 - "Run integration tests": error = PostgresSyntaxError('syntax error at or near "\'checkpoint_writes\'"')
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     def _handle_exception(self, error):
Step #3 - "Run integration tests":         if self._connection.is_closed():
Step #3 - "Run integration tests":             self._transaction = None
Step #3 - "Run integration tests":             self._started = False
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if not isinstance(error, AsyncAdapt_asyncpg_dbapi.Error):
Step #3 - "Run integration tests":             exception_mapping = self.dbapi._asyncpg_error_translate
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             for super_ in type(error).__mro__:
Step #3 - "Run integration tests":                 if super_ in exception_mapping:
Step #3 - "Run integration tests":                     translated_error = exception_mapping[super_](
Step #3 - "Run integration tests":                         "%s: %s" % (type(error), error)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":                     translated_error.pgcode = translated_error.sqlstate = (
Step #3 - "Run integration tests":                         getattr(error, "sqlstate", None)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests": >                   raise translated_error from error
Step #3 - "Run integration tests": E                   sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.ProgrammingError: <class 'asyncpg.exceptions.PostgresSyntaxError'>: syntax error at or near "'checkpoint_writes'"
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:784: ProgrammingError
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": The above exception was the direct cause of the following exception:
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": checkpointer = <langchain_google_alloydb_pg.async_checkpoint.AsyncAlloyDBSaver object at 0x7f82fb4b44c0>
Step #3 - "Run integration tests": test_data = {'checkpoints': [{'channel_values': {'my_key': 'meow', 'node': 'node'}, 'channel_versions': {'__start__': 2, 'my_key':...rce': 'input', 'step': 2, 'writes': {}}, {'parents': None, 'source': 'loop', 'step': 1, 'writes': {'foo': 'bar'}}, {}]}
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     @pytest.mark.asyncio
Step #3 - "Run integration tests":     async def test_checkpoint_aget_tuple(
Step #3 - "Run integration tests":         checkpointer: AsyncAlloyDBSaver,
Step #3 - "Run integration tests":         test_data: dict[str, Any],
Step #3 - "Run integration tests":     ) -> None:
Step #3 - "Run integration tests":         configs = test_data["configs"]
Step #3 - "Run integration tests":         checkpoints = test_data["checkpoints"]
Step #3 - "Run integration tests":         metadata = test_data["metadata"]
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         await checkpointer.aput(configs[1], checkpoints[1], metadata[0], {})
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         # Matching checkpoint
Step #3 - "Run integration tests": >       search_results_1 = await checkpointer.aget_tuple(configs[1])
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": tests/test_async_checkpoint.py:287: 
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/langchain_google_alloydb_pg/async_checkpoint.py:525: in aget_tuple
Step #3 - "Run integration tests":     result = await conn.execute(text(SELECT + where), args)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/ext/asyncio/engine.py:657: in execute
Step #3 - "Run integration tests":     result = await greenlet_spawn(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:201: in greenlet_spawn
Step #3 - "Run integration tests":     result = context.throw(*sys.exc_info())
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1418: in execute
Step #3 - "Run integration tests":     return meth(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py:515: in _execute_on_connection
Step #3 - "Run integration tests":     return connection._execute_clauseelement(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1640: in _execute_clauseelement
Step #3 - "Run integration tests":     ret = self._execute_context(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1846: in _execute_context
Step #3 - "Run integration tests":     return self._exec_single_context(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1986: in _exec_single_context
Step #3 - "Run integration tests":     self._handle_dbapi_exception(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:2355: in _handle_dbapi_exception
Step #3 - "Run integration tests":     raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1967: in _exec_single_context
Step #3 - "Run integration tests":     self.dialect.do_execute(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py:941: in do_execute
Step #3 - "Run integration tests":     cursor.execute(statement, parameters)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:572: in execute
Step #3 - "Run integration tests":     self._adapt_connection.await_(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:132: in await_only
Step #3 - "Run integration tests":     return current.parent.switch(awaitable)  # type: ignore[no-any-return,attr-defined] # noqa: E501
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:196: in greenlet_spawn
Step #3 - "Run integration tests":     value = await result
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:550: in _prepare_and_execute
Step #3 - "Run integration tests":     self._handle_exception(error)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:501: in _handle_exception
Step #3 - "Run integration tests":     self._adapt_connection._handle_exception(error)
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <AdaptedConnection <asyncpg.connection.Connection object at 0x7f82f10f84f0>>
Step #3 - "Run integration tests": error = PostgresSyntaxError('syntax error at or near "\'checkpoint_writes\'"')
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     def _handle_exception(self, error):
Step #3 - "Run integration tests":         if self._connection.is_closed():
Step #3 - "Run integration tests":             self._transaction = None
Step #3 - "Run integration tests":             self._started = False
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if not isinstance(error, AsyncAdapt_asyncpg_dbapi.Error):
Step #3 - "Run integration tests":             exception_mapping = self.dbapi._asyncpg_error_translate
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             for super_ in type(error).__mro__:
Step #3 - "Run integration tests":                 if super_ in exception_mapping:
Step #3 - "Run integration tests":                     translated_error = exception_mapping[super_](
Step #3 - "Run integration tests":                         "%s: %s" % (type(error), error)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":                     translated_error.pgcode = translated_error.sqlstate = (
Step #3 - "Run integration tests":                         getattr(error, "sqlstate", None)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests": >                   raise translated_error from error
Step #3 - "Run integration tests": E                   sqlalchemy.exc.ProgrammingError: (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.PostgresSyntaxError'>: syntax error at or near "'checkpoint_writes'"
Step #3 - "Run integration tests": E                   [SQL: 
Step #3 - "Run integration tests": E                           SELECT
Step #3 - "Run integration tests": E                               thread_id,
Step #3 - "Run integration tests": E                               checkpoint,
Step #3 - "Run integration tests": E                               checkpoint_ns,
Step #3 - "Run integration tests": E                               checkpoint_id,
Step #3 - "Run integration tests": E                               parent_checkpoint_id,
Step #3 - "Run integration tests": E                               metadata,
Step #3 - "Run integration tests": E                               (
Step #3 - "Run integration tests": E                                   SELECT array_agg(array[cw.task_id::text::bytea, cw.channel::bytea, cw.type::bytea, cw.blob] order by cw.task_id, cw.idx)
Step #3 - "Run integration tests": E                                   FROM "public".'checkpoint_writes' cw
Step #3 - "Run integration tests": E                                   where cw.thread_id = c.thread_id
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_ns = c.checkpoint_ns
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_id = c.checkpoint_id
Step #3 - "Run integration tests": E                               ) AS pending_writes,
Step #3 - "Run integration tests": E                               (
Step #3 - "Run integration tests": E                                   SELECT array_agg(array[cw.type::bytea, cw.blob] order by cw.task_path, cw.task_id, cw.idx)
Step #3 - "Run integration tests": E                                   FROM "public".'checkpoint_writes' cw
Step #3 - "Run integration tests": E                                   WHERE cw.thread_id = c.thread_id
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_ns = c.checkpoint_ns
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_id = c.parent_checkpoint_id
Step #3 - "Run integration tests": E                                       AND cw.channel = '__pregel_tasks'
Step #3 - "Run integration tests": E                               ) AS pending_sends
Step #3 - "Run integration tests": E                           FROM "public".'checkpoints' c
Step #3 - "Run integration tests": E                           WHERE thread_id = $1 AND checkpoint_ns = $2 AND checkpoint_id = $3]
Step #3 - "Run integration tests": E                   [parameters: ('thread-1', '', '1')]
Step #3 - "Run integration tests": E                   (Background on this error at: https://sqlalche.me/e/20/f405)
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:784: ProgrammingError
Step #3 - "Run integration tests": _______________________________ test_null_chars ________________________________
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_cursor object at 0x7f82eba6bd00>
Step #3 - "Run integration tests": operation = '\n        SELECT\n            thread_id,\n            checkpoint,\n            checkpoint_ns,\n            checkpoint...s\n        FROM "public".\'checkpoints\' c\n        WHERE thread_id = $1 AND checkpoint_ns = $2 AND checkpoint_id = $3'
Step #3 - "Run integration tests": parameters = ('1', '', '1ef4f797-8335-6428-8001-8a1503f9b875')
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     async def _prepare_and_execute(self, operation, parameters):
Step #3 - "Run integration tests":         adapt_connection = self._adapt_connection
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         async with adapt_connection._execute_mutex:
Step #3 - "Run integration tests":             if not adapt_connection._started:
Step #3 - "Run integration tests":                 await adapt_connection._start_transaction()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             if parameters is None:
Step #3 - "Run integration tests":                 parameters = ()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             try:
Step #3 - "Run integration tests": >               prepared_stmt, attributes = await adapt_connection._prepare(
Step #3 - "Run integration tests":                     operation, self._invalidate_schema_cache_asof
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:514: 
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:760: in _prepare
Step #3 - "Run integration tests":     prepared_stmt = await self._connection.prepare(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/asyncpg/connection.py:635: in prepare
Step #3 - "Run integration tests":     return await self._prepare(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/asyncpg/connection.py:653: in _prepare
Step #3 - "Run integration tests":     stmt = await self._get_statement(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/asyncpg/connection.py:432: in _get_statement
Step #3 - "Run integration tests":     statement = await self._protocol.prepare(
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": >   ???
Step #3 - "Run integration tests": E   asyncpg.exceptions.PostgresSyntaxError: syntax error at or near "'checkpoint_writes'"
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": asyncpg/protocol/protocol.pyx:165: PostgresSyntaxError
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": The above exception was the direct cause of the following exception:
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <sqlalchemy.engine.base.Connection object at 0x7f82ebf95cf0>
Step #3 - "Run integration tests": dialect = <sqlalchemy.dialects.postgresql.asyncpg.PGDialect_asyncpg object at 0x7f82eb0702e0>
Step #3 - "Run integration tests": context = <sqlalchemy.dialects.postgresql.asyncpg.PGExecutionContext_asyncpg object at 0x7f82ebb5a8f0>
Step #3 - "Run integration tests": statement = <sqlalchemy.dialects.postgresql.asyncpg.PGCompiler_asyncpg object at 0x7f82eba43b80>
Step #3 - "Run integration tests": parameters = [('1', '', '1ef4f797-8335-6428-8001-8a1503f9b875')]
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     def _exec_single_context(
Step #3 - "Run integration tests":         self,
Step #3 - "Run integration tests":         dialect: Dialect,
Step #3 - "Run integration tests":         context: ExecutionContext,
Step #3 - "Run integration tests":         statement: Union[str, Compiled],
Step #3 - "Run integration tests":         parameters: Optional[_AnyMultiExecuteParams],
Step #3 - "Run integration tests":     ) -> CursorResult[Any]:
Step #3 - "Run integration tests":         """continue the _execute_context() method for a single DBAPI
Step #3 - "Run integration tests":         cursor.execute() or cursor.executemany() call.
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         """
Step #3 - "Run integration tests":         if dialect.bind_typing is BindTyping.SETINPUTSIZES:
Step #3 - "Run integration tests":             generic_setinputsizes = context._prepare_set_input_sizes()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             if generic_setinputsizes:
Step #3 - "Run integration tests":                 try:
Step #3 - "Run integration tests":                     dialect.do_set_input_sizes(
Step #3 - "Run integration tests":                         context.cursor, generic_setinputsizes, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":                 except BaseException as e:
Step #3 - "Run integration tests":                     self._handle_dbapi_exception(
Step #3 - "Run integration tests":                         e, str(statement), parameters, None, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         cursor, str_statement, parameters = (
Step #3 - "Run integration tests":             context.cursor,
Step #3 - "Run integration tests":             context.statement,
Step #3 - "Run integration tests":             context.parameters,
Step #3 - "Run integration tests":         )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         effective_parameters: Optional[_AnyExecuteParams]
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if not context.executemany:
Step #3 - "Run integration tests":             effective_parameters = parameters[0]
Step #3 - "Run integration tests":         else:
Step #3 - "Run integration tests":             effective_parameters = parameters
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if self._has_events or self.engine._has_events:
Step #3 - "Run integration tests":             for fn in self.dispatch.before_cursor_execute:
Step #3 - "Run integration tests":                 str_statement, effective_parameters = fn(
Step #3 - "Run integration tests":                     self,
Step #3 - "Run integration tests":                     cursor,
Step #3 - "Run integration tests":                     str_statement,
Step #3 - "Run integration tests":                     effective_parameters,
Step #3 - "Run integration tests":                     context,
Step #3 - "Run integration tests":                     context.executemany,
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if self._echo:
Step #3 - "Run integration tests":             self._log_info(str_statement)
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             stats = context._get_cache_stats()
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             if not self.engine.hide_parameters:
Step #3 - "Run integration tests":                 self._log_info(
Step #3 - "Run integration tests":                     "[%s] %r",
Step #3 - "Run integration tests":                     stats,
Step #3 - "Run integration tests":                     sql_util._repr_params(
Step #3 - "Run integration tests":                         effective_parameters,
Step #3 - "Run integration tests":                         batches=10,
Step #3 - "Run integration tests":                         ismulti=context.executemany,
Step #3 - "Run integration tests":                     ),
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":             else:
Step #3 - "Run integration tests":                 self._log_info(
Step #3 - "Run integration tests":                     "[%s] [SQL parameters hidden due to hide_parameters=True]",
Step #3 - "Run integration tests":                     stats,
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         evt_handled: bool = False
Step #3 - "Run integration tests":         try:
Step #3 - "Run integration tests":             if context.execute_style is ExecuteStyle.EXECUTEMANY:
Step #3 - "Run integration tests":                 effective_parameters = cast(
Step #3 - "Run integration tests":                     "_CoreMultiExecuteParams", effective_parameters
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":                 if self.dialect._has_events:
Step #3 - "Run integration tests":                     for fn in self.dialect.dispatch.do_executemany:
Step #3 - "Run integration tests":                         if fn(
Step #3 - "Run integration tests":                             cursor,
Step #3 - "Run integration tests":                             str_statement,
Step #3 - "Run integration tests":                             effective_parameters,
Step #3 - "Run integration tests":                             context,
Step #3 - "Run integration tests":                         ):
Step #3 - "Run integration tests":                             evt_handled = True
Step #3 - "Run integration tests":                             break
Step #3 - "Run integration tests":                 if not evt_handled:
Step #3 - "Run integration tests":                     self.dialect.do_executemany(
Step #3 - "Run integration tests":                         cursor,
Step #3 - "Run integration tests":                         str_statement,
Step #3 - "Run integration tests":                         effective_parameters,
Step #3 - "Run integration tests":                         context,
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":             elif not effective_parameters and context.no_parameters:
Step #3 - "Run integration tests":                 if self.dialect._has_events:
Step #3 - "Run integration tests":                     for fn in self.dialect.dispatch.do_execute_no_params:
Step #3 - "Run integration tests":                         if fn(cursor, str_statement, context):
Step #3 - "Run integration tests":                             evt_handled = True
Step #3 - "Run integration tests":                             break
Step #3 - "Run integration tests":                 if not evt_handled:
Step #3 - "Run integration tests":                     self.dialect.do_execute_no_params(
Step #3 - "Run integration tests":                         cursor, str_statement, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":             else:
Step #3 - "Run integration tests":                 effective_parameters = cast(
Step #3 - "Run integration tests":                     "_CoreSingleExecuteParams", effective_parameters
Step #3 - "Run integration tests":                 )
Step #3 - "Run integration tests":                 if self.dialect._has_events:
Step #3 - "Run integration tests":                     for fn in self.dialect.dispatch.do_execute:
Step #3 - "Run integration tests":                         if fn(
Step #3 - "Run integration tests":                             cursor,
Step #3 - "Run integration tests":                             str_statement,
Step #3 - "Run integration tests":                             effective_parameters,
Step #3 - "Run integration tests":                             context,
Step #3 - "Run integration tests":                         ):
Step #3 - "Run integration tests":                             evt_handled = True
Step #3 - "Run integration tests":                             break
Step #3 - "Run integration tests":                 if not evt_handled:
Step #3 - "Run integration tests": >                   self.dialect.do_execute(
Step #3 - "Run integration tests":                         cursor, str_statement, effective_parameters, context
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1967: 
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py:941: in do_execute
Step #3 - "Run integration tests":     cursor.execute(statement, parameters)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:572: in execute
Step #3 - "Run integration tests":     self._adapt_connection.await_(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:132: in await_only
Step #3 - "Run integration tests":     return current.parent.switch(awaitable)  # type: ignore[no-any-return,attr-defined] # noqa: E501
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:196: in greenlet_spawn
Step #3 - "Run integration tests":     value = await result
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:550: in _prepare_and_execute
Step #3 - "Run integration tests":     self._handle_exception(error)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:501: in _handle_exception
Step #3 - "Run integration tests":     self._adapt_connection._handle_exception(error)
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <AdaptedConnection <asyncpg.connection.Connection object at 0x7f82f10fb790>>
Step #3 - "Run integration tests": error = PostgresSyntaxError('syntax error at or near "\'checkpoint_writes\'"')
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     def _handle_exception(self, error):
Step #3 - "Run integration tests":         if self._connection.is_closed():
Step #3 - "Run integration tests":             self._transaction = None
Step #3 - "Run integration tests":             self._started = False
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if not isinstance(error, AsyncAdapt_asyncpg_dbapi.Error):
Step #3 - "Run integration tests":             exception_mapping = self.dbapi._asyncpg_error_translate
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             for super_ in type(error).__mro__:
Step #3 - "Run integration tests":                 if super_ in exception_mapping:
Step #3 - "Run integration tests":                     translated_error = exception_mapping[super_](
Step #3 - "Run integration tests":                         "%s: %s" % (type(error), error)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":                     translated_error.pgcode = translated_error.sqlstate = (
Step #3 - "Run integration tests":                         getattr(error, "sqlstate", None)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests": >                   raise translated_error from error
Step #3 - "Run integration tests": E                   sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.ProgrammingError: <class 'asyncpg.exceptions.PostgresSyntaxError'>: syntax error at or near "'checkpoint_writes'"
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:784: ProgrammingError
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": The above exception was the direct cause of the following exception:
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": checkpointer = <langchain_google_alloydb_pg.async_checkpoint.AsyncAlloyDBSaver object at 0x7f82eba0ffa0>
Step #3 - "Run integration tests": test_data = {'checkpoints': [{'channel_values': {'my_key': 'meow', 'node': 'node'}, 'channel_versions': {'__start__': 2, 'my_key':...rce': 'input', 'step': 2, 'writes': {}}, {'parents': None, 'source': 'loop', 'step': 1, 'writes': {'foo': 'bar'}}, {}]}
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     @pytest.mark.asyncio
Step #3 - "Run integration tests":     async def test_null_chars(
Step #3 - "Run integration tests":         checkpointer: AsyncAlloyDBSaver,
Step #3 - "Run integration tests":         test_data: dict[str, Any],
Step #3 - "Run integration tests":     ) -> None:
Step #3 - "Run integration tests":         config = await checkpointer.aput(
Step #3 - "Run integration tests":             test_data["configs"][0],
Step #3 - "Run integration tests":             test_data["checkpoints"][0],
Step #3 - "Run integration tests":             {"my_key": "\x00abc"},  # type: ignore
Step #3 - "Run integration tests":             {},
Step #3 - "Run integration tests":         )
Step #3 - "Run integration tests": >       assert (await checkpointer.aget_tuple(config)).metadata["my_key"] == "abc"  # type: ignore
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": tests/test_async_checkpoint.py:305: 
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/langchain_google_alloydb_pg/async_checkpoint.py:525: in aget_tuple
Step #3 - "Run integration tests":     result = await conn.execute(text(SELECT + where), args)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/ext/asyncio/engine.py:657: in execute
Step #3 - "Run integration tests":     result = await greenlet_spawn(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:201: in greenlet_spawn
Step #3 - "Run integration tests":     result = context.throw(*sys.exc_info())
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1418: in execute
Step #3 - "Run integration tests":     return meth(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py:515: in _execute_on_connection
Step #3 - "Run integration tests":     return connection._execute_clauseelement(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1640: in _execute_clauseelement
Step #3 - "Run integration tests":     ret = self._execute_context(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1846: in _execute_context
Step #3 - "Run integration tests":     return self._exec_single_context(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1986: in _exec_single_context
Step #3 - "Run integration tests":     self._handle_dbapi_exception(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:2355: in _handle_dbapi_exception
Step #3 - "Run integration tests":     raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py:1967: in _exec_single_context
Step #3 - "Run integration tests":     self.dialect.do_execute(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py:941: in do_execute
Step #3 - "Run integration tests":     cursor.execute(statement, parameters)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:572: in execute
Step #3 - "Run integration tests":     self._adapt_connection.await_(
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:132: in await_only
Step #3 - "Run integration tests":     return current.parent.switch(awaitable)  # type: ignore[no-any-return,attr-defined] # noqa: E501
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py:196: in greenlet_spawn
Step #3 - "Run integration tests":     value = await result
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:550: in _prepare_and_execute
Step #3 - "Run integration tests":     self._handle_exception(error)
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:501: in _handle_exception
Step #3 - "Run integration tests":     self._adapt_connection._handle_exception(error)
Step #3 - "Run integration tests": _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": self = <AdaptedConnection <asyncpg.connection.Connection object at 0x7f82f10fb790>>
Step #3 - "Run integration tests": error = PostgresSyntaxError('syntax error at or near "\'checkpoint_writes\'"')
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests":     def _handle_exception(self, error):
Step #3 - "Run integration tests":         if self._connection.is_closed():
Step #3 - "Run integration tests":             self._transaction = None
Step #3 - "Run integration tests":             self._started = False
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":         if not isinstance(error, AsyncAdapt_asyncpg_dbapi.Error):
Step #3 - "Run integration tests":             exception_mapping = self.dbapi._asyncpg_error_translate
Step #3 - "Run integration tests":     
Step #3 - "Run integration tests":             for super_ in type(error).__mro__:
Step #3 - "Run integration tests":                 if super_ in exception_mapping:
Step #3 - "Run integration tests":                     translated_error = exception_mapping[super_](
Step #3 - "Run integration tests":                         "%s: %s" % (type(error), error)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests":                     translated_error.pgcode = translated_error.sqlstate = (
Step #3 - "Run integration tests":                         getattr(error, "sqlstate", None)
Step #3 - "Run integration tests":                     )
Step #3 - "Run integration tests": >                   raise translated_error from error
Step #3 - "Run integration tests": E                   sqlalchemy.exc.ProgrammingError: (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.PostgresSyntaxError'>: syntax error at or near "'checkpoint_writes'"
Step #3 - "Run integration tests": E                   [SQL: 
Step #3 - "Run integration tests": E                           SELECT
Step #3 - "Run integration tests": E                               thread_id,
Step #3 - "Run integration tests": E                               checkpoint,
Step #3 - "Run integration tests": E                               checkpoint_ns,
Step #3 - "Run integration tests": E                               checkpoint_id,
Step #3 - "Run integration tests": E                               parent_checkpoint_id,
Step #3 - "Run integration tests": E                               metadata,
Step #3 - "Run integration tests": E                               (
Step #3 - "Run integration tests": E                                   SELECT array_agg(array[cw.task_id::text::bytea, cw.channel::bytea, cw.type::bytea, cw.blob] order by cw.task_id, cw.idx)
Step #3 - "Run integration tests": E                                   FROM "public".'checkpoint_writes' cw
Step #3 - "Run integration tests": E                                   where cw.thread_id = c.thread_id
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_ns = c.checkpoint_ns
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_id = c.checkpoint_id
Step #3 - "Run integration tests": E                               ) AS pending_writes,
Step #3 - "Run integration tests": E                               (
Step #3 - "Run integration tests": E                                   SELECT array_agg(array[cw.type::bytea, cw.blob] order by cw.task_path, cw.task_id, cw.idx)
Step #3 - "Run integration tests": E                                   FROM "public".'checkpoint_writes' cw
Step #3 - "Run integration tests": E                                   WHERE cw.thread_id = c.thread_id
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_ns = c.checkpoint_ns
Step #3 - "Run integration tests": E                                       AND cw.checkpoint_id = c.parent_checkpoint_id
Step #3 - "Run integration tests": E                                       AND cw.channel = '__pregel_tasks'
Step #3 - "Run integration tests": E                               ) AS pending_sends
Step #3 - "Run integration tests": E                           FROM "public".'checkpoints' c
Step #3 - "Run integration tests": E                           WHERE thread_id = $1 AND checkpoint_ns = $2 AND checkpoint_id = $3]
Step #3 - "Run integration tests": E                   [parameters: ('1', '', '1ef4f797-8335-6428-8001-8a1503f9b875')]
Step #3 - "Run integration tests": E                   (Background on this error at: https://sqlalche.me/e/20/f405)
Step #3 - "Run integration tests": 
Step #3 - "Run integration tests": /builder/home/.local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:784: ProgrammingError
Step #3 - "Run integration tests": =============================== warnings summary ===============================

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants