From cbc4d62221946df33a93738fee84467b70d05eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emek=20Vysok=C3=BD?= Date: Mon, 25 Apr 2022 18:05:56 +0200 Subject: [PATCH] Do not check queue existence for `pr-` queues (#9176) --- src/Microsoft.DotNet.Helix/JobSender/JobDefinition.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Helix/JobSender/JobDefinition.cs b/src/Microsoft.DotNet.Helix/JobSender/JobDefinition.cs index 88085d8a3f7..aab8df7aa61 100644 --- a/src/Microsoft.DotNet.Helix/JobSender/JobDefinition.cs +++ b/src/Microsoft.DotNet.Helix/JobSender/JobDefinition.cs @@ -164,7 +164,11 @@ public async Task SendAsync(Action log, CancellationToken canc // 404 = this queue does not exist, or did and was removed. catch (RestApiException ex) when (ex.Response?.Status == 404) { - throw new ArgumentException($"Helix API does not contain an entry for {queueId}"); + // Do not throw for Helix pr- queues which are not in the queue info JSON + if (!queueId.ToLowerInvariant().StartsWith("pr-")) + { + throw new ArgumentException($"Helix API does not contain an entry for {queueId}"); + } } IBlobContainer storageContainer = await storage.GetContainerAsync(TargetContainerName, queueId, cancellationToken);