bug: GraphQL subscription schema mismatch breaks bot startups
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start at flexus_client_kit/ckit_bot_exec.py:436 in subscribe_and_produce_callbacks and inspect the generated FBotThreadsCallsTasks subscription fields. Compare the requested field names with the current dataclass/schema, then verify the startup subscription no longer produces the reported schema mismatch for affected bots.
Written by the indexing model from the issue text.
Description
Original Logs
20260410 11:16:25.721 fclnt [INFO] FlexusClient service_name=bob_60008_r_ api_key=None http://backend-v1-service.flexus.svc/v1/jailed-bot
20260410 11:16:25.722 stexe [INFO] Connecting ws://backend-v1-service.flexus.svc/v1/jailed-bot
20260410 11:16:25.781 btexe [ERROR] 🛑 That looks bad, my key doesn't work: {'message': "403: Whoops your key didn't work (2).", 'locations': [{'line': 2, 'column': 3}], 'path': ['bot_confirm_exists']}
20260410 11:16:25.786 stexe [INFO] got TransportQueryError (attempt 1/3), sleep 60...
20260410 11:17:25.787 stexe [INFO] Connecting ws://backend-v1-service.flexus.svc/v1/jailed-bot
20260410 11:17:25.819 btexe [INFO] i_am_still_alive bob:60008 group_id=None
20260410 11:17:25.841 stexe [INFO] got TransportQueryError (attempt 2/3), sleep 60...
20260410 11:18:25.843 stexe [INFO] Connecting ws://backend-v1-service.flexus.svc/v1/jailed-bot
20260410 11:18:25.885 btexe [ERROR] 🛑 3 exceptions in 5 min, exiting
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/flexus_client_kit/ckit_service_exec.py", line 26, in run_typical_single_subscription_with_restart_on_network_errors
await subscribe_and_do_something(fclient, ws_client, *func_args, **func_kwargs)
File "/usr/local/lib/python3.11/site-packages/flexus_client_kit/ckit_bot_exec.py", line 412, in subscribe_and_produce_callbacks
async for r in ws.subscribe(
File "/usr/local/lib/python3.11/site-packages/gql/client.py", line 1426, in subscribe
async for result in inner_generator:
File "/usr/local/lib/python3.11/site-packages/gql/client.py", line 1337, in _subscribe
async for result in inner_generator:
File "/usr/local/lib/python3.11/site-packages/gql/transport/common/base.py", line 298, in subscribe
answer_type, execution_result = await listener.get()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gql/transport/common/listener_queue.py", line 35, in get
raise item
File "/usr/local/lib/python3.11/site-packages/gql/transport/common/base.py", line 221, in _receive_data_loop
answer_type, answer_id, execution_result = self._parse_answer(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gql/transport/websockets_protocol.py", line 423, in _parse_answer
return self._parse_answer_apollo(json_answer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gql/transport/websockets_protocol.py", line 384, in _parse_answer_apollo
raise TransportQueryError(
Error Summary
Multiple bot pods in isolated crashloop during startup. The common failure is a GraphQL subscription schema mismatch against FBotThreadsCallsTasks:
Cannot query field 'news_payload_task' ... Did you mean 'news_payload_task_new' / 'news_payload_task_old'?
Observed affected pods include bob, frog, karen, lawyerrat, vix, boss, strategist, productman, admonster, clerkwing, researcher, botticelli, executor.
Stacktrace
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/flexus_client_kit/ckit_service_exec.py", line 26, in run_typical_single_subscription_with_restart_on_network_errors
await subscribe_and_do_something(fclient, ws_client, *func_args, **func_kwargs)
File "/usr/local/lib/python3.11/site-packages/flexus_client_kit/ckit_bot_exec.py", line 412, in subscribe_and_produce_callbacks
async for r in ws.subscribe(
File "/usr/local/lib/python3.11/site-packages/gql/client.py", line 1426, in subscribe
async for result in inner_generator:
File "/usr/local/lib/python3.11/site-packages/gql/client.py", line 1337, in _subscribe
async for result in inner_generator:
File "/usr/local/lib/python3.11/site-packages/gql/transport/common/base.py", line 298, in subscribe
answer_type, execution_result = await listener.get()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gql/transport/common/listener_queue.py", line 35, in get
raise item
File "/usr/local/lib/python3.11/site-packages/gql/transport/common/base.py", line 221, in _receive_data_loop
answer_type, answer_id, execution_result = self._parse_answer(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gql/transport/websockets_protocol.py", line 423, in _parse_answer
return self._parse_answer_apollo(json_answer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gql/transport/websockets_protocol.py", line 384, in _parse_answer_apollo
raise TransportQueryError(
Root Cause
- File:
flexus_client_kit/ckit_bot_exec.py:436 - Function:
subscribe_and_produce_callbacks - Why: the generated subscription still requests
news_payload_taskfromFBotThreadsCallsTasks, but the dataclass/schema now exposesnews_payload_task_newandnews_payload_task_oldinstead. This breaks startup subscriptions for bots using this client kit build. - Git blame: @Oleg Klimov in
87119dc/caff82d4(schema migration and subscription update)
Code Snippet
bot_threads_calls_tasks(...)
{
{gql_utils.gql_fields(ckit_bot_query.FBotThreadsCallsTasks)}
}
Affected
- Pods: bob, frog, karen, lawyerrat, vix, boss, strategist, productman, admonster, clerkwing, researcher, botticelli, executor
- Namespace: isolated
- Occurrences: repeated CrashLoopBackOff on startup
- Dominant language
- Python
- Stars
- 6
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from smallcloudai/flexus-client-kit
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
smallcloudai/flexus-client-kit#366 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
smallcloudai/flexus-client-kit#327 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
smallcloudai/flexus-client-kit#367 · 1 comment ·
All issues in smallcloudai/flexus-client-kit
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100