vincbeck commented on code in PR #33962: URL: https://github.com/apache/airflow/pull/33962#discussion_r1311894331
########## docs/apache-airflow-providers-amazon/notifications/sqs.rst: ########## @@ -0,0 +1,63 @@ + .. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +.. _howto/notifier:SqsNotifier: + +How-to Guide for SQS notifications +================================== + +Introduction +------------ +`Amazon SQS <https://aws.amazon.com/sqs/>`__ notifier :class:`~airflow.providers.amazon.aws.notifications.sqs.SqsNotifier` +allows users to push messages to a SQS Queue using the various ``on_*_callbacks`` at both the DAG level and Task level. Review Comment: ```suggestion allows users to push messages to an Amazon SQS Queue using the various ``on_*_callbacks`` at both the DAG level and Task level. ``` ########## docs/apache-airflow-providers-amazon/notifications/sqs.rst: ########## @@ -0,0 +1,63 @@ + .. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +.. _howto/notifier:SqsNotifier: + +How-to Guide for SQS notifications +================================== Review Comment: ```suggestion How-to Guide for Amazon Simple Queue Service (Amazon SQS) notifications ======================================================================= ``` ########## tests/providers/amazon/aws/notifications/test_sqs.py: ########## @@ -0,0 +1,61 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +from __future__ import annotations + +from unittest import mock + +import pytest + +from airflow.providers.amazon.aws.notifications.sqs import SqsNotifier, send_sqs_notification +from airflow.utils.types import NOTSET + +PARAM_DEFAULT_VALUE = pytest.param(NOTSET, id="default-value") + + +class TestSqsNotifier: + def test_class_and_notifier_are_same(self): + assert send_sqs_notification is SqsNotifier + + @pytest.mark.parametrize("aws_conn_id", ["aws_test_conn_id", None, PARAM_DEFAULT_VALUE]) + @pytest.mark.parametrize("region_name", ["eu-west-2", None, PARAM_DEFAULT_VALUE]) + def test_parameters_propagate_to_hook(self, aws_conn_id, region_name): + """Test notifier attributes propagate to SnsHook.""" Review Comment: ```suggestion """Test notifier attributes propagate to SqsHook.""" ``` -- 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]
