aIbrahiim commented on code in PR #37490:
URL: https://github.com/apache/beam/pull/37490#discussion_r2759693322
##########
sdks/python/apache_beam/runners/portability/sdk_container_builder.py:
##########
@@ -262,10 +262,11 @@ def _invoke_docker_build_and_push(self,
container_image_name):
build.steps.append(step)
source = cloud_build_types.Source()
- source.storageSource = cloud_build_types.StorageSource()
+ storage_source = cloud_build_types.StorageSource()
gcs_bucket, gcs_object = self._get_gcs_bucket_and_name(gcs_location)
- source.storageSource.bucket = os.path.join(gcs_bucket)
- source.storageSource.object = gcs_object
+ storage_source.bucket = os.path.join(gcs_bucket)
+ storage_source.object_ = gcs_object
+ source.storage_source = storage_source
Review Comment:
I made this change after looking up the library as the library API changed
in google cloud build 3.35+. and the library now uses snake_case
(storage_source, object_) instead of camelCase (storageSource, object) while
the old code raises AttributeError Unknown field for Source storageSource when
running with 3.35+ so had to assign to source.storage_source and
storage_source.object_; and the dependency is already
google-cloud-build>=3.35.0, so i thought this aligns the code with the current
api
--
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]