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

Allow dots in Azure Service Bus queue names #2221

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

PieterBlomme
Copy link

In the Azure Service Bus transport, dots are currently replaced by dashes. This should not be the case, since https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftservicebus allows dots in queue names (it's possible that the conventions have changed)

I realise dots inside a queue name are probably not best practice, but in our case the queue names are determined by a third party and out of our control.

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.50%. Comparing base (a0175b0) to head (4c4943c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2221   +/-   ##
=======================================
  Coverage   81.50%   81.50%           
=======================================
  Files          77       77           
  Lines        9524     9524           
  Branches     1152     1152           
=======================================
  Hits         7763     7763           
  Misses       1569     1569           
  Partials      192      192           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

is this going to be a breaking change?

@PieterBlomme
Copy link
Author

Depends on how a "breaking change" is defined I think, but if a breaking change is defined as a change to the public interface, then I don't think so:

  • Previously dots were replaced by dashes in the queue name inside the internal implementation
  • Having dots in the queue name is already very rare. It's now allowed by Azure naming rules, but it's still an odd thing to do and probably not best practice.
  • Most users are probably unaware of the behaviour. If you allow Kombu to create new queues as needed, you will notice that the queue name in Azure has dashes instead of dots. But it has no impact on the client side.
  • If you do not allow Kombu to create queues (in our case we don't have Manage permissions on the service bus) you will need to make sure to create the service bus queue with the actual name (incl dots) instead of the replaced name (with dashes). Or change the dots to into dashes client side already

So it would only impact users who:

  • Pre-create queues in Azure Service Bus
  • Have dots in the Kombu queue name, but actually expect dashes in their service bus queue name
    I doubt anyone explicitly wants that behaviour. But if they accidentally rely on it, the easy fix is to change dots to dashes whenever specifying the kombu queue.

@auvipy auvipy requested a review from Nusnus January 14, 2025 10:44
Copy link
Member

@Nusnus Nusnus left a comment

Choose a reason for hiding this comment

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

Interesting change. Please rename the PR to a meaningful title.
Also, take note we’re in the middle of a (long) release cycle so this change cannot be merged at least until we finish the release.

Thank you for your patience.

@PieterBlomme PieterBlomme changed the title testcase and fix Allow dots in Azure Service Bus queue names Feb 4, 2025
@PieterBlomme
Copy link
Author

I renamed the PR. No problem if this takes a while to get merged in, we have a workaround on our end

@Nusnus
Copy link
Member

Nusnus commented Feb 4, 2025

I renamed the PR. No problem if this takes a while to get merged in, we have a workaround on our end

Cool. Thank you!

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.

4 participants