-
Notifications
You must be signed in to change notification settings - Fork 16.4k
AIP-82: implement Google Pub/Sub message queue provider #54494
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
AIP-82: implement Google Pub/Sub message queue provider #54494
Conversation
|
checks failing :( |
providers/google/src/airflow/providers/google/cloud/queues/pubsub.py
Outdated
Show resolved
Hide resolved
jason810496
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks for the PR!
However, we may need to hold off on merging this until Refactor Common Queue Interface #54651 is merged.
As we discuss in #53556 (comment), there are some drawbacks to using Queue URI, and we should replace Queue URI with just "scheme".
In the meantime, it would be nice to take 000b6c3 as a guide for replacing the "Queue" logic with "Scheme" logic.
Thanks!
Thanks! I just went through the If not, inspired by the |
Yes, as long as the
Sure, I named the Redis one as There might also be other services in GCP that provide message queue-like functionality, so naming it Thanks! |
|
hi there :) |
|
Hi :)
This structure comes from the implementation details of AIP-82 - it’s how the Reference: airflow/airflow-core/src/airflow/providers_manager.py Lines 1097 to 1103 in b340e8c
airflow/providers/common/messaging/src/airflow/providers/common/messaging/triggers/msg_queue.py Line 38 in b340e8c
This can be looked into. A Pub/Sub subscription (and implicitly a topic) would be required, but given the way event-driven scheduling works, I’m not sure it can be created and torn down entirely within the scope of a system test as the subscription is what triggers the DAG. |
jason810496
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, there is this PR which is in draft: #54684
and maybe makes sense to close it to not duplicate...
Would it be better to leave change of PubsubPullTrigger in #54684 instead of directly closing it?
Then this PR can focus on adding PubsubMessageQueueProvider , and #54684 can work indenpedently.
also I have some questions: are we sure we want to keep this name? it can be confusing for users why we have queue (as a separate service in Google provider), but inside there is still pubsub operators.
The term "Queue" in the class naming is primarily due to the AIP-82 Common Message Queue interface. To distinguish between different underlying implementations, the current PubSub version will use the scheme google+pubsub, while a future GCP Queue service can be designated as google+queue. The "Queue URI" referenced in this PR will be replaced by "scheme" after #54651.
And are you planning to add system tests for this? if yes, can you please explain what should be configured in order to run it? in general in Google provider we are trying to keep every test atomic, so all the configuration and connections that should be used inside the system tests should be created and then deleted in the system test
If I not get @VladaZakharova wrong, we should add system test under https://github.com/apache/airflow/blob/main/providers/google/tests/system/google/cloud/pubsub .
|
I also had a draft PR open for this quite a while ago. Please feel free to use this as reference if needed: #54684 |
59e792d to
d50968a
Compare
jason810496
left a comment
There was a problem hiding this 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! The change for common message queue LGTM.
It would be nice to split the fix for PubSubTrigger to another PR, so that we can separate the new feature with the fix. Thanks!
|
yes, please 😿 |
…)" This reverts commit a9d9736.
|
Sorry, so that @dejii might need to raise PR again. Thanks! |
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
* AIP-82: implement Google Pub/Sub message queue provider * fix: mypy checks * fix: spell checks * fix: tests * switch to scheme based configuration * add system tests, update docs
This PR implements
PubsubMessageQueueProvideras part of the AIP-82 #52712 initiative to expand Event-Driven Scheduling, enabling Google Cloud Pub/Sub subscriptions as message queues in Airflow's common messaging framework.^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.