You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dbt executable supports a flag called --single-threaded which is intended to bypass multithreading when building nodes (eg. models, seeds, whatever). The --single-threaded argument previously worked with the dbt rpc command, but it appears that there is now a regression!
Steps To Reproduce
Run the rpc server in single-threaded mode:
dbt --single-threaded rpc
Run a query against the server (this one does select 1 as id):
{
"error": {
"code": -32000,
"message": "Server Error",
"data": {
"type": "Exception",
"message": "'Manifest' object has no attribute 'root_project'",
"tags": null,
"logs": [
{
"timestamp": "2021-03-30T21:35:40.781048Z",
"message": "Acquiring new postgres connection \"rpc.debug.my_query\".",
"channel": "dbt",
"level": 10,
"levelname": "DEBUG",
"thread_name": "MainThread",
"process": 76144,
"extra": {
"request_id": "123",
"method": "run_sql",
"context": "request",
"addr": "127.0.0.1",
"http_method": "POST",
"run_state": "internal"
}
},
{
"timestamp": "2021-03-30T21:35:40.791030Z",
"message": "uncaught python exception",
"channel": "dbt",
"level": 14,
"levelname": "ERROR",
"thread_name": "MainThread",
"process": 76144,
"extra": {
"request_id": "123",
"method": "run_sql",
"context": "request",
"addr": "127.0.0.1",
"http_method": "POST",
"run_state": "internal"
},
"exc_info": "Traceback (most recent call last):\n File \"/Users/drew/fishtown/dbt/core/dbt/rpc/task_handler.py\", line 94, in task_exec\n result = self.task.handle_request()\n File \"/Users/drew/fishtown/dbt/core/dbt/task/rpc/sql_commands.py\", line 162, in handle_request\n node = self._get_exec_node()\n File \"/Users/drew/fishtown/dbt/core/dbt/task/rpc/sql_commands.py\", line 123, in _get_exec_node\n add_new_refs(\n File \"/Users/drew/fishtown/dbt/core/dbt/task/rpc/sql_commands.py\", line 38, in add_new_refs\n manifest = manifest.deepcopy()\n File \"/Users/drew/fishtown/dbt/core/dbt/contracts/graph/manifest.py\", line 729, in deepcopy\n selectors=self.root_project.manifest_selectors,\nAttributeError: 'Manifest' object has no attribute 'root_project'"
}
]
}
},
"id": "123",
"jsonrpc": "2.0"
}
Expected behavior
I expect the request to succeed and return a successful response. I also expect the --single-threaded command to block until the query returns, then return a complete success response. This is (if I am recalling correctly) the intended behavior of the --single-threaded flag. This is a different behavior than the default which is to return a "task_id" immediately which can be polled for a response.
Screenshots and log output
Attached above
System information
Which database are you using dbt with?
postgres
redshift
bigquery
snowflake
other (specify: ____________)
The output of dbt --version:
0.19.0
Using current develop branch at commit 17e57f1e0b3
The operating system you're using: macOS
The output of python --version: 3.8.6
Additional context
Should this be a command-line flag (--single-threaded?) or should it be an option in the RPC request method like sync: true? Just a thought :)
The text was updated successfully, but these errors were encountered:
This is a regression due to changes for #2693. We don't have any test cases for the rpc single threaded option, and that's the only place that Manifest.deepcopy code is called.
Describe the bug
The
dbt
executable supports a flag called--single-threaded
which is intended to bypass multithreading when building nodes (eg. models, seeds, whatever). The--single-threaded
argument previously worked with thedbt rpc
command, but it appears that there is now a regression!Steps To Reproduce
Run the rpc server in single-threaded mode:
Run a query against the server (this one does
select 1 as id
):This returns the following error:
Expected behavior
I expect the request to succeed and return a successful response. I also expect the
--single-threaded
command to block until the query returns, then return a complete success response. This is (if I am recalling correctly) the intended behavior of the--single-threaded
flag. This is a different behavior than the default which is to return a "task_id" immediately which can be polled for a response.Screenshots and log output
Attached above
System information
Which database are you using dbt with?
The output of
dbt --version
:Using current
develop
branch at commit17e57f1e0b3
The operating system you're using: macOS
The output of
python --version
: 3.8.6Additional context
Should this be a command-line flag (
--single-threaded
?) or should it be an option in the RPC request method likesync: true
? Just a thought :)The text was updated successfully, but these errors were encountered: