Skip to content

Commit

Permalink
Unpin google-cloud-memcache (#21912)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaxil committed Mar 2, 2022
1 parent 84ed747 commit a0e2eba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import os
from datetime import datetime

from google.cloud.memcache_v1beta2.types import cloud_memcache
from google.cloud.redis_v1 import FailoverInstanceRequest, Instance
from google.protobuf.field_mask_pb2 import FieldMask

from airflow import models
from airflow.operators.bash import BashOperator
Expand Down Expand Up @@ -305,7 +305,7 @@
location="europe-north1",
instance_id=MEMORYSTORE_MEMCACHED_INSTANCE_NAME,
project_id=GCP_PROJECT_ID,
update_mask=cloud_memcache.field_mask.FieldMask(paths=["node_count"]),
update_mask=FieldMask(paths=["node_count"]),
instance={"node_count": 2},
)
# [END howto_operator_update_instance_memcached]
Expand Down
9 changes: 4 additions & 5 deletions airflow/providers/google/cloud/operators/cloud_memorystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ class CloudMemorystoreMemcachedUpdateInstanceOperator(BaseOperator):
- ``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.FieldMas`
:class:`~google.protobuf.field_mask_pb2.FieldMask`
.. seealso::
For more information on how to use this operator, take a look at the guide:
Expand Down Expand Up @@ -1452,7 +1452,7 @@ class CloudMemorystoreMemcachedUpdateInstanceOperator(BaseOperator):
def __init__(
self,
*,
update_mask: Union[Dict, cloud_memcache.field_mask.FieldMask],
update_mask: Union[Dict, FieldMask],
instance: Union[Dict, cloud_memcache.Instance],
location: Optional[str] = None,
instance_id: Optional[str] = None,
Expand Down Expand Up @@ -1504,8 +1504,7 @@ class CloudMemorystoreMemcachedUpdateParametersOperator(BaseOperator):
: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`
Union[Dict, google.cloud.memcache_v1beta2.types.cloud_memcache.field_mask.FieldMask]
:class:`~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 Expand Up @@ -1536,7 +1535,7 @@ class CloudMemorystoreMemcachedUpdateParametersOperator(BaseOperator):
def __init__(
self,
*,
update_mask: Union[Dict, cloud_memcache.field_mask.FieldMask],
update_mask: Union[Dict, FieldMask],
parameters: Union[Dict, cloud_memcache.MemcacheParameters],
location: str,
instance_id: str,
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,7 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
'google-cloud-kms>=2.0.0',
'google-cloud-language>=1.1.1,<2.0.0',
'google-cloud-logging>=2.1.1',
# 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',
'google-cloud-memcache>=0.2.0',
'google-cloud-monitoring>=2.0.0',
'google-cloud-os-login>=2.0.0',
'google-cloud-orchestration-airflow>=1.0.0,<2.0.0',
Expand Down

0 comments on commit a0e2eba

Please sign in to comment.