Enable Helix queue stats logging for Arcade unit tests#17018
Conversation
There was a problem hiding this comment.
Pull request overview
Enables Helix queue health summary logging for Arcade’s own Helix-submitted unit test jobs by opting in via MSBuild property, so Arcade CI “dogfoods” the feature and emits queue condition signal at job submission time.
Changes:
- Set
EnableShowHelixQueueStatstotrueintests/UnitTests.projso Helix submissions from Arcade unit tests log the queue health summary.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Default CI verbosity is Minimal, which filters out MessageImportance.Normal messages. When EnableShowHelixQueueStats is opted in, route SendAsync log output (including the queue-health summary) at High importance so it survives the default verbosity.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| ISentJob job = await def.SendAsync(msg => Log.LogMessageFromText(msg, MessageImportance.Normal), cancellationToken); | ||
| // LogMessageFromText will take any string formatted as a canonical error or warning and convert the type of log to this. | ||
| // When queue-stats logging is opted in, elevate to High importance so the summary survives the default 'Minimal' build verbosity. | ||
| MessageImportance sendAsyncImportance = EnableShowHelixQueueStats ? MessageImportance.High : MessageImportance.Normal; |
There was a problem hiding this comment.
The comment suggests that Minimal should be the important when not enabled?
There was a problem hiding this comment.
that's what it was, yes. which meant queue stat logging wasn't visible.
Add WithAzureDevOpsOrganization() and WithAzureDevOpsProject() fluent builder methods to JobDefinition to allow callers (especially public pipelines) to specify which Azure DevOps organization/project is requesting queue stats. These parameters are passed through JobCreationRequest to Helix API. Fixes: Arcade PR for enabling queue stats support with org/project scoping
Queue names are globally unique across all organizations and projects, so the Helix API does not need org/project context to return stats. These parameters only serve as optional audit context on the public Helix Observer endpoint for external callers to declare their scope. Reverts the org/project fluent builder methods since: 1. They are unused in the codebase 2. Queue stats are queried and returned by queue name globally 3. Org/project scoping is only relevant on the public HTTP endpoint
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…sta/enable-helix-queue-stats
|
The service issues seem to be resolved now and this is ready for review. queue wait time estimates / stats are being shown in the Test SubmitHelixTests steps. |
| [JsonProperty("AzureDevOpsOrganization")] | ||
| public string AzureDevOpsOrganization { get; set; } | ||
|
|
||
| [JsonProperty("AzureDevOpsProject")] | ||
| public string AzureDevOpsProject { get; set; } |
| // LogMessageFromText will take any string formatted as a canonical error or warning and convert the type of log to this. | ||
| // When queue-stats logging is opted in, elevate to High importance so the summary survives the default 'Minimal' build verbosity. | ||
| MessageImportance sendAsyncImportance = EnableShowHelixQueueStats ? MessageImportance.High : MessageImportance.Normal; |
Enables the new opt-in Helix queue health summary (added in #16922) for Arcade's own
tests/UnitTests.proj.Adds
<EnableShowHelixQueueStats>true</EnableShowHelixQueueStats>so that every Helix job submitted by the Arcade unit-test pipeline logs the queue health summary at submit time. This dogfoods the feature and gives FRs immediate signal on Helix queue conditions when Arcade's own CI submits work.Depends on #16922 having shipped through Arcade.