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

azure service bus: fix TypeError when using Managed Identities #1825

Merged
merged 4 commits into from Dec 29, 2023

Conversation

marnikow
Copy link
Contributor

When trying the new version of Kombu 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

Since I don't understand the meaning of the as_url function I just fixed the error locally. Feedback is welcome :)

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.

this looks good, but It will need some time on my side to do a proper review

@auvipy auvipy added this to the 5.3.x milestone Nov 27, 2023
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.

we might not need the print output on the final version

t/unit/transport/test_azureservicebus.py Outdated Show resolved Hide resolved
t/unit/transport/test_azureservicebus.py Outdated Show resolved Hide resolved
t/unit/transport/test_azureservicebus.py Outdated Show resolved Hide resolved
@auvipy
Copy link
Member

auvipy commented Dec 19, 2023

also can you please check if the rtd docs build failures is not related to this PR?

@50-Course
Copy link

also can you please check if the rtd docs build failures is not related to this PR?

Going through the log file, I am only able to deduce that the error isn't related to this PR. At least not that I know of. By my understanding,

Problem in your project's configuration. No default configuration file found at repository's root. See https://docs.readthedocs.io/en/stable/config-file/

Seems to be an issue from the docs/conf.py which am yet to fully go through. The .readthedocs.yml configuration file seemed untouched as well. Please let me know if I am overlooking something.

CC: @auvipy

@auvipy auvipy merged commit 0dec03d into celery:main Dec 29, 2023
16 of 17 checks passed
@auvipy
Copy link
Member

auvipy commented Dec 29, 2023

thanks

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

3 participants