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

fix azure servicebus using managed identity support #1801

Merged
merged 4 commits into from Oct 4, 2023
Merged

fix azure servicebus using managed identity support #1801

merged 4 commits into from Oct 4, 2023

Conversation

marnikow
Copy link
Contributor

@marnikow marnikow commented Oct 2, 2023

When using managed identities with azure service bus the connection fails as mentioned in #1345

This PR is a continuation of #1641

@auvipy auvipy self-requested a review October 3, 2023 04:32
Copy link
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.

the tests are looking good. can you also check the lint issues please?

@auvipy auvipy merged commit 0e445d1 into celery:main Oct 4, 2023
14 checks passed
@auvipy auvipy added this to the 5.3.x milestone Oct 4, 2023
@marnikow
Copy link
Contributor Author

When trying the new version I get the following error:

TypeError("argument of type 'DefaultAzureCredential' is not iterable")
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/celery/worker/worker.py", line 202, in start
    self.blueprint.start(self)
  File "/usr/local/lib/python3.8/dist-packages/celery/bootsteps.py", line 112, in start
    self.on_start()
  File "/usr/local/lib/python3.8/dist-packages/celery/apps/worker.py", line 135, in on_start
    self.emit_banner()
  File "/usr/local/lib/python3.8/dist-packages/celery/apps/worker.py", line 169, in emit_banner
    ' \n', self.startup_info(artlines=not use_image))),
  File "/usr/local/lib/python3.8/dist-packages/celery/apps/worker.py", line 230, in startup_info
    conninfo=self.app.connection().as_uri(),
  File "/usr/local/lib/python3.8/dist-packages/kombu/connection.py", line 715, in as_uri
    return self.transport.as_uri(
  File "/usr/local/lib/python3.8/dist-packages/kombu/transport/azureservicebus.py", line 484, in as_uri
    if ":" in credential:
TypeError: argument of type 'DefaultAzureCredential' is not iterable

I don't understand the meaning of the function as_uri so I just fixed the error locally in #1825 . Feedback is welcome :)

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.

None yet

2 participants