Skip to content
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

Update alias for field_mask in Google Memmcache #16975

Merged
merged 1 commit into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions airflow/providers/google/cloud/hooks/cloud_memorystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ def update_instance(
- ``redisConfig``

If a dict is provided, it must be of the same form as the protobuf message
:class:`~google.cloud.redis_v1.types.FieldMask`
:type update_mask: Union[Dict, google.cloud.redis_v1.types.FieldMask]
:class:`~google.protobuf.field_mask_pb2.FieldMask`
:type update_mask: Union[Dict, google.protobuf.field_mask_pb2.FieldMask]
:param instance: Required. Update description. Only fields specified in ``update_mask`` are updated.

If a dict is provided, it must be of the same form as the protobuf message
Expand Down Expand Up @@ -871,7 +871,7 @@ def list_instances(
@GoogleBaseHook.fallback_to_default_project_id
def update_instance(
self,
update_mask: Union[Dict, cloud_memcache.field_mask.FieldMask],
update_mask: Union[Dict, FieldMask],
instance: Union[Dict, cloud_memcache.Instance],
project_id: str,
location: Optional[str] = None,
Expand All @@ -889,9 +889,9 @@ def update_instance(
- ``displayName``

If a dict is provided, it must be of the same form as the protobuf message
:class:`~google.cloud.memcache_v1beta2.types.cloud_memcache.field_mask.FieldMask`
:class:`~google.protobuf.field_mask_pb2.FieldMask`)
:type update_mask:
Union[Dict, google.cloud.memcache_v1beta2.types.cloud_memcache.field_mask.FieldMask]
Union[Dict, google.protobuf.field_mask_pb2.FieldMask]
:param instance: Required. Update description. Only fields specified in ``update_mask`` are updated.

If a dict is provided, it must be of the same form as the protobuf message
Expand Down Expand Up @@ -935,7 +935,7 @@ def update_instance(
@GoogleBaseHook.fallback_to_default_project_id
def update_parameters(
self,
update_mask: Union[Dict, cloud_memcache.field_mask.FieldMask],
update_mask: Union[Dict, FieldMask],
parameters: Union[Dict, cloud_memcache.MemcacheParameters],
project_id: str,
location: str,
Expand All @@ -951,9 +951,9 @@ def update_parameters(

:param update_mask: Required. Mask of fields to update.
If a dict is provided, it must be of the same form as the protobuf message
:class:`~google.cloud.memcache_v1beta2.types.cloud_memcache.field_mask.FieldMask`
:class:`~google.protobuf.field_mask_pb2.FieldMask`
:type update_mask:
Union[Dict, google.cloud.memcache_v1beta2.types.cloud_memcache.field_mask.FieldMask]
Union[Dict, google.protobuf.field_mask_pb2.FieldMask]
:param parameters: The parameters to apply to the instance.
If a dict is provided, it must be of the same form as the protobuf message
:class:`~google.cloud.memcache_v1beta2.types.cloud_memcache.MemcacheParameters`
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
'google-cloud-kms>=2.0.0,<3.0.0',
'google-cloud-language>=1.1.1,<2.0.0',
'google-cloud-logging>=2.1.1,<3.0.0',
'google-cloud-memcache>=0.2.0',
# 1.1.0 removed field_mask and broke import for released providers
# We can remove the <1.1.0 limitation after we release new Google Provider
'google-cloud-memcache>=0.2.0,<1.1.0',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure google-cloud-memcache v1.1.0 is compatible? These two versions were released within a short period of time.

1.1.0 (2021-06-30)
1.0.0 (2021-05-28)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new version may have some compatibility, but not enough for the operator to be successfully executed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure 1.1.0 was released yesterday (from pypi):

Screenshot 2021-07-13 20 42 53

'google-cloud-monitoring>=2.0.0,<3.0.0',
'google-cloud-os-login>=2.0.0,<3.0.0',
'google-cloud-pubsub>=2.0.0,<3.0.0',
Expand Down