Hi, i'm having some issues with Azure Servicebus Q...
# dotnet
d
Hi, i'm having some issues with Azure Servicebus Queues deployed via Pulumi. Pulumi feels that the name of the queue is changed, although it's not (and it's all lowercase), and when pulumi tries to delete/replace the queue it sometimes report success but the queue is not created properly... is this a known issue? Code looks like this:
Copy code
var servicebusnamespace = new Namespace($"{standardPrefixName}-sb", new NamespaceArgs
			{
				ResourceGroupName = resourceGroup.Name,
				Sku = "Standard",
				ZoneRedundant = false,
			});

			Pulumi.Azure.ServiceBus.QueueArgs DefaultQueueSetting = new Pulumi.Azure.ServiceBus.QueueArgs
			{
				ResourceGroupName = resourceGroup.Name,
				NamespaceName = servicebusnamespace.Name,
				MaxSizeInMegabytes = 1024,
				LockDuration = "PT5M",
				RequiresDuplicateDetection = true,
				RequiresSession = false,
				DefaultMessageTtl = "PT12H",
				DeadLetteringOnMessageExpiration = true,
				MaxDeliveryCount = 10,
				EnablePartitioning = true,
			};

			DefaultQueueSetting.Name = KnownQueues.UpdatedCompany;
			var updatedcompanyQueue = new Queue(KnownQueues.UpdatedCompany, DefaultQueueSetting);

			DefaultQueueSetting.Name = KnownQueues.UpdatedPanel;
			var UpdatedPanelQueue = new Queue(KnownQueues.UpdatedPanel, DefaultQueueSetting);
I usually resolve the issue by doing a "pulumi refresh" before I do a "pulumi up", but that should be necessary? Right? And by the way, thanks for a good product!
t
I haven’t seen this before. What is the diff that pulumi reports?
I wonder if something fishy happens because you update the same args to use in two queues. Could you try creating two separate args objects?
For example, make
DefaultQueueSetting
a function with name parameter and call it twice.
d
How can I see exactly wish diff pulumi detectes? apart from ~name that it's stated in the output?
t
You could select Details in the menu of
pulumi up
d
Hihi.. I have seen that menu-choice more than a 100 times, never tried it 🙂 But I think you might be on to something, Pulumi seem to be intermixing the queues with eachother, in the case above the first queue is compared with the second in Azure and vice versa... will try a function instead of just replacing the name. Thanks!
t
There’s a multi-threading story going on there, so the two queues’ parameters likely mingle. I’ll open an issue to investigate whether we can make it safer.
Actually, if you want to open an issue in https://github.com/pulumi/pulumi/, that would be great :)
d
Breaking out the creation of the queue to a function seems to work more stable. It's probably way better practice to do it like that...