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

[AIRFLOW-6830] Add Subject/MessageAttributes to SNS hook and operator #7451

Merged
merged 4 commits into from
Feb 24, 2020
Merged

[AIRFLOW-6830] Add Subject/MessageAttributes to SNS hook and operator #7451

merged 4 commits into from
Feb 24, 2020

Conversation

snazzyfox
Copy link
Contributor

@snazzyfox snazzyfox commented Feb 18, 2020

Add subject and message_attributes as possible parameters for AwsSnsHook and SnsPublishOperator. Both defaults to none and are backwards compatible.


Issue link: AIRFLOW-6830

Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Commit message/PR title starts with [AIRFLOW-NNNN]. AIRFLOW-NNNN = JIRA ID*
  • Unit tests coverage for changes (not needed for documentation changes)
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

* For document-only changes commit message can start with [AIRFLOW-XXXX].


In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@boring-cyborg boring-cyborg bot added the provider:amazon-aws AWS/Amazon - related issues label Feb 18, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 18, 2020

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://apache-airflow-slack.herokuapp.com/

@codecov-io
Copy link

codecov-io commented Feb 18, 2020

Codecov Report

Merging #7451 into master will decrease coverage by 0.28%.
The diff coverage is 95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7451      +/-   ##
==========================================
- Coverage   86.66%   86.37%   -0.29%     
==========================================
  Files         877      877              
  Lines       41241    41266      +25     
==========================================
- Hits        35742    35645      -97     
- Misses       5499     5621     +122
Impacted Files Coverage Δ
airflow/providers/amazon/aws/operators/sns.py 100% <100%> (ø) ⬆️
airflow/providers/amazon/aws/hooks/sns.py 96.42% <94.11%> (-3.58%) ⬇️
airflow/kubernetes/volume_mount.py 44.44% <0%> (-55.56%) ⬇️
airflow/kubernetes/volume.py 52.94% <0%> (-47.06%) ⬇️
airflow/kubernetes/pod_launcher.py 47.18% <0%> (-45.08%) ⬇️
...viders/cncf/kubernetes/operators/kubernetes_pod.py 69.38% <0%> (-25.52%) ⬇️
airflow/kubernetes/refresh_config.py 50.98% <0%> (-23.53%) ⬇️
airflow/configuration.py 87.78% <0%> (-0.23%) ⬇️
airflow/config_templates/default_celery.py 52.94% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbcd3d8...3ee2f6b. Read the comment docs.

airflow/providers/amazon/aws/hooks/sns.py Outdated Show resolved Hide resolved
airflow/providers/amazon/aws/hooks/sns.py Outdated Show resolved Hide resolved
airflow/providers/amazon/aws/hooks/sns.py Outdated Show resolved Hide resolved
airflow/providers/amazon/aws/hooks/sns.py Outdated Show resolved Hide resolved
airflow/providers/amazon/aws/hooks/sns.py Outdated Show resolved Hide resolved
airflow/providers/amazon/aws/operators/sns.py Outdated Show resolved Hide resolved
Copy link
Member

@feluelle feluelle left a comment

Choose a reason for hiding this comment

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

Some minor issues I overlooked.

tests/providers/amazon/aws/hooks/test_sns.py Outdated Show resolved Hide resolved
airflow/providers/amazon/aws/operators/sns.py Outdated Show resolved Hide resolved
airflow/providers/amazon/aws/hooks/sns.py Outdated Show resolved Hide resolved
@feluelle feluelle merged commit 7d0e712 into apache:master Feb 24, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 24, 2020

Awesome work, congrats on your first merged pull request!

@feluelle
Copy link
Member

@snazzyfox Thank you very much :) 👍

galuszkak pushed a commit to FlyrInc/apache-airflow that referenced this pull request Mar 5, 2020
kaxil pushed a commit to astronomer/airflow that referenced this pull request Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider:amazon-aws AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants