uranusjr commented on a change in pull request #20234:
URL: https://github.com/apache/airflow/pull/20234#discussion_r771284568
##########
File path: airflow/providers/google/cloud/operators/cloud_build.py
##########
@@ -910,8 +910,9 @@ class BuildProcessor:
def __init__(self, build: Union[Dict, Build]) -> None:
if isinstance(build, Build):
- self.build = Build(build)
- self.build = deepcopy(build)
+ self.build: Union[Dict, Build] = Build(build)
+ else:
+ self.build = deepcopy(build)
Review comment:
This code looks quite suspecious. Why are we wrapping a Build object in
another Build object? How could we then deep-copy it? (The latter par this
actually implemented wrong; the previous code deepcopies the input for both
Build and dict cases.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]