Content-Length: 370111 | pFad | https://github.com/apache/airflow/commit/a3f5c93806258b5ad396a638ba0169eca7f9d065

1A Update alias for field_mask in Google Memmcache (#16975) · apache/airflow@a3f5c93 · GitHub
Skip to content

Commit a3f5c93

Browse files
authored
Update alias for field_mask in Google Memmcache (#16975)
The July 12 2021 release of google-memcache library removed field_mask alias from the library which broke our typechecking and made google provider unimportable. This PR fixes the import to use the actual import.
1 parent 9ff781a commit a3f5c93

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

airflow/providers/google/cloud/hooks/cloud_memorystore.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ def update_instance(
487487
- ``redisConfig``
488488
489489
If a dict is provided, it must be of the same form as the protobuf message
490-
:class:`~google.cloud.redis_v1.types.FieldMask`
491-
:type update_mask: Union[Dict, google.cloud.redis_v1.types.FieldMask]
490+
:class:`~google.protobuf.field_mask_pb2.FieldMask`
491+
:type update_mask: Union[Dict, google.protobuf.field_mask_pb2.FieldMask]
492492
:param instance: Required. Update description. Only fields specified in ``update_mask`` are updated.
493493
494494
If a dict is provided, it must be of the same form as the protobuf message
@@ -871,7 +871,7 @@ def list_instances(
871871
@GoogleBaseHook.fallback_to_default_project_id
872872
def update_instance(
873873
self,
874-
update_mask: Union[Dict, cloud_memcache.field_mask.FieldMask],
874+
update_mask: Union[Dict, FieldMask],
875875
instance: Union[Dict, cloud_memcache.Instance],
876876
project_id: str,
877877
location: Optional[str] = None,
@@ -889,9 +889,9 @@ def update_instance(
889889
- ``displayName``
890890
891891
If a dict is provided, it must be of the same form as the protobuf message
892-
:class:`~google.cloud.memcache_v1beta2.types.cloud_memcache.field_mask.FieldMask`
892+
:class:`~google.protobuf.field_mask_pb2.FieldMask`)
893893
:type update_mask:
894-
Union[Dict, google.cloud.memcache_v1beta2.types.cloud_memcache.field_mask.FieldMask]
894+
Union[Dict, google.protobuf.field_mask_pb2.FieldMask]
895895
:param instance: Required. Update description. Only fields specified in ``update_mask`` are updated.
896896
897897
If a dict is provided, it must be of the same form as the protobuf message
@@ -935,7 +935,7 @@ def update_instance(
935935
@GoogleBaseHook.fallback_to_default_project_id
936936
def update_parameters(
937937
self,
938-
update_mask: Union[Dict, cloud_memcache.field_mask.FieldMask],
938+
update_mask: Union[Dict, FieldMask],
939939
parameters: Union[Dict, cloud_memcache.MemcacheParameters],
940940
project_id: str,
941941
location: str,
@@ -951,9 +951,9 @@ def update_parameters(
951951
952952
:param update_mask: Required. Mask of fields to update.
953953
If a dict is provided, it must be of the same form as the protobuf message
954-
:class:`~google.cloud.memcache_v1beta2.types.cloud_memcache.field_mask.FieldMask`
954+
:class:`~google.protobuf.field_mask_pb2.FieldMask`
955955
:type update_mask:
956-
Union[Dict, google.cloud.memcache_v1beta2.types.cloud_memcache.field_mask.FieldMask]
956+
Union[Dict, google.protobuf.field_mask_pb2.FieldMask]
957957
:param parameters: The parameters to apply to the instance.
958958
If a dict is provided, it must be of the same form as the protobuf message
959959
:class:`~google.cloud.memcache_v1beta2.types.cloud_memcache.MemcacheParameters`

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
292292
'google-cloud-kms>=2.0.0,<3.0.0',
293293
'google-cloud-language>=1.1.1,<2.0.0',
294294
'google-cloud-logging>=2.1.1,<3.0.0',
295-
'google-cloud-memcache>=0.2.0',
295+
# 1.1.0 removed field_mask and broke import for released providers
296+
# We can remove the <1.1.0 limitation after we release new Google Provider
297+
'google-cloud-memcache>=0.2.0,<1.1.0',
296298
'google-cloud-monitoring>=2.0.0,<3.0.0',
297299
'google-cloud-os-login>=2.0.0,<3.0.0',
298300
'google-cloud-pubsub>=2.0.0,<3.0.0',

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/apache/airflow/commit/a3f5c93806258b5ad396a638ba0169eca7f9d065

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy