Skip to content

Conversation

@Jasperora
Copy link
Contributor

Why

Related issue: #52712.
Related PR: #52917.

What

Introduce support for Redis as a MessageQueueProvider, extending Event-Driven Scheduling.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@potiuk
Copy link
Member

potiuk commented Jul 20, 2025

Question. Would it be possible to add an integration test for that one? We already have integration tests with redis run in our CI and for me it would be cool if we can run the tests of message queue with "real" readis rather than based on unit tests.

Some pointers for you:

@Jasperora Jasperora marked this pull request as draft July 20, 2025 13:04
@Jasperora
Copy link
Contributor Author

Thanks for pointing out! I'll give it a try.

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.

One nit but overall it looks good! Very nice to see other providers onboarding 🚀 I agree with Jarek's comment too, if we can have integration tests, we should do it :)

@jason810496 jason810496 self-requested a review July 22, 2025 15:29
@Jasperora Jasperora force-pushed the redis-message-queue-provider branch from 5ab9f82 to 783d5e8 Compare August 5, 2025 09:21
@Jasperora
Copy link
Contributor Author

Hi @jason810496, during the period of adding integration test, I found that a bug exists in my unit test.
From pytest importorskip doc, the parameter should be module name instead of class name.
I tried using class name (airflow.providers.common.messaging.providers.base_provider.BaseMessageQueueProvider) in redis, and the test would be skipped since the class cannot be imported.
I noticed that same issue exists in Apache Kafka and Amazon SQS.

I could address the issue if my understanding is correct. However, I would appreciate hearing your suggestions first. Thank you!

@Jasperora Jasperora changed the title AIP-82: Add RedisMessageQueueProvider AIP-82: Add RedisPubSubMessageQueueProvider Aug 5, 2025
@Jasperora Jasperora marked this pull request as ready for review August 5, 2025 11:07
@Jasperora Jasperora force-pushed the redis-message-queue-provider branch from 2cca9cb to 71328d7 Compare August 5, 2025 11:08
@vincbeck
Copy link
Contributor

vincbeck commented Aug 5, 2025

Hi @jason810496, during the period of adding integration test, I found that a bug exists in my unit test. From pytest importorskip doc, the parameter should be module name instead of class name. I tried using class name (airflow.providers.common.messaging.providers.base_provider.BaseMessageQueueProvider) in redis, and the test would be skipped since the class cannot be imported. I noticed that same issue exists in Apache Kafka and Amazon SQS.

I could address the issue if my understanding is correct. However, I would appreciate hearing your suggestions first. Thank you!

You're entirely correct! Thanks for the catch! I created #54135 to fix it in SQS and Kafka

@potiuk potiuk merged commit 4641065 into apache:main Aug 6, 2025
85 checks passed
Copy link
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

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

Thanks for the update.
I just noticed an issue regarding URI usage, and we might need to have further discussion on this.

ferruzzi pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 7, 2025
* AIP-82: Add RedisMessageQueueProvider

* change docs title level

* specify pubsub in naming

* fix import bug

* add integration test

* fix queue path in system test

* set minimum version for common.messaging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants