From 64ab0d9b8db94a5f78acc4595f136d39f2f9081d Mon Sep 17 00:00:00 2001 From: peleyal Date: Sun, 28 Mar 2021 21:00:28 -0600 Subject: [PATCH 1/3] Support CloudFunctionInvokeFunctionOperator --- .../operators/gcp_cloud_function_invoke.yaml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml diff --git a/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml b/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml new file mode 100644 index 0000000..1cd538e --- /dev/null +++ b/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml @@ -0,0 +1,42 @@ +# Copyright 2018 Etsy Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# see: https://airflow.apache.org/docs/apache-airflow-providers-google/stable/_api/airflow/providers/google/cloud/operators/functions/index.html +# and: https://github.com/apache/airflow/blob/master/airflow/providers/google/cloud/operators/functions.py + +name: gcp_cloud_function_invoke +operator_class: CloudFunctionInvokeFunctionOperator +operator_class_module: airflow.providers.google.cloud.operators.functions +schema_extends: base +parameters_jsonschema: + properties: + function_id: + type: string + input_data: + type: Dict + location: + type: string + project_id: + type: string + gcp_conn_id: + type: string + api_version: + type: string + impersonation_chain: + type: Union[str, Sequence[str]] + required: + - function_id + - input_data + - location + additionalProperties: false From 6ba2dfb50c784dc8e80698e7870f6b298a68ae0c Mon Sep 17 00:00:00 2001 From: peleyal Date: Sun, 28 Mar 2021 21:07:59 -0600 Subject: [PATCH 2/3] Fix build --- .../config/operators/gcp_cloud_function_invoke.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml b/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml index 1cd538e..89129ed 100644 --- a/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml +++ b/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml @@ -24,7 +24,9 @@ parameters_jsonschema: function_id: type: string input_data: - type: Dict + type: object + additionalProperties: + type: string location: type: string project_id: From d1e7c5af3b89943bfd4e876da172bcc39a483e9e Mon Sep 17 00:00:00 2001 From: peleyal Date: Sun, 28 Mar 2021 21:15:23 -0600 Subject: [PATCH 3/3] Fix2 --- .../config/operators/gcp_cloud_function_invoke.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml b/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml index 89129ed..00098c8 100644 --- a/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml +++ b/boundary_layer_default_plugin/config/operators/gcp_cloud_function_invoke.yaml @@ -36,7 +36,9 @@ parameters_jsonschema: api_version: type: string impersonation_chain: - type: Union[str, Sequence[str]] + type: array + items: + type: string required: - function_id - input_data