Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enable Helix queue stats logging for Arcade unit tests #17018

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

Open
chcosta wants to merge 5 commits into dotnet:main
base: main
Choose a base branch
Loading
from chcosta:dev/chcosta/enable-helix-queue-stats
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ public JobCreationRequest(string type, string listUri, string queueId)
[JsonProperty("ResultContainerPrefix")]
public string ResultContainerPrefix { get; set; }

[JsonProperty("AzureDevOpsOrganization")]
public string AzureDevOpsOrganization { get; set; }

[JsonProperty("AzureDevOpsProject")]
public string AzureDevOpsProject { get; set; }
Comment on lines +58 to +62

[JsonIgnore]
public bool IsValid
{
Expand Down
6 changes: 4 additions & 2 deletions src/Microsoft.DotNet.Helix/Sdk/SendHelixJob.cs
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,10 @@ protected override async Task ExecuteCore(CancellationToken cancellationToken)

Log.LogMessage(MessageImportance.High, $"Sending Job to {TargetQueue}...");
cancellationToken.ThrowIfCancellationRequested();
// LogMessageFromText will take any string formatted as a canonical error or warning and convert the type of log to this
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;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The comment suggests that Minimal should be the important when not enabled?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

that's what it was, yes. which meant queue stat logging wasn't visible.

Comment on lines +270 to +272
ISentJob job = await def.SendAsync(msg => Log.LogMessageFromText(msg, sendAsyncImportance), cancellationToken);
JobCorrelationId = job.CorrelationId;
JobCancellationToken = job.HelixCancellationToken;
cancellationToken.ThrowIfCancellationRequested();
Expand Down
2 changes: 2 additions & 0 deletions tests/UnitTests.proj
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
instead of the in-build Python reporter. The corresponding monitor job is
configured in the Arcade pipeline YAML. -->
<EnableHelixJobMonitor>true</EnableHelixJobMonitor>

<EnableShowHelixQueueStats>true</EnableShowHelixQueueStats>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /