Skip to content

Conversation

@seanghaeli
Copy link
Contributor


Closes: #49841.

Add support for MessageDeduplicationId and MessageGroupId in SnsPublishOperator

Currently the SnsPublishOperator does not support the MessageDeduplicationId and MessageGroupId parameters for AWS SNS FIFO topics. This limits users to relying only on ContentBasedDeduplication, which does not cover all use cases. Added unit test coverage for FIFO topic scenarios for both the operator and the hook.

Similar to #45051 which covers the same for AWS SQS.

@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Jun 3, 2025
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 3, 2025

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 Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy 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.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@Prab-27
Copy link
Contributor

Prab-27 commented Jun 4, 2025

Thanks @seanghaeli

You can fix static checks locally by running pre-commit run . Files will be automatically modified by this hook

@vincbeck vincbeck changed the title Add MessageDeduplicationId support to SnsPublishOperator Add MessageDeduplicationId support to SnsPublishOperator Jun 4, 2025
Copy link
Contributor

@vincbeck vincbeck left a comment

Choose a reason for hiding this comment

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

Besides static check failures, looks good!

@o-nikolas
Copy link
Contributor

Thanks @seanghaeli

You can fix static checks locally by running pre-commit run . Files will be automatically modified by this hook

I'd also strongly recommend enabling them to run automatically on every commit/push (pre-commit install and pre-commit install -t pre-push to enable respectively). If you really want to commit without running them you can add --no-verify to your git commands.

@vincbeck vincbeck merged commit 044a30b into apache:main Jun 6, 2025
70 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 6, 2025

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@vincbeck vincbeck deleted the sns-deduplication-id-support branch June 6, 2025 18:29
@vincbeck
Copy link
Contributor

vincbeck commented Jun 6, 2025

Congrats @seanghaeli

sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
…51383)

* Add MessageDeduplicationId support to SnsPublishOperator

* Comply with pre-commit hooks

* Add test cases for sns operator

* Define constants for repetitive strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add MessageDeduplicationId support to SnsPublishOperator

5 participants