Skip to content

Add transports based on Azure PaaS#891

Merged
auvipy merged 4 commits into
celery:masterfrom
CatalystCode:azure-paas-transports
Aug 30, 2018
Merged

Add transports based on Azure PaaS#891
auvipy merged 4 commits into
celery:masterfrom
CatalystCode:azure-paas-transports

Conversation

@c-w
Copy link
Copy Markdown
Contributor

@c-w c-w commented Jun 18, 2018

This pull request adds two new transport implementations:

  • azurestoragequeues is implemented on top of Azure Storage Queues. This offers a simple but scalable and low-cost PaaS transport for Celery users in Azure. The transport is intended to be used in conjunction with the Azure Block Blob Storage backend.

  • azureservicebus is implemented on top of Azure Service Bus and offers PaaS support for more demanding Celery workloads in Azure. The transport is intended to be used in conjunction with the Azure CosmosDB backend.

This pull request was created together with @ankurokok, @dkisselev, @evandropaula, @martinpeck and @michaelperel.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 18, 2018

Codecov Report

Merging #891 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #891   +/-   ##
=======================================
  Coverage   88.52%   88.52%           
=======================================
  Files          63       63           
  Lines        6512     6512           
  Branches      775      775           
=======================================
  Hits         5765     5765           
  Misses        665      665           
  Partials       82       82
Impacted Files Coverage Δ
kombu/transport/__init__.py 100% <ø> (ø) ⬆️

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 200a60a...b4f6050. Read the comment docs.

Copy link
Copy Markdown
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

Looks good from a high level overview

@auvipy
Copy link
Copy Markdown
Member

auvipy commented Jul 19, 2018

@c-w is there anything remaining from your side?

@c-w
Copy link
Copy Markdown
Contributor Author

c-w commented Jul 19, 2018

Hi @auvipy. Thanks for your review! If you're happy to merge this, I'm all for it. (I don't have write access to the repository so one of your maintainers will have to hit the merge button.)

Copy link
Copy Markdown
Contributor

@georgepsarakis georgepsarakis left a comment

Choose a reason for hiding this comment

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

I added some comments of minor importance. Nice work @c-w !

Comment thread kombu/transport/azureservicebus.py Outdated
def sbq(self):
if self._sbq is None:
self._sbq = ServiceBusService(
service_namespace=getenv('AZURE_SERVICEBUS_ACCOUNT',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am not sure environment variables should work at this level and I don't see any other transport reading from the environment. The configuration should have been done at a higher level (in this case Celery).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in f260341.

Comment thread kombu/transport/azureservicebus.py Outdated

super(Channel, self).__init__(*args, **kwargs)

for queue in self.sbq.list_queues():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is an open issue with AWS SQS transport, not requiring ListQueues permissions. In the proposed fix, a predefined list of queue names is given by configuration. Would that apply here as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Azure ServiceBus has three kinds of permissions: listen, send, and manage (docs). Given that we're creating new queues from the connector, we'll anyways need the manage permissions so might as well use the list queues call here. Thoughts?

Comment thread kombu/transport/azureservicebus.py Outdated
return n

@property
def sbq(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure, but perhaps the abbreviation will be difficult to read for readers unfamiliar with the service?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in a7df447.

@c-w
Copy link
Copy Markdown
Contributor Author

c-w commented Jul 24, 2018

@georgepsarakis Thanks for the comments. Addressed them. Let me know if there's anything else.

@auvipy auvipy added this to the 4.3 milestone Aug 9, 2018
@auvipy
Copy link
Copy Markdown
Member

auvipy commented Aug 29, 2018

please rebase

c-w added 4 commits August 30, 2018 10:18
This pull request adds two new transport implementations:

- `azurestoragequeues` is implemented on top of Azure Storage
  Queues [1]. This offers a simple but scalable and low-cost PaaS
  transport for Celery users in Azure. The transport is intended to be
  used in conjunction with the Azure Block Blob Storage backend [2].

- `azureservicebus` is implemented on top of Azure Service Bus [3] and
  offers PaaS support for more demanding Celery workloads in Azure. The
  transport is intended to be used in conjunction with the Azure
  CosmosDB backend [4].

This pull request was created together with @ankurokok, @dkisselev,
@evandropaula, @martinpeck and @michaelperel.

[1] https://azure.microsoft.com/en-us/services/storage/queues/
[2] celery/celery#4685
[3] https://azure.microsoft.com/en-us/services/service-bus/
[4] celery/celery#4720
There is test coverage for the transports but the tests require Azure
credentials to run (passed via environment variables) so codecov doesn't
exercise them.
@c-w
Copy link
Copy Markdown
Contributor Author

c-w commented Aug 30, 2018

Done, @auvipy.

@auvipy auvipy merged commit 3263355 into celery:master Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants