-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
deepcopy args when passed down to rpc pask #3850
Conversation
37513e0
to
1312243
Compare
1312243
to
eded923
Compare
Do you think we should remove the deepcopy from the RemoteMethod init method in core/dbt/rpc/method.py? I guess it doesn't hurt, but it is an extra copy now. |
@gshank good point, I'll remove it. It can be pretty expensive operation. I also like knowing that the object owns the args passed in, instead of creating a copy in the constructor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
also resolves #3846
Description
This makes sure that RPC tasks are initialized with a copy of
self.args
. IF they are mutated further down the call stack, it won't affect the high level RPC process management task and be passed to subsequent RPC tasks.Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.