From 237c810da4457883b8ecb8991be0e5d67f2e9f4a Mon Sep 17 00:00:00 2001
From: kkeirstead <85592574+kkeirstead@users.noreply.github.com>
Date: Thu, 2 Feb 2023 10:29:56 -0800
Subject: [PATCH 01/61] [SDM] Reverted duration seconds from 2 to 10 seconds
(#3543)
---
.../CommonTestTimeouts.cs | 5 +++++
.../LiveMetricsTests.cs | 14 +++++++-------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/CommonTestTimeouts.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/CommonTestTimeouts.cs
index 7c1e02e069d..0299cd68b63 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/CommonTestTimeouts.cs
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/CommonTestTimeouts.cs
@@ -72,6 +72,11 @@ public static class CommonTestTimeouts
///
public static readonly TimeSpan LogsDuration = TimeSpan.FromSeconds(10);
+ ///
+ /// Default live metrics collection duration.
+ ///
+ public static readonly int LiveMetricsDurationSeconds = 10;
+
///
/// Default timeout for environment variable manipulation.
///
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/LiveMetricsTests.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/LiveMetricsTests.cs
index 9c0e884de6e..a6a54293e0e 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/LiveMetricsTests.cs
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/LiveMetricsTests.cs
@@ -45,7 +45,7 @@ public Task TestDefaultMetrics()
async (appRunner, apiClient) =>
{
using ResponseStreamHolder holder = await apiClient.CaptureMetricsAsync(await appRunner.ProcessIdTask,
- durationSeconds: 2);
+ durationSeconds: CommonTestTimeouts.LiveMetricsDurationSeconds);
var metrics = LiveMetricsTestUtilities.GetAllMetrics(holder.Stream);
await LiveMetricsTestUtilities.ValidateMetrics(new[] { EventPipe.MonitoringSourceConfiguration.SystemRuntimeEventSourceName },
@@ -85,7 +85,7 @@ public Task TestCustomMetrics()
var counterNames = new[] { "cpu-usage", "working-set" };
using ResponseStreamHolder holder = await apiClient.CaptureMetricsAsync(await appRunner.ProcessIdTask,
- durationSeconds: 2,
+ durationSeconds: CommonTestTimeouts.LiveMetricsDurationSeconds,
metricsConfiguration: new EventMetricsConfiguration
{
IncludeDefaultProviders = false,
@@ -134,7 +134,7 @@ public Task TestCustomMetrics_MetricProviderType(MetricProviderType metricType,
var counterNames = new[] { "cpu-usage", "working-set" };
using ResponseStreamHolder holder = await apiClient.CaptureMetricsAsync(await appRunner.ProcessIdTask,
- durationSeconds: 2,
+ durationSeconds: CommonTestTimeouts.LiveMetricsDurationSeconds,
metricsConfiguration: new EventMetricsConfiguration
{
IncludeDefaultProviders = false,
@@ -214,7 +214,7 @@ await ScenarioRunner.SingleTarget(
appValidate: async (runner, client) =>
{
using ResponseStreamHolder holder = await client.CaptureMetricsAsync(await runner.ProcessIdTask,
- durationSeconds: 2,
+ durationSeconds: CommonTestTimeouts.LiveMetricsDurationSeconds,
metricsConfiguration: new EventMetricsConfiguration
{
IncludeDefaultProviders = false,
@@ -312,7 +312,7 @@ await ScenarioRunner.SingleTarget(
appValidate: async (runner, client) =>
{
using ResponseStreamHolder holder = await client.CaptureMetricsAsync(await runner.ProcessIdTask,
- durationSeconds: 2,
+ durationSeconds: CommonTestTimeouts.LiveMetricsDurationSeconds,
metricsConfiguration: new EventMetricsConfiguration
{
IncludeDefaultProviders = false,
@@ -392,7 +392,7 @@ await ScenarioRunner.SingleTarget(
appValidate: async (runner, client) =>
{
using ResponseStreamHolder holder = await client.CaptureMetricsAsync(await runner.ProcessIdTask,
- durationSeconds: 2,
+ durationSeconds: CommonTestTimeouts.LiveMetricsDurationSeconds,
metricsConfiguration: new EventMetricsConfiguration
{
IncludeDefaultProviders = false,
@@ -463,7 +463,7 @@ await ScenarioRunner.SingleTarget(
appValidate: async (runner, client) =>
{
using ResponseStreamHolder holder = await client.CaptureMetricsAsync(await runner.ProcessIdTask,
- durationSeconds: 2,
+ durationSeconds: CommonTestTimeouts.LiveMetricsDurationSeconds,
metricsConfiguration: new EventMetricsConfiguration
{
IncludeDefaultProviders = false,
From a531a753eff9078ab59e5ffd47f64fa459e524da Mon Sep 17 00:00:00 2001
From: Justin Anderson
Date: Thu, 2 Feb 2023 13:25:43 -0800
Subject: [PATCH 02/61] Add exceptions experimental feature flag (#3544)
---
.../IExperimentalFlags.cs | 2 ++
.../IInProcessFeatures.cs | 2 ++
.../TestExperimentalFlags.cs | 2 ++
.../dotnet-monitor/Experimental/ExperimentalFlags.cs | 5 +++++
.../Experimental/ExperimentalStartupLogger.cs | 4 ++++
.../InProcessFeatures/InProcessFeatures.cs | 2 ++
src/Tools/dotnet-monitor/Strings.Designer.cs | 9 +++++++++
src/Tools/dotnet-monitor/Strings.resx | 3 +++
8 files changed, 29 insertions(+)
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/IExperimentalFlags.cs b/src/Microsoft.Diagnostics.Monitoring.WebApi/IExperimentalFlags.cs
index 6e615f41313..aa39493c2fc 100644
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/IExperimentalFlags.cs
+++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/IExperimentalFlags.cs
@@ -10,5 +10,7 @@ namespace Microsoft.Diagnostics.Monitoring.WebApi
internal interface IExperimentalFlags
{
bool IsCallStacksEnabled { get; }
+
+ bool IsExceptionsEnabled { get; }
}
}
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/IInProcessFeatures.cs b/src/Microsoft.Diagnostics.Monitoring.WebApi/IInProcessFeatures.cs
index 6f8f910a23b..ff9c450e69d 100644
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/IInProcessFeatures.cs
+++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/IInProcessFeatures.cs
@@ -6,5 +6,7 @@ namespace Microsoft.Diagnostics.Monitoring.WebApi
public interface IInProcessFeatures
{
bool IsCallStacksEnabled { get; }
+
+ bool IsExceptionsEnabled { get; }
}
}
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/TestExperimentalFlags.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/TestExperimentalFlags.cs
index 7bdfc5f3514..aecd2ea46db 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/TestExperimentalFlags.cs
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/TestExperimentalFlags.cs
@@ -6,5 +6,7 @@ namespace Microsoft.Diagnostics.Monitoring.Tool.UnitTests
internal sealed class TestExperimentalFlags : Microsoft.Diagnostics.Monitoring.WebApi.IExperimentalFlags
{
public bool IsCallStacksEnabled { get; set; }
+
+ public bool IsExceptionsEnabled { get; set; }
}
}
diff --git a/src/Tools/dotnet-monitor/Experimental/ExperimentalFlags.cs b/src/Tools/dotnet-monitor/Experimental/ExperimentalFlags.cs
index 3b7012a9737..68cb342e074 100644
--- a/src/Tools/dotnet-monitor/Experimental/ExperimentalFlags.cs
+++ b/src/Tools/dotnet-monitor/Experimental/ExperimentalFlags.cs
@@ -17,6 +17,7 @@ internal class ExperimentalFlags : IExperimentalFlags
// Feature flags
public const string Feature_CallStacks = ExperimentalPrefix + nameof(Feature_CallStacks);
+ public const string Feature_Exceptions = ExperimentalPrefix + nameof(Feature_Exceptions);
// Behaviors
private const string EnabledTrueValue = "True";
@@ -24,6 +25,8 @@ internal class ExperimentalFlags : IExperimentalFlags
private readonly Lazy _isCallStacksEnabledLazy = new Lazy(() => IsFeatureEnabled(Feature_CallStacks));
+ private readonly Lazy _isExceptionsEnabledLazy = new Lazy(() => IsFeatureEnabled(Feature_Exceptions));
+
private static bool IsFeatureEnabled(string environmentVariable)
{
string value = Environment.GetEnvironmentVariable(environmentVariable);
@@ -33,5 +36,7 @@ private static bool IsFeatureEnabled(string environmentVariable)
}
public bool IsCallStacksEnabled => _isCallStacksEnabledLazy.Value;
+
+ public bool IsExceptionsEnabled => _isExceptionsEnabledLazy.Value;
}
}
diff --git a/src/Tools/dotnet-monitor/Experimental/ExperimentalStartupLogger.cs b/src/Tools/dotnet-monitor/Experimental/ExperimentalStartupLogger.cs
index 82b61176954..76eabb81559 100644
--- a/src/Tools/dotnet-monitor/Experimental/ExperimentalStartupLogger.cs
+++ b/src/Tools/dotnet-monitor/Experimental/ExperimentalStartupLogger.cs
@@ -24,6 +24,10 @@ public void Log()
{
_logger.ExperimentalFeatureEnabled(Strings.FeatureName_CallStacks);
}
+ if (_experimentalFlags.IsExceptionsEnabled)
+ {
+ _logger.ExperimentalFeatureEnabled(Strings.FeatureName_Exceptions);
+ }
}
}
}
diff --git a/src/Tools/dotnet-monitor/InProcessFeatures/InProcessFeatures.cs b/src/Tools/dotnet-monitor/InProcessFeatures/InProcessFeatures.cs
index 2782ab90afb..12829fc8544 100644
--- a/src/Tools/dotnet-monitor/InProcessFeatures/InProcessFeatures.cs
+++ b/src/Tools/dotnet-monitor/InProcessFeatures/InProcessFeatures.cs
@@ -19,5 +19,7 @@ public InProcessFeatures(IOptions options, IExperiment
}
public bool IsCallStacksEnabled => _options.GetEnabled() && _experimentalFlags.IsCallStacksEnabled;
+
+ public bool IsExceptionsEnabled => _options.GetEnabled() && _experimentalFlags.IsExceptionsEnabled;
}
}
diff --git a/src/Tools/dotnet-monitor/Strings.Designer.cs b/src/Tools/dotnet-monitor/Strings.Designer.cs
index 0d10db51410..d7f9cbd1c5e 100644
--- a/src/Tools/dotnet-monitor/Strings.Designer.cs
+++ b/src/Tools/dotnet-monitor/Strings.Designer.cs
@@ -492,6 +492,15 @@ internal static string FeatureName_CallStacks {
}
}
+ ///
+ /// Looks up a localized string similar to Exceptions.
+ ///
+ internal static string FeatureName_Exceptions {
+ get {
+ return ResourceManager.GetString("FeatureName_Exceptions", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Monitor logs and metrics in a .NET application send the results to a chosen destination..
///
diff --git a/src/Tools/dotnet-monitor/Strings.resx b/src/Tools/dotnet-monitor/Strings.resx
index bfbd24c2058..92625787e28 100644
--- a/src/Tools/dotnet-monitor/Strings.resx
+++ b/src/Tools/dotnet-monitor/Strings.resx
@@ -354,6 +354,9 @@
Call Stacks
+
+ Exceptions
+
Monitor logs and metrics in a .NET application send the results to a chosen destination.
Gets the string to display in help that explains what the 'collect' command does.
From 488c4e590ef30221a87cbbf16fa2a787b7035cb5 Mon Sep 17 00:00:00 2001
From: Wiktor Kopec
Date: Thu, 2 Feb 2023 13:39:33 -0800
Subject: [PATCH 03/61] Update release docs (#3537)
* Update release docs
* Update documentation/release-process.md
Co-authored-by: Justin Anderson
---------
Co-authored-by: Justin Anderson
---
documentation/release-process.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/documentation/release-process.md b/documentation/release-process.md
index 8eef2e17e63..810141c4ed9 100644
--- a/documentation/release-process.md
+++ b/documentation/release-process.md
@@ -19,6 +19,8 @@
1. Be sure to call [darc authenticate](https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md#authenticate). You will need to create the requested tokens.
1. You will need to add the branch to a channel. E.g.
`darc add-default-channel --channel ".NET Core Tooling Release" --branch release/8.x --repo https://github.com/dotnet/dotnet-monitor`
+1. Ensure that `UseMicrosoftDiagnosticsMonitoringShippedVersion` is set appropriately. See [Updating dependencies](#updating-dependencies).
+1. Ensure that dependabot configuration is updated at [../.github/dependabot.template.yml](../.github/dependabot.template.yml).
- It can be helpful to create test release branches (e.g. release/test/8.x). Note these branches will trigger warnings because they are considered unprotected release branches and should be deleted as soon as possible.
- If you created a build from a newly created release branch without a channel, you will get the message 'target build already exists on all channels'. To use this build you need to add it to a channel: `darc add-build-to-channel --id --channel "General Testing"`.
From fbc49350a6cc04a09d71c1dbee7ed68022858693 Mon Sep 17 00:00:00 2001
From: Wiktor Kopec
Date: Thu, 2 Feb 2023 15:40:29 -0800
Subject: [PATCH 04/61] Fix quantile issue for summaries (#3546)
* Fix quantile issue for summaries
* Fix unit test
* Fixup labels
---
.../Metrics/MetricsStore.cs | 21 ++++++++++++++-----
.../MetricsFormattingTests.cs | 15 +++++++------
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsStore.cs b/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsStore.cs
index 00953d8fa05..1ebfdbef892 100644
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsStore.cs
+++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsStore.cs
@@ -5,6 +5,7 @@
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
using System.Linq;
using System.Threading;
@@ -103,6 +104,12 @@ public void AddMetric(ICounterPayload metric)
{
metrics.Dequeue();
}
+
+ // CONSIDER We only keep 1 histogram representation per snapshot. Is it meaningful for Prometheus to see previous histograms? These are not timestamped.
+ if ((metrics.Count > 1) && (metric is PercentilePayload))
+ {
+ metrics.Dequeue();
+ }
}
}
@@ -133,7 +140,8 @@ public async Task SnapshotMetrics(Stream outputStream, CancellationToken token)
{
if (metric is PercentilePayload percentilePayload)
{
- foreach (Quantile quantile in percentilePayload.Quantiles)
+ // Summary quantiles must appear from smallest to largest
+ foreach (Quantile quantile in percentilePayload.Quantiles.OrderBy(q => q.Percentage))
{
string metricValue = PrometheusDataModel.GetPrometheusNormalizedValue(metric.Unit, quantile.Value);
string metricLabels = GetMetricLabels(metric, quantile.Percentage);
@@ -153,14 +161,17 @@ public async Task SnapshotMetrics(Stream outputStream, CancellationToken token)
private static string GetMetricLabels(ICounterPayload metric, double? quantile)
{
string metadata = metric.Metadata;
+
+ char separator = IsMeter(metric) ? '=' : ':';
+ var metadataValues = CounterUtilities.GetMetadata(metadata, separator);
if (quantile.HasValue)
{
- metadata = CounterUtilities.AppendPercentile(metadata, quantile.Value);
+ metadataValues.Add("quantile", quantile.Value.ToString(CultureInfo.InvariantCulture));
}
- char separator = IsMeter(metric) ? '=' : ':';
- var keyValuePairs = from pair in CounterUtilities.GetMetadata(metadata, separator)
- select pair.Key + "=" + "\"" + pair.Value + "\"";
+ var keyValuePairs = from pair in metadataValues
+ select PrometheusDataModel.GetPrometheusNormalizedLabel(pair.Key, pair.Value);
+
string metricLabels = string.Join(", ", keyValuePairs);
return metricLabels;
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/MetricsFormattingTests.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/MetricsFormattingTests.cs
index 2a7ddac41fc..22fa08055e2 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/MetricsFormattingTests.cs
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/MetricsFormattingTests.cs
@@ -42,8 +42,7 @@ public async Task HistogramFormat_Test()
{
List payload = new();
- string tags1 = "Percentile=50";
- payload.Add(new PercentilePayload(MeterName, InstrumentName, "DisplayName", string.Empty, tags1,
+ payload.Add(new PercentilePayload(MeterName, InstrumentName, "DisplayName", string.Empty, string.Empty,
new Quantile[] { new(0.5, Value1), new(0.95, Value2), new(0.99, Value3) },
Timestamp));
@@ -54,16 +53,16 @@ public async Task HistogramFormat_Test()
// should we call this method, or should this also be implicitly testing its behavior by having this hard-coded?
string metricName = $"{MeterName.ToLowerInvariant()}_{payload[0].Name}";
- const string percentile_50 = "{Percentile=\"50\"}";
- const string percentile_95 = "{Percentile=\"95\"}";
- const string percentile_99 = "{Percentile=\"99\"}";
+ const string quantile_50 = "{quantile=\"0.5\"}";
+ const string quantile_95 = "{quantile=\"0.95\"}";
+ const string quantile_99 = "{quantile=\"0.99\"}";
Assert.Equal(5, lines.Count);
Assert.Equal(FormattableString.Invariant($"# HELP {metricName}{payload[0].Unit} {payload[0].DisplayName}"), lines[0]);
Assert.Equal(FormattableString.Invariant($"# TYPE {metricName} summary"), lines[1]);
- Assert.Equal(FormattableString.Invariant($"{metricName}{percentile_50} {Value1}"), lines[2]);
- Assert.Equal(FormattableString.Invariant($"{metricName}{percentile_95} {Value2}"), lines[3]);
- Assert.Equal(FormattableString.Invariant($"{metricName}{percentile_99} {Value3}"), lines[4]);
+ Assert.Equal(FormattableString.Invariant($"{metricName}{quantile_50} {Value1}"), lines[2]);
+ Assert.Equal(FormattableString.Invariant($"{metricName}{quantile_95} {Value2}"), lines[3]);
+ Assert.Equal(FormattableString.Invariant($"{metricName}{quantile_99} {Value3}"), lines[4]);
}
[Fact]
From e90fd657733a988ad7855ee498a7b4eca5083133 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Fri, 3 Feb 2023 13:46:57 +0000
Subject: [PATCH 05/61] Update dependencies from
https://github.com/dotnet/diagnostics build 20230202.1 (#3553)
[main] Update dependencies from dotnet/diagnostics
---
eng/Version.Details.xml | 8 ++++----
eng/Versions.props | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index a7edde2bf00..94507a255c4 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,12 +1,12 @@
-
+
https://github.com/dotnet/diagnostics
- 9d61ee4c5831e6492f27bfb67ead2f3fe1c18338
+ f0d60e0eda555cded9ddf6bf2a1ab970d9b6265a
-
+
https://github.com/dotnet/diagnostics
- 9d61ee4c5831e6492f27bfb67ead2f3fe1c18338
+ f0d60e0eda555cded9ddf6bf2a1ab970d9b6265a
https://github.com/dotnet/command-line-api
diff --git a/eng/Versions.props b/eng/Versions.props
index fcb6202cbfa..f0f9fa74abc 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -67,8 +67,8 @@
2.0.0-beta4.23073.1
- 7.0.0-preview.23101.2
- 7.0.0-preview.23101.2
+ 7.0.0-preview.23102.1
+ 7.0.0-preview.23102.1
8.0.0-preview1.23081.3
From 8e131f7010ccc1d258274fe1217e669f7f2cc000 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Fri, 3 Feb 2023 13:52:16 +0000
Subject: [PATCH 06/61] Update dependencies from
https://github.com/dotnet/arcade build 20230202.4 (#3554)
[main] Update dependencies from dotnet/arcade
---
eng/Version.Details.xml | 16 +++----
eng/Versions.props | 6 +--
eng/common/generate-locproject.ps1 | 1 +
eng/common/loc/P22DotNetHtmlLocalization.lss | Bin 0 -> 3810 bytes
eng/common/templates/job/source-build.yml | 16 ++-----
.../templates/variables/pool-providers.yml | 41 +++++++++++-------
global.json | 2 +-
7 files changed, 42 insertions(+), 40 deletions(-)
create mode 100644 eng/common/loc/P22DotNetHtmlLocalization.lss
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 94507a255c4..cebaac56983 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -22,21 +22,21 @@
https://github.com/dotnet/roslyn-analyzers
a25bf5393c439af5da9ef30800b7d554a401d673
-
+
https://github.com/dotnet/arcade
- c4d6ac086bdb9764f72c5ede705d3ef12e1b4c74
+ afa0b37a066ac10768e49b29c82e5e039e714655
-
+
https://github.com/dotnet/arcade
- c4d6ac086bdb9764f72c5ede705d3ef12e1b4c74
+ afa0b37a066ac10768e49b29c82e5e039e714655
-
+
https://github.com/dotnet/arcade
- c4d6ac086bdb9764f72c5ede705d3ef12e1b4c74
+ afa0b37a066ac10768e49b29c82e5e039e714655
-
+
https://github.com/dotnet/arcade
- c4d6ac086bdb9764f72c5ede705d3ef12e1b4c74
+ afa0b37a066ac10768e49b29c82e5e039e714655
https://github.com/dotnet/symstore
diff --git a/eng/Versions.props b/eng/Versions.props
index f0f9fa74abc..014bb95f097 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -58,9 +58,9 @@
-->
- 8.0.0-beta.23101.1
- 8.0.0-beta.23101.1
- 8.0.0-beta.23101.1
+ 8.0.0-beta.23102.4
+ 8.0.0-beta.23102.4
+ 8.0.0-beta.23102.4
8.0.0-alpha.1.23066.6
8.0.0-alpha.1.23066.6
diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1
index 69e65eeae7d..bcb579e37a9 100644
--- a/eng/common/generate-locproject.ps1
+++ b/eng/common/generate-locproject.ps1
@@ -137,6 +137,7 @@ $locJson = @{
@{
LanguageSet = $LanguageSet
CloneLanguageSet = "VS_macOS_CloneLanguages"
+ LssFiles = @( ".\eng\common\loc\P22DotNetHtmlLocalization.lss" )
LocItems = @(
$macosHtmlFiles | ForEach-Object {
$outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\"
diff --git a/eng/common/loc/P22DotNetHtmlLocalization.lss b/eng/common/loc/P22DotNetHtmlLocalization.lss
new file mode 100644
index 0000000000000000000000000000000000000000..6661fed566e49b0c206665bc21f135e06c9b89c4
GIT binary patch
literal 3810
zcmd^CT~8BH5S?ce|HG9Bo&v?0;P_m6l=
znU-wb=}VLT7UH{>{5H;0M4iLmRE8QeBRr|>&k=uV*L;heKY+dq>B$0^=0I}|x`)s{
zht4t9zaiEh5Fe>E-;zVT;c4G?v;9N0G=rWwo~*(Cs`OS6ZL`HL;vsL0J@I%$+0YvE
zx{9ukK|FtFx1PlPD5M;6ZM>f;1BhCf?`8y6QH*?RT9T>XwF
z#~m_N+i^UKE^j{e;KdNW`kH9Rbj{G8tDY}mafCgG+m3H`I@_PhrDmcIzxD&IX@s083kV|lLUE^0(h6wWRPN0QN1n^PU5eX8r6OZ*s^g)tt77#SZCB}znxye#U$Dtinr6lnVu
z!LzA{A}0~no7p$thFGJAnI}oSW||9H=Bz}I7kD#2MLg7WfrlE5o9sQjePc>qmv+6iQCmdp(y}(Vr
literal 0
HcmV?d00001
diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml
index e40bf35203b..8a3deef2b72 100644
--- a/eng/common/templates/job/source-build.yml
+++ b/eng/common/templates/job/source-build.yml
@@ -46,20 +46,12 @@ jobs:
# source-build builds run in Docker, including the default managed platform.
# /eng/common/templates/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic
pool:
- # Main environments
- ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), true)) }}:
- name: NetCore-Public
+ ${{ if eq(variables['System.TeamProject'], 'public') }}:
+ name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')]
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), true)) }}:
- name: NetCore1ESPool-Internal
- demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
- # Servicing build environments
- ${{ if and(eq(variables['System.TeamProject'], 'public'), contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release')) }}:
- name: NetCore-Svc-Public
- demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release')) }}:
- name: NetCore1ESPool-Svc-Internal
+ ${{ if eq(variables['System.TeamProject'], 'internal') }}:
+ name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')]
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
${{ if ne(parameters.platform.pool, '') }}:
diff --git a/eng/common/templates/variables/pool-providers.yml b/eng/common/templates/variables/pool-providers.yml
index 1b820b41605..9cc5c550d3b 100644
--- a/eng/common/templates/variables/pool-providers.yml
+++ b/eng/common/templates/variables/pool-providers.yml
@@ -26,23 +26,32 @@
# demands: ImageOverride -equals windows.vs2019.amd64
variables:
-# Coalesce the target and source branches so we know when a PR targets a release branch
-# If these variables are somehow missing, fall back to main (tends to have more capacity)
-- name: BranchNameForPoolSelection
- value: ${{ coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main') }}
+ # Coalesce the target and source branches so we know when a PR targets a release branch
+ # If these variables are somehow missing, fall back to main (tends to have more capacity)
-# Any new -Svc alternative pools should have variables added here to allow for splitting work
-
-# Main branch pools
-- ${{ if ne(contains(variables['BranchNameForPoolSelection'], 'release'), true) }}:
+ # Any new -Svc alternative pools should have variables added here to allow for splitting work
- name: DncEngPublicBuildPool
- value: NetCore-Public
- - name: DncEngInternalBuildPool
- value: NetCore1ESPool-Internal
+ value: $[
+ replace(
+ replace(
+ eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'),
+ True,
+ 'NetCore-Svc-Public'
+ ),
+ False,
+ 'NetCore-Public'
+ )
+ ]
-# Release branch pools
-- ${{ if contains(variables['BranchNameForPoolSelection'], 'release') }}:
- - name: DncEngPublicBuildPool
- value: NetCore-Svc-Public
- name: DncEngInternalBuildPool
- value: NetCore1ESPool-Svc-Internal
+ value: $[
+ replace(
+ replace(
+ eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'),
+ True,
+ 'NetCore1ESPool-Svc-Internal'
+ ),
+ False,
+ 'NetCore1ESPool-Internal'
+ )
+ ]
\ No newline at end of file
diff --git a/global.json b/global.json
index d48d9a6ccb2..193bb5ab51f 100644
--- a/global.json
+++ b/global.json
@@ -26,6 +26,6 @@
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
- "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23101.1"
+ "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23102.4"
}
}
From 057d1df16dfa6967555a706721af5fb329f85756 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Fri, 3 Feb 2023 14:23:13 +0000
Subject: [PATCH 07/61] Update dependencies from
https://github.com/dotnet/command-line-api build 20230202.3 (#3555)
[main] Update dependencies from dotnet/command-line-api
---
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index cebaac56983..87144631f8e 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -8,9 +8,9 @@
https://github.com/dotnet/diagnostics
f0d60e0eda555cded9ddf6bf2a1ab970d9b6265a
-
+
https://github.com/dotnet/command-line-api
- 6524142f1398ed78eadfb9b802ba6492c6af63c4
+ 7030070c394c2d85dd10f6d1cc22ac6c1e902ce2
diff --git a/eng/Versions.props b/eng/Versions.props
index 014bb95f097..3c65efb060c 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -65,7 +65,7 @@
8.0.0-alpha.1.23066.6
8.0.0-alpha.1.23066.6
- 2.0.0-beta4.23073.1
+ 2.0.0-beta4.23102.3
7.0.0-preview.23102.1
7.0.0-preview.23102.1
From 19450df804d160aa9f0b836f9f19cd71ff43e3bb Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Fri, 3 Feb 2023 14:39:22 +0000
Subject: [PATCH 08/61] Update dependencies from
https://github.com/dotnet/roslyn-analyzers build 20230202.2 (#3558)
[main] Update dependencies from dotnet/roslyn-analyzers
---
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 87144631f8e..af5eb52aa5d 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -18,9 +18,9 @@
https://github.com/dotnet/aspnetcore
6f1752a798a9460b8a039750e30b827578528c90
-
+
https://github.com/dotnet/roslyn-analyzers
- a25bf5393c439af5da9ef30800b7d554a401d673
+ 5802d3ac5cc2c5eb828b64f20cdf0f93956f042a
https://github.com/dotnet/arcade
diff --git a/eng/Versions.props b/eng/Versions.props
index 3c65efb060c..847701f61e9 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -70,7 +70,7 @@
7.0.0-preview.23102.1
7.0.0-preview.23102.1
- 8.0.0-preview1.23081.3
+ 8.0.0-preview1.23102.2
8.0.0-alpha.1.23059.14
8.0.0-alpha.1.23059.14
From 562139702eb4523fffdf356fefc30c15b30a9bd2 Mon Sep 17 00:00:00 2001
From: Joe Schmitt
Date: Fri, 3 Feb 2023 13:01:10 -0800
Subject: [PATCH 09/61] Automatically create branches that track the latest
releases (#3549)
---
.github/workflows/track-shipping-version.yml | 34 ++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 .github/workflows/track-shipping-version.yml
diff --git a/.github/workflows/track-shipping-version.yml b/.github/workflows/track-shipping-version.yml
new file mode 100644
index 00000000000..fe2e0f0a71c
--- /dev/null
+++ b/.github/workflows/track-shipping-version.yml
@@ -0,0 +1,34 @@
+on:
+ release:
+ types: [released]
+
+permissions:
+ contents: write
+
+env:
+ shipping_branch_prefix: 'shipped'
+
+jobs:
+ update-shipping-branch:
+ if: github.repository == 'dotnet/dotnet-monitor'
+ name: '[${{ github.ref_name }}] Update shipping branch'
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Update shipping branch
+ run: |
+ release_version=${GITHUB_REF_NAME%-*}
+ if [[ ! "$release_version" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ echo "Unexpected release tag: $release_version."
+ exit 1
+ fi
+
+ major_minor_version=${release_version%.*}
+ shipping_branch_name="${{ env.shipping_branch_prefix }}/$major_minor_version"
+
+ # This is a shallow clone so we will always create a new local branch even if it already exists on the remote
+ git checkout -b "$shipping_branch_name"
+ git push --force --set-upstream origin "HEAD:$shipping_branch_name"
From 79a35f055d8f71de57b01b076a50556624a60085 Mon Sep 17 00:00:00 2001
From: Justin Anderson
Date: Fri, 3 Feb 2023 13:48:31 -0800
Subject: [PATCH 10/61] Update dependencies and SDK to 8.0 Preview 2 (#3552)
---
eng/Version.Details.xml | 24 ++++++++++++++----------
eng/Versions.props | 8 ++++----
global.json | 2 +-
3 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index af5eb52aa5d..020180b373b 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,5 +1,9 @@
+
+ https://github.com/dotnet/aspnetcore
+ 65493f5ed529a47937066a84d43f913796bbcf30
+
https://github.com/dotnet/diagnostics
f0d60e0eda555cded9ddf6bf2a1ab970d9b6265a
@@ -14,10 +18,6 @@
-
- https://github.com/dotnet/aspnetcore
- 6f1752a798a9460b8a039750e30b827578528c90
-
https://github.com/dotnet/roslyn-analyzers
5802d3ac5cc2c5eb828b64f20cdf0f93956f042a
@@ -34,6 +34,10 @@
https://github.com/dotnet/arcade
afa0b37a066ac10768e49b29c82e5e039e714655
+
+ https://github.com/dotnet/installer
+ 5c7737d740c861fe7cda4822a7137c22368000dc
+
https://github.com/dotnet/arcade
afa0b37a066ac10768e49b29c82e5e039e714655
@@ -42,17 +46,17 @@
https://github.com/dotnet/symstore
117c711598f1cc144e0c9d82c4e9f78638e0315d
-
+
https://github.com/dotnet/runtime
- 78f5a9839ac7d49a3cfaa6f4015a90b1cc846fa1
+ 9529803ae29c2804880c6bd8ca710b8c037cb498
-
+
https://github.com/dotnet/aspnetcore
- 6f1752a798a9460b8a039750e30b827578528c90
+ 65493f5ed529a47937066a84d43f913796bbcf30
-
+
https://github.com/dotnet/runtime
- 78f5a9839ac7d49a3cfaa6f4015a90b1cc846fa1
+ 9529803ae29c2804880c6bd8ca710b8c037cb498
diff --git a/eng/Versions.props b/eng/Versions.props
index 847701f61e9..61233ceba71 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -62,8 +62,8 @@
8.0.0-beta.23102.4
8.0.0-beta.23102.4
- 8.0.0-alpha.1.23066.6
- 8.0.0-alpha.1.23066.6
+ 8.0.0-alpha.1.23079.1
+ 8.0.0-alpha.1.23079.1
2.0.0-beta4.23102.3
@@ -72,8 +72,8 @@
8.0.0-preview1.23102.2
- 8.0.0-alpha.1.23059.14
- 8.0.0-alpha.1.23059.14
+ 8.0.0-alpha.1.23080.2
+ 8.0.0-alpha.1.23080.2
1.0.408101
diff --git a/global.json b/global.json
index 193bb5ab51f..ec8bbae7f0e 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"tools": {
- "dotnet": "8.0.100-alpha.1.23061.8",
+ "dotnet": "8.0.100-preview.2.23102.11",
"runtimes": {
"aspnetcore": [
"$(MicrosoftAspNetCoreApp60Version)",
From 3b1875b9ee326d321081116e2d152cc6f064b3a5 Mon Sep 17 00:00:00 2001
From: Justin Anderson
Date: Fri, 3 Feb 2023 15:15:31 -0800
Subject: [PATCH 11/61] Fix docker tag opt-out variable and usage (#3563)
---
dotnet-monitor.yml | 8 +++-----
eng/pipelines/stages/preparerelease.yml | 8 ++++----
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/dotnet-monitor.yml b/dotnet-monitor.yml
index 8f0a895217d..fa7ae5f06d1 100644
--- a/dotnet-monitor.yml
+++ b/dotnet-monitor.yml
@@ -47,9 +47,6 @@ variables:
value: DotNetCore
- name: _TPNFile
value: THIRD-PARTY-NOTICES.TXT
-# Scheduled builds of main branch will be marked for update by dotnet-docker if this is true
-- name: NightlyUpdateDockerFromMain
- value: true
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
# DotNet-Diagnostics-SDL-Params provides Tsa* variables for SDL checks.
@@ -141,7 +138,8 @@ stages:
- template: /eng/pipelines/stages/preparerelease.yml
parameters:
${{ if eq(parameters.updateDocker, 'true') }}:
- updateDocker: true
+ updateDockerCondition: true
${{ else }}:
# If scheduled build from main and nightly update from main enabled
- updateDocker: ${{ and(eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['Build.Reason'], 'Schedule'), eq(variables['NightlyUpdateDockerFromMain'], 'true')) }}
+ updateDockerCondition: and(eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['Build.Reason'], 'Schedule'), eq(variables['NightlyUpdateDockerFromMain'], 'true'))
+
diff --git a/eng/pipelines/stages/preparerelease.yml b/eng/pipelines/stages/preparerelease.yml
index 204de4c683f..88e45122192 100644
--- a/eng/pipelines/stages/preparerelease.yml
+++ b/eng/pipelines/stages/preparerelease.yml
@@ -1,7 +1,6 @@
parameters:
-- name: updateDocker
- displayName: 'Update dotnet-docker? (Only for release branches)'
- type: boolean
+- name: updateDockerCondition
+ type: string
default: false
stages:
@@ -88,9 +87,10 @@ stages:
inputs:
type: 'Build'
tags: 'MonitorRelease'
- - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.updateDocker, true)) }}:
+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: tagBuildOrRelease@0
displayName: 'Tag Build with update-docker'
+ condition: ${{ parameters.updateDockerCondition }}
inputs:
type: 'Build'
tags: 'update-docker'
From c081bc5feb6ed53dc2eb93591a2d0b6753ffdacf Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Sat, 4 Feb 2023 13:40:43 +0000
Subject: [PATCH 12/61] Update dependencies from
https://github.com/dotnet/diagnostics build 20230203.1 (#3564)
[main] Update dependencies from dotnet/diagnostics
---
eng/Version.Details.xml | 8 ++++----
eng/Versions.props | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 020180b373b..468e08d6979 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -4,13 +4,13 @@
https://github.com/dotnet/aspnetcore
65493f5ed529a47937066a84d43f913796bbcf30
-
+
https://github.com/dotnet/diagnostics
- f0d60e0eda555cded9ddf6bf2a1ab970d9b6265a
+ c35079e7e858db8d8be9b92c0b21637e00926f9b
-
+
https://github.com/dotnet/diagnostics
- f0d60e0eda555cded9ddf6bf2a1ab970d9b6265a
+ c35079e7e858db8d8be9b92c0b21637e00926f9b
https://github.com/dotnet/command-line-api
diff --git a/eng/Versions.props b/eng/Versions.props
index 61233ceba71..813ed4e3ccc 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -67,8 +67,8 @@
2.0.0-beta4.23102.3
- 7.0.0-preview.23102.1
- 7.0.0-preview.23102.1
+ 7.0.0-preview.23103.1
+ 7.0.0-preview.23103.1
8.0.0-preview1.23102.2
From 7374d34067da889dfd9cddb34dba5a2bd6497664 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Sat, 4 Feb 2023 13:41:12 +0000
Subject: [PATCH 13/61] Update dependencies from
https://github.com/dotnet/arcade build 20230203.1 (#3565)
[main] Update dependencies from dotnet/arcade
---
eng/Version.Details.xml | 16 ++++++++--------
eng/Versions.props | 6 +++---
eng/common/native/init-compiler.sh | 2 +-
global.json | 2 +-
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 468e08d6979..615efd648a4 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -22,25 +22,25 @@
https://github.com/dotnet/roslyn-analyzers
5802d3ac5cc2c5eb828b64f20cdf0f93956f042a
-
+
https://github.com/dotnet/arcade
- afa0b37a066ac10768e49b29c82e5e039e714655
+ c453dfef2f41533de5cb03b2115aab9d0dfc74c6
-
+
https://github.com/dotnet/arcade
- afa0b37a066ac10768e49b29c82e5e039e714655
+ c453dfef2f41533de5cb03b2115aab9d0dfc74c6
-
+
https://github.com/dotnet/arcade
- afa0b37a066ac10768e49b29c82e5e039e714655
+ c453dfef2f41533de5cb03b2115aab9d0dfc74c6
https://github.com/dotnet/installer
5c7737d740c861fe7cda4822a7137c22368000dc
-
+
https://github.com/dotnet/arcade
- afa0b37a066ac10768e49b29c82e5e039e714655
+ c453dfef2f41533de5cb03b2115aab9d0dfc74c6
https://github.com/dotnet/symstore
diff --git a/eng/Versions.props b/eng/Versions.props
index 813ed4e3ccc..0325d3fc159 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -58,9 +58,9 @@
-->
- 8.0.0-beta.23102.4
- 8.0.0-beta.23102.4
- 8.0.0-beta.23102.4
+ 8.0.0-beta.23103.1
+ 8.0.0-beta.23103.1
+ 8.0.0-beta.23103.1
8.0.0-alpha.1.23079.1
8.0.0-alpha.1.23079.1
diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh
index c670cb79689..7aee4213e1b 100644
--- a/eng/common/native/init-compiler.sh
+++ b/eng/common/native/init-compiler.sh
@@ -63,7 +63,7 @@ if [ -z "$CLR_CC" ]; then
# Set default versions
if [ -z "$majorVersion" ]; then
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
- if [ "$compiler" = "clang" ]; then versions="15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
+ if [ "$compiler" = "clang" ]; then versions="16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
elif [ "$compiler" = "gcc" ]; then versions="12 11 10 9 8 7 6 5 4.9"; fi
for version in $versions; do
diff --git a/global.json b/global.json
index ec8bbae7f0e..5ae9f04a834 100644
--- a/global.json
+++ b/global.json
@@ -26,6 +26,6 @@
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
- "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23102.4"
+ "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23103.1"
}
}
From 2b88c4e1913fdcc5b294f365b175d6b841f45555 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Sat, 4 Feb 2023 14:06:23 +0000
Subject: [PATCH 14/61] Update dependencies from
https://github.com/dotnet/command-line-api build 20230203.1 (#3566)
[main] Update dependencies from dotnet/command-line-api
---
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 615efd648a4..b8f61915206 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -12,9 +12,9 @@
https://github.com/dotnet/diagnostics
c35079e7e858db8d8be9b92c0b21637e00926f9b
-
+
https://github.com/dotnet/command-line-api
- 7030070c394c2d85dd10f6d1cc22ac6c1e902ce2
+ 1bc03fed713b0b10455942d9f8eeab371d519cba
diff --git a/eng/Versions.props b/eng/Versions.props
index 0325d3fc159..56c5f2f4d24 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -65,7 +65,7 @@
8.0.0-alpha.1.23079.1
8.0.0-alpha.1.23079.1
- 2.0.0-beta4.23102.3
+ 2.0.0-beta4.23103.1
7.0.0-preview.23103.1
7.0.0-preview.23103.1
From 6888e412fd9886669e93fe6b18b82fbf440a08bd Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Sat, 4 Feb 2023 14:22:34 +0000
Subject: [PATCH 15/61] Update dependencies from
https://github.com/dotnet/roslyn-analyzers build 20230203.3 (#3567)
[main] Update dependencies from dotnet/roslyn-analyzers
---
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index b8f61915206..87d7e6127e4 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -18,9 +18,9 @@
-
+
https://github.com/dotnet/roslyn-analyzers
- 5802d3ac5cc2c5eb828b64f20cdf0f93956f042a
+ 23b0f3d6e7d6f5d44ee58c9a3f6368a46ab75ea3
https://github.com/dotnet/arcade
diff --git a/eng/Versions.props b/eng/Versions.props
index 56c5f2f4d24..c0d3f5cb1bf 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -70,7 +70,7 @@
7.0.0-preview.23103.1
7.0.0-preview.23103.1
- 8.0.0-preview1.23102.2
+ 8.0.0-preview1.23103.3
8.0.0-alpha.1.23080.2
8.0.0-alpha.1.23080.2
From 54a894462d1bfad9f008df5b0101f4f86f63a794 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Sat, 4 Feb 2023 14:35:21 +0000
Subject: [PATCH 16/61] Update dependencies from
https://github.com/dotnet/installer build 20230203.8 (#3568)
[main] Update dependencies from dotnet/installer
---
eng/Version.Details.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 87d7e6127e4..5933ec56175 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -34,9 +34,9 @@
https://github.com/dotnet/arcade
c453dfef2f41533de5cb03b2115aab9d0dfc74c6
-
+
https://github.com/dotnet/installer
- 5c7737d740c861fe7cda4822a7137c22368000dc
+ 42cb79cb93a342bb21ea954b41490f67dccca595
https://github.com/dotnet/arcade
From 717aa8b4998c2d67beb2da7c695cea0dc28b28fe Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Sun, 5 Feb 2023 14:13:14 +0000
Subject: [PATCH 17/61] Update dependencies from
https://github.com/dotnet/roslyn-analyzers build 20230204.1 (#3569)
[main] Update dependencies from dotnet/roslyn-analyzers
---
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 5933ec56175..02d371a6cf6 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -18,9 +18,9 @@
-
+
https://github.com/dotnet/roslyn-analyzers
- 23b0f3d6e7d6f5d44ee58c9a3f6368a46ab75ea3
+ 1dc431ec828e9cc816fc69f89ad9b8286e74d707
https://github.com/dotnet/arcade
diff --git a/eng/Versions.props b/eng/Versions.props
index c0d3f5cb1bf..aba58b7b747 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -70,7 +70,7 @@
7.0.0-preview.23103.1
7.0.0-preview.23103.1
- 8.0.0-preview1.23103.3
+ 8.0.0-preview1.23104.1
8.0.0-alpha.1.23080.2
8.0.0-alpha.1.23080.2
From a24802a102c014067402a384568a3d626a5c3350 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Mon, 6 Feb 2023 14:29:17 +0000
Subject: [PATCH 18/61] Update dependencies from
https://github.com/dotnet/installer build 20230205.6 (#3575)
[main] Update dependencies from dotnet/installer
---
eng/Version.Details.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 02d371a6cf6..26f82dc2e98 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -34,9 +34,9 @@
https://github.com/dotnet/arcade
c453dfef2f41533de5cb03b2115aab9d0dfc74c6
-
+
https://github.com/dotnet/installer
- 42cb79cb93a342bb21ea954b41490f67dccca595
+ d25a3bbf0c5ea90b8b5b4b2dabfabad48b6c107e
https://github.com/dotnet/arcade
From f87318d5271e6b6ffd8b91bb21f73d1a6326b9c3 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 6 Feb 2023 09:08:37 -0800
Subject: [PATCH 19/61] sync branch with origin/main (#3571)
Co-authored-by: github-actions
---
.github/dependabot.template.yml | 2 +-
.github/dependabot.yml | 41 ++++++++++
.github/workflows/track-shipping-version.yml | 34 +++++++++
cspell.json | 1 +
documentation/api/livemetrics-custom.md | 50 +++++++++++-
.../configuration/metrics-configuration.md | 66 ++++++++++++++++
documentation/learningPath/collectionrules.md | 76 +++++++++++++++++++
documentation/release-process.md | 4 +
8 files changed, 271 insertions(+), 3 deletions(-)
create mode 100644 .github/workflows/track-shipping-version.yml
diff --git a/.github/dependabot.template.yml b/.github/dependabot.template.yml
index 258b716710c..3e42072a3e9 100644
--- a/.github/dependabot.template.yml
+++ b/.github/dependabot.template.yml
@@ -9,7 +9,7 @@ updates:
schedule:
interval: "daily"
target-branch: "main"
-#@ for branch in ["main", "release/7.x", "release/7.0", "release/6.x"]:
+#@ for branch in ["main", "release/8.x", "release/7.x", "release/7.0", "release/6.x"]:
- package-ecosystem: "nuget"
directory: "/eng/dependabot"
schedule:
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index e1b43f726b2..f935336482f 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -46,6 +46,47 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+- package-ecosystem: nuget
+ directory: /eng/dependabot
+ schedule:
+ interval: daily
+ target-branch: release/8.x
+ ignore:
+ - dependency-name: Microsoft.Extensions.*
+ update-types:
+ - version-update:semver-major
+- package-ecosystem: nuget
+ directory: /eng/dependabot/nuget.org
+ schedule:
+ interval: daily
+ target-branch: release/8.x
+- package-ecosystem: nuget
+ directory: /eng/dependabot/net7.0
+ schedule:
+ interval: daily
+ target-branch: release/8.x
+ ignore:
+ - dependency-name: '*'
+ update-types:
+ - version-update:semver-major
+- package-ecosystem: nuget
+ directory: /eng/dependabot/net6.0
+ schedule:
+ interval: daily
+ target-branch: release/8.x
+ ignore:
+ - dependency-name: '*'
+ update-types:
+ - version-update:semver-major
+- package-ecosystem: nuget
+ directory: /eng/dependabot/netcoreapp3.1
+ schedule:
+ interval: daily
+ target-branch: release/8.x
+ ignore:
+ - dependency-name: '*'
+ update-types:
+ - version-update:semver-major
- package-ecosystem: nuget
directory: /eng/dependabot
schedule:
diff --git a/.github/workflows/track-shipping-version.yml b/.github/workflows/track-shipping-version.yml
new file mode 100644
index 00000000000..fe2e0f0a71c
--- /dev/null
+++ b/.github/workflows/track-shipping-version.yml
@@ -0,0 +1,34 @@
+on:
+ release:
+ types: [released]
+
+permissions:
+ contents: write
+
+env:
+ shipping_branch_prefix: 'shipped'
+
+jobs:
+ update-shipping-branch:
+ if: github.repository == 'dotnet/dotnet-monitor'
+ name: '[${{ github.ref_name }}] Update shipping branch'
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Update shipping branch
+ run: |
+ release_version=${GITHUB_REF_NAME%-*}
+ if [[ ! "$release_version" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ echo "Unexpected release tag: $release_version."
+ exit 1
+ fi
+
+ major_minor_version=${release_version%.*}
+ shipping_branch_name="${{ env.shipping_branch_prefix }}/$major_minor_version"
+
+ # This is a shallow clone so we will always create a new local branch even if it already exists on the remote
+ git checkout -b "$shipping_branch_name"
+ git push --force --set-upstream origin "HEAD:$shipping_branch_name"
diff --git a/cspell.json b/cspell.json
index 25bb1e8f711..2eb45589309 100644
--- a/cspell.json
+++ b/cspell.json
@@ -62,6 +62,7 @@
"openapi",
"Pids",
"PKCS",
+ "quantile",
"rclsid",
"reentrancy",
"REFCLSID",
diff --git a/documentation/api/livemetrics-custom.md b/documentation/api/livemetrics-custom.md
index 1854ce51394..ecba82ccf90 100644
--- a/documentation/api/livemetrics-custom.md
+++ b/documentation/api/livemetrics-custom.md
@@ -60,7 +60,9 @@ The expected content type is `application/json`.
## Examples
-### Sample Request
+### EventCounter
+
+#### Sample Request
```http
POST /livemetrics?pid=21632&durationSeconds=60 HTTP/1.1
@@ -81,7 +83,7 @@ Authorization: Bearer fffffffffffffffffffffffffffffffffffffffffff=
}
```
-### Sample Response
+#### Sample Response
```http
HTTP/1.1 200 OK
@@ -113,6 +115,50 @@ Location: localhost:52323/operations/67f07e40-5cca-4709-9062-26302c484f18
}
```
+### System.Diagnostics.Metrics
+
+#### Sample Request
+
+```http
+GET /livemetrics?pid=21632&durationSeconds=60 HTTP/1.1
+Host: localhost:52323
+Authorization: Bearer fffffffffffffffffffffffffffffffffffffffffff=
+
+{
+ "includeDefaultProviders": false,
+ "providers": [
+ {
+ "providerName": "CustomProvider",
+ "counterNames": [
+ "myHistogram"
+ ]
+ }
+ ]
+}
+```
+
+#### Sample Histogram Response
+
+```http
+HTTP/1.1 200 OK
+Content-Type: application/json-seq
+Location: localhost:52323/operations/67f07e40-5cca-4709-9062-26302c484f18
+
+{
+ "timestamp": "2021-08-31T16:58:39.7514031+00:00",
+ "provider": "CustomProvider",
+ "name": "myHistogram",
+ "displayName": "myHistogram",
+ "unit": null,
+ "counterType": "Metric",
+ "value": {
+ "0.5": 2892,
+ "0.95": 4848,
+ "0.99": 4984
+ }
+}
+```
+
## Supported Runtimes
| Operating System | Runtime Version |
diff --git a/documentation/configuration/metrics-configuration.md b/documentation/configuration/metrics-configuration.md
index 783a7a0874e..8c81287c060 100644
--- a/documentation/configuration/metrics-configuration.md
+++ b/documentation/configuration/metrics-configuration.md
@@ -168,6 +168,72 @@ When `CounterNames` are not specified, all the counters associated with the `Pro
[7.1+] Custom metrics support labels for metadata. Metadata cannot include commas (`,`); the inclusion of a comma in metadata will result in all metadata being removed from the custom metric.
+## Limit How Many Histograms To Track (8.0+)
+
+For System.Diagnostics.Metrics, `dotnet monitor` allows you to set the maximum number of histograms that can be tracked. Each unique combination of provider name, histogram name, and dimension values counts as one histogram. Tracking more histograms uses more memory in the target process so this bound guards against unintentional high memory use. `MaxHistograms` has a default value of `20`.
+
+
+ JSON
+
+ ```json
+ {
+ "GlobalCounter": {
+ "MaxHistograms": 5
+ }
+ }
+ ```
+
+
+
+ Kubernetes ConfigMap
+
+ ```yaml
+ GlobalCounter__MaxHistograms: "5"
+ ```
+
+
+
+ Kubernetes Environment Variables
+
+ ```yaml
+ - name: DotnetMonitor_GlobalCounter__MaxHistograms
+ value: "5"
+ ```
+
+
+## Limit How Many Time Series To Track (8.0+)
+
+For System.Diagnostics.Metrics, `dotnet monitor` allows you to set the maximum number of time series that can be tracked. Each unique combination of provider name, metric name, and dimension values counts as one time series. Tracking more time series uses more memory in the target process so this bound guards against unintentional high memory use. `MaxTimeSeries` has a default value of `1000`.
+
+
+ JSON
+
+ ```json
+ {
+ "GlobalCounter": {
+ "MaxTimeSeries": 500
+ }
+ }
+ ```
+
+
+
+ Kubernetes ConfigMap
+
+ ```yaml
+ GlobalCounter__MaxTimeSeries: "500"
+ ```
+
+
+
+ Kubernetes Environment Variables
+
+ ```yaml
+ - name: DotnetMonitor_GlobalCounter__MaxTimeSeries
+ value: "500"
+ ```
+
+
## Disable default providers
In addition to enabling custom providers, `dotnet monitor` also allows you to disable collection of the default providers. You can do so via the following configuration:
diff --git a/documentation/learningPath/collectionrules.md b/documentation/learningPath/collectionrules.md
index c0fc148089f..6ea6c9ce47e 100644
--- a/documentation/learningPath/collectionrules.md
+++ b/documentation/learningPath/collectionrules.md
@@ -2,3 +2,79 @@
### Was this documentation helpful? [Share feedback](https://www.research.net/r/DGDQWXH?src=documentation%2FlearningPath%2Fcollectionrules)
# Collection Rules
+
+## How To Use Collection Rules
+
+You can learn more about how collection rules work [here](https://github.com/dotnet/dotnet-monitor/blob/main/documentation/collectionrules/collectionrules.md#collection-rules), with usage examples [here](https://github.com/dotnet/dotnet-monitor/blob/main/documentation/collectionrules/collectionruleexamples.md). If you're unfamiliar with collection rules in `dotnet-monitor`, we recommend taking a look at how to use collection rules before continuing with this learning path.
+
+## Collection Rule Architecture
+
+Collection rules' implementation is distributed between the `dotnet monitor` repo and the [`dotnet diagnostics` repo](https://github.com/dotnet/diagnostics). The flowchart below shows a simplified version of how `dotnet monitor` and `dotnet diagnostics` interact to run collection rules.
+
+```mermaid
+%%{ init: { 'flowchart': { 'curve': 'basis' } } }%%
+graph LR
+ classDef altColor fill:#CAF,stroke:purple;
+ subgraph ide1 [Set-Up]
+ A[Configuration] --> N{.NET Monitor}
+ N --> |1| O[Load Configuration and Bind Options]
+ N --> |2| P[Connect to Processes in Reverse Mode]
+ N --> |3| Q[Start Pipelines For Processes That Match Filters]
+ end
+ subgraph ide2 [Repeat until Rule Limits Reached]
+ N ---> |4| R[Wait To Satisfy Trigger - See Diagram B]
+ N ---> |5| V[Check For Throttling]
+ N ---> |6| W[Execute Action List]
+ end
+
+ class ide2 altColor
+```
+
+### Key Areas Of The Code
+
+* Collection rules are registered [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/ServiceCollectionExtensions.cs#L100). When adding a new trigger or action, these types need to be added here to take effect. This section is also responsible for making sure options get configured and validated.
+* Options for collection rules can be found [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/CollectionRuleOptions.cs).
+* Rules are applied, removed, and restarted in response to configuration changes [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/CollectionRuleService.cs). This is also responsible for generating a description of each collection rule's state for the `/collectionrules` API Endpoint.
+* The pipeline responsible for the lifetime of a single executing collection rule can be found [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/CollectionRulePipeline.cs#L55).
+* To run collection rules, `dotnet monitor` must be in `Listen` mode - this is set via [DiagnosticPortOptions](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Microsoft.Diagnostics.Monitoring.Options/DiagnosticPortOptions.cs).
+* For each type of trigger, the [dotnet diagnostics repo](https://github.com/dotnet/diagnostics/blob/v6.0.351802/src/Microsoft.Diagnostics.Monitoring.EventPipe/Triggers/ITraceEventTrigger.cs#L29) is responsible for determining whether the triggering conditions have been satisfied.
+
+### Triggers
+
+A trigger will monitor for a specific condition in the target application and raise a notification when that condition has been observed. Options for triggers can be found [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/CollectionRuleTriggerOptions.cs); the type of `Settings` is determined by which trigger is being used (possible trigger types can be found [here](https://github.com/dotnet/dotnet-monitor/tree/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/Triggers)). The interface for all triggers can be found [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Triggers/ICollectionRuleTrigger.cs) - this allows `dotnet monitor` to start and stop triggers, regardless of the trigger's properties. The collection rule pipeline creates instances of triggers [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/CollectionRulePipeline.cs#L100) before waiting for the trigger to [satisfy its conditions](https://github.com/dotnet/diagnostics/blob/v6.0.351802/src/Microsoft.Diagnostics.Monitoring.EventPipe/Triggers/Pipelines/TraceEventTriggerPipeline.cs#L107) - each trigger has its own set of criteria that determines when a trigger has been satisfied.
+
+### Actions
+
+Actions allow executing an operation or an external executable in response to a trigger condition being satisfied. Options for actions can be found [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/CollectionRuleActionOptions.cs); the type of `Settings` is determined by which action is being used (possible action types can be found [here](https://github.com/dotnet/dotnet-monitor/tree/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/Actions)). The interface for all actions can be found [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Actions/ICollectionRuleAction.cs) - this allows `dotnet monitor` to start an action, wait for it to complete, and get its output values regardless of the action's properties. The action list is [executed](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/CollectionRulePipeline.cs#L150) once the triggering condition has been met (assuming the action list isn't throttled), with each action by default starting without waiting for prior actions to complete.
+
+### Filters
+
+Filters can optionally be applied to a collection rule to choose which processes can trigger the rule. This uses the same set of [options](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Microsoft.Diagnostics.Monitoring.Options/ProcessFilterOptions.cs#L47) as setting the default process for `dotnet-monitor`. When starting a collection rule, [these filters are used to check if the current process should have the collection rule applied to it](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/CollectionRuleContainer.cs#L189); if so, the collection rule starts.
+
+### Limits
+
+Limits can optionally be applied to a collection rule to constrain the lifetime of the rule and how often its actions can be run before being throttled. Options for limits can be found [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/CollectionRuleLimitsOptions.cs). When provided (or when using default values), limits are evaluated in the collection rule pipeline while running. `RuleDuration` is used to [create a token](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/CollectionRulePipeline.cs#L80) that shuts down the pipeline. `ActionCountSlidingWindowDuration` does not rely on setting cancellation tokens; rather, the number of executions within the sliding window are checked on-demand [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Microsoft.Diagnostics.Monitoring.WebApi/CollectionRulePipelineState.cs#L212), and `ActionCount` is referenced to determine whether the rule needs to [terminate](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Microsoft.Diagnostics.Monitoring.WebApi/CollectionRulePipelineState.cs#L195) or [throttle](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Microsoft.Diagnostics.Monitoring.WebApi/CollectionRulePipelineState.cs#L235).
+
+## Miscellaneous
+
+### Trigger Shortcuts
+
+Trigger Shortcuts provide improved defaults, range validation, and a simpler syntax for [several commonly used `EventCounter` triggers](https://github.com/dotnet/dotnet-monitor/tree/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/Triggers/EventCounterShortcuts). These shortcuts provide the same functionality as using the standard `EventCounter` syntax, but have fewer available options (since there is no need to specify the `ProviderName` or the `CounterName`) - as a result, shortcuts do not inherit from `EventCounterOptions`, but rather [IEventCounterShortcuts](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/Triggers/EventCounterShortcuts/IEventCounterShortcuts.cs). Each type of shortcut is registered independently [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/ServiceCollectionExtensions.cs#L117). After binding with configuration and undergoing validation, shortcuts are then converted to be treated as `EventCounter` triggers [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Triggers/EventCounterTriggerFactory.cs), using their respective defaults instead of the generic ones.
+
+### Templates
+
+Templates allow users to design reusable collection rule components by associating a name with a piece of configuration. Options for templates can be found [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/TemplateOptions.cs). Before collection rules undergo validation, `dotnet monitor` checks to see if any of the rule's components in configuration [list the name of a template](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Configuration/CollectionRulePostConfigureNamedOptions.cs) - if so, the collection rule's options are populated from the correspondingly named template. Note that templates undergo the same binding process for triggers/actions as collection rules; however, since templates are treated as separate parts of configuration, this binding instead happens [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Configuration/TemplatesConfigureNamedOptions.cs).
+
+### Collection Rule Defaults
+
+Defaults can be used to limit the verbosity of configuration, allowing frequently used values for collection rules to be assigned as defaults. Options for collection rule defaults can be found [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/CollectionRuleDefaultsOptions.cs). These defaults are merged with the user's provided configuration [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/DefaultCollectionRulePostConfigureOptions.cs) - any properties that the user hasn't set (that have corresponding default values) will be updated at this point to use the default values. This step occurs prior to `dotnet monitor` attempting to use its built-in defaults, which allows user defaults to take precedence.
+
+### Collection Rule API Endpoint
+
+The Collection Rule API Endpoint allows users to get information about the state of their collection rules, providing general information [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs#L532) and more specific information about a particular rule [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs#L557). **This API is solely for viewing the current state of rules, not altering state**.
+
+Each collection rule pipeline has a [state holder](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Microsoft.Diagnostics.Monitoring.WebApi/CollectionRulePipelineState.cs) that keeps track of the rule's execution. By keeping track of the pipeline's state in real-time, this state doesn't need to be calculated in response to a user hitting the `/collectionrules` endpoint. However, other user-facing information, such as countdowns, are calculated on-demand - these values are solely for display purposes and not used by `dotnet-monitor` when determining when to change state (see [Limits](#limits) for more information).
+
+## Keeping Documentation Up-To-Date
+
+When making changes to collection rules that require updates to configuration, these changes should be added [here](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/documentation/configuration.md#collection-rule-configuration). Additional information on collection rules and examples can be provided [here](https://github.com/dotnet/dotnet-monitor/tree/v7.0.1/documentation/collectionrules).
diff --git a/documentation/release-process.md b/documentation/release-process.md
index 7d8506a953c..810141c4ed9 100644
--- a/documentation/release-process.md
+++ b/documentation/release-process.md
@@ -5,6 +5,7 @@
## Prepare the release branch
+1. Update the [internal pipeline](https://dev.azure.com/dnceng/internal/_build?definitionId=954) variables to prevent consumption of nightly builds into dotnet-docker. Set `NightlyUpdateDockerFromMain` variable to `false` on the pipeline itself, not just on a new build.
1. Merge from the `main` branch to the appropriate release branch (e.g. `release/5.0`). Note that for patch releases, fixes should be made directly to the appropriate release branch and we do not merge from the `main` branch. Note that it is acceptable to use a release/major.x branch. Alternatively, you can create a new release branch for the minor version. See [additional branch steps](#additional-steps-when-creating-a-new-release-branch) below.
1. Review and merge in any outstanding dependabot PRs for the release branch.
1. Run the [Update release version](https://github.com/dotnet/dotnet-monitor/actions/workflows/update-release-version.yml) workflow, setting `Use workflow from` to the release branch and correctly setting the `Release type` and `Release version` options. (*NOTE:* Release version should include only major.minor.patch, without any extra labels). Review and merge in the PR created by this workflow.
@@ -18,6 +19,8 @@
1. Be sure to call [darc authenticate](https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md#authenticate). You will need to create the requested tokens.
1. You will need to add the branch to a channel. E.g.
`darc add-default-channel --channel ".NET Core Tooling Release" --branch release/8.x --repo https://github.com/dotnet/dotnet-monitor`
+1. Ensure that `UseMicrosoftDiagnosticsMonitoringShippedVersion` is set appropriately. See [Updating dependencies](#updating-dependencies).
+1. Ensure that dependabot configuration is updated at [../.github/dependabot.template.yml](../.github/dependabot.template.yml).
- It can be helpful to create test release branches (e.g. release/test/8.x). Note these branches will trigger warnings because they are considered unprotected release branches and should be deleted as soon as possible.
- If you created a build from a newly created release branch without a channel, you will get the message 'target build already exists on all channels'. To use this build you need to add it to a channel: `darc add-build-to-channel --id --channel "General Testing"`.
@@ -104,6 +107,7 @@ The release image is `mcr.microsoft.com/dotnet/monitor`. The tag list is https:/
## After the Release
+1. Change the `NightlyUpdateDockerFromMain` variable to `true` in the [internal pipeline](https://dev.azure.com/dnceng/internal/_build?definitionId=954) to begin the consumption of nightly builds into dotnet-docker.
1. Update [releases.md](https://github.com/dotnet/dotnet-monitor/blob/main/documentation/releases.md) with the latest version.
1. When necessary, update this document if its instructions were unclear or incorrect.
1. When releasing a new minor version, include an announcement that the previous version will soon be out of support. For example, https://github.com/dotnet/dotnet-monitor/discussions/1871
From 2cefea128275008f984df451f60a56821c2ba716 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Mon, 6 Feb 2023 09:32:19 -0800
Subject: [PATCH 20/61] [release/7.x] Update dependencies from
dotnet/command-line-api (#3557)
* Update dependencies from https://github.com/dotnet/command-line-api build 20230202.3
System.CommandLine
From Version 2.0.0-beta4.23073.1 -> To Version 2.0.0-beta4.23102.3
* Update dependencies from https://github.com/dotnet/command-line-api build 20230203.1
System.CommandLine
From Version 2.0.0-beta4.23073.1 -> To Version 2.0.0-beta4.23103.1
---------
Co-authored-by: dotnet-maestro[bot]
---
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 9c52c05242c..1ec9ded800d 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -8,9 +8,9 @@
https://github.com/dotnet/diagnostics
87ed4678a4339db8e9b14800cd2ce83477e7014d
-
+
https://github.com/dotnet/command-line-api
- 6524142f1398ed78eadfb9b802ba6492c6af63c4
+ 1bc03fed713b0b10455942d9f8eeab371d519cba
diff --git a/eng/Versions.props b/eng/Versions.props
index 7eff8041f2c..1f8d587b081 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -64,7 +64,7 @@
7.0.0
7.0.0-rtm.22513.7
- 2.0.0-beta4.23073.1
+ 2.0.0-beta4.23103.1
6.0.0-preview.23056.1
6.0.0-preview.23056.1
From f236f9e373fe28e688e63c961ec4abdec49df131 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 6 Feb 2023 09:40:04 -0800
Subject: [PATCH 21/61] Bump Microsoft.OpenApi.Readers from 1.5.0 to 1.6.0 in
/eng/dependabot (#3529)
Bumps [Microsoft.OpenApi.Readers](https://github.com/Microsoft/OpenAPI.NET) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/Microsoft/OpenAPI.NET/releases)
- [Commits](https://github.com/Microsoft/OpenAPI.NET/compare/1.5.0...1.6.0)
---
updated-dependencies:
- dependency-name: Microsoft.OpenApi.Readers
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
eng/dependabot/Versions.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/dependabot/Versions.props b/eng/dependabot/Versions.props
index b35f328f305..22e4e22b6b8 100644
--- a/eng/dependabot/Versions.props
+++ b/eng/dependabot/Versions.props
@@ -11,7 +11,7 @@
7.0.0
7.0.0
6.26.0
- 1.5.0
+ 1.6.0
4.3.2
5.0.0
From deb7dfffd7b6957efde3489317e177211b3bac75 Mon Sep 17 00:00:00 2001
From: kkeirstead <85592574+kkeirstead@users.noreply.github.com>
Date: Mon, 6 Feb 2023 11:30:29 -0800
Subject: [PATCH 22/61] Add automatic issue creation for PR Comment to-dos
(/TODO) (#3562)
---
.github/workflows/to-do-comments.yml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 .github/workflows/to-do-comments.yml
diff --git a/.github/workflows/to-do-comments.yml b/.github/workflows/to-do-comments.yml
new file mode 100644
index 00000000000..db0b94cba35
--- /dev/null
+++ b/.github/workflows/to-do-comments.yml
@@ -0,0 +1,22 @@
+name: To Do Comments
+on:
+ pull_request_review_comment:
+ types: [created]
+ issue_comment:
+ types: [created]
+
+permissions:
+ issues: write
+
+jobs:
+ create-todo-issue:
+ runs-on: ubuntu-latest
+ if: startsWith(github.event.comment.body, '/TODO') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - run: |
+ trimmed_comment=$(echo "${{ github.event.comment.body }}" | sed 's|/TODO ||I')
+ gh issue create --label "todo" --assignee "${{ github.event.comment.user.login }}" --title "$trimmed_comment" --body "${{ github.event.comment.html_url }}"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
From 34c547c742f70d687f00cb6476cecee72f83cc69 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Tue, 7 Feb 2023 13:42:10 +0000
Subject: [PATCH 23/61] Update dependencies from
https://github.com/dotnet/arcade build 20230206.4 (#3584)
[main] Update dependencies from dotnet/arcade
---
eng/Version.Details.xml | 16 ++++++++--------
eng/Versions.props | 6 +++---
global.json | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 26f82dc2e98..c8b3b437aa8 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -22,25 +22,25 @@
https://github.com/dotnet/roslyn-analyzers
1dc431ec828e9cc816fc69f89ad9b8286e74d707
-
+
https://github.com/dotnet/arcade
- c453dfef2f41533de5cb03b2115aab9d0dfc74c6
+ 02980a654d20995c38eca6ceabf729c4c13412c4
-
+
https://github.com/dotnet/arcade
- c453dfef2f41533de5cb03b2115aab9d0dfc74c6
+ 02980a654d20995c38eca6ceabf729c4c13412c4
-
+
https://github.com/dotnet/arcade
- c453dfef2f41533de5cb03b2115aab9d0dfc74c6
+ 02980a654d20995c38eca6ceabf729c4c13412c4
https://github.com/dotnet/installer
d25a3bbf0c5ea90b8b5b4b2dabfabad48b6c107e
-
+
https://github.com/dotnet/arcade
- c453dfef2f41533de5cb03b2115aab9d0dfc74c6
+ 02980a654d20995c38eca6ceabf729c4c13412c4
https://github.com/dotnet/symstore
diff --git a/eng/Versions.props b/eng/Versions.props
index aba58b7b747..7d3206d9506 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -58,9 +58,9 @@
-->
- 8.0.0-beta.23103.1
- 8.0.0-beta.23103.1
- 8.0.0-beta.23103.1
+ 8.0.0-beta.23106.4
+ 8.0.0-beta.23106.4
+ 8.0.0-beta.23106.4
8.0.0-alpha.1.23079.1
8.0.0-alpha.1.23079.1
diff --git a/global.json b/global.json
index 5ae9f04a834..b11e2a43e4c 100644
--- a/global.json
+++ b/global.json
@@ -26,6 +26,6 @@
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
- "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23103.1"
+ "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23106.4"
}
}
From fe90c0c31b8e30337e0271a03a9d5b6f9c2a1806 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Tue, 7 Feb 2023 13:46:42 +0000
Subject: [PATCH 24/61] Update dependencies from
https://github.com/dotnet/diagnostics build 20230206.1 (#3583)
[main] Update dependencies from dotnet/diagnostics
---
eng/Version.Details.xml | 8 ++++----
eng/Versions.props | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index c8b3b437aa8..31e25e1cf68 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -4,13 +4,13 @@
https://github.com/dotnet/aspnetcore
65493f5ed529a47937066a84d43f913796bbcf30
-
+
https://github.com/dotnet/diagnostics
- c35079e7e858db8d8be9b92c0b21637e00926f9b
+ 091c4839005957be5663a11dff6810ba8a46b095
-
+
https://github.com/dotnet/diagnostics
- c35079e7e858db8d8be9b92c0b21637e00926f9b
+ 091c4839005957be5663a11dff6810ba8a46b095
https://github.com/dotnet/command-line-api
diff --git a/eng/Versions.props b/eng/Versions.props
index 7d3206d9506..c1c8728ffc6 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -67,8 +67,8 @@
2.0.0-beta4.23103.1
- 7.0.0-preview.23103.1
- 7.0.0-preview.23103.1
+ 7.0.0-preview.23106.1
+ 7.0.0-preview.23106.1
8.0.0-preview1.23104.1
From b5726ec97e4306208092ba37e7066e68fa655ccb Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Tue, 7 Feb 2023 14:04:13 +0000
Subject: [PATCH 25/61] Update dependencies from
https://github.com/dotnet/symstore build 20230206.1 (#3585)
[main] Update dependencies from dotnet/symstore
---
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 31e25e1cf68..242b1c2f2e6 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -42,9 +42,9 @@
https://github.com/dotnet/arcade
02980a654d20995c38eca6ceabf729c4c13412c4
-
+
https://github.com/dotnet/symstore
- 117c711598f1cc144e0c9d82c4e9f78638e0315d
+ c6ecba72647d4277bfe0f85f5ed0405fdfa3a445
https://github.com/dotnet/runtime
diff --git a/eng/Versions.props b/eng/Versions.props
index c1c8728ffc6..bc284f9f2e2 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -75,7 +75,7 @@
8.0.0-alpha.1.23080.2
8.0.0-alpha.1.23080.2
- 1.0.408101
+ 1.0.410601
$(MicrosoftNETCoreApp31Version)
From d8f6ce174cd4b7de7772ec20d7e6f3451d2284a9 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Tue, 7 Feb 2023 14:34:19 +0000
Subject: [PATCH 26/61] Update dependencies from
https://github.com/dotnet/installer build 20230206.11 (#3586)
[main] Update dependencies from dotnet/installer
---
eng/Version.Details.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 242b1c2f2e6..67c8575fbc8 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -34,9 +34,9 @@
https://github.com/dotnet/arcade
02980a654d20995c38eca6ceabf729c4c13412c4
-
+
https://github.com/dotnet/installer
- d25a3bbf0c5ea90b8b5b4b2dabfabad48b6c107e
+ 48873c2344613a8d1fc02bd27c8aecf0dd0b2654
https://github.com/dotnet/arcade
From fa9ba1a7597d1386dafc3851a7c39f11119ac2e2 Mon Sep 17 00:00:00 2001
From: kkeirstead <85592574+kkeirstead@users.noreply.github.com>
Date: Tue, 7 Feb 2023 09:19:52 -0800
Subject: [PATCH 27/61] Split /TODO into two workflows (#3579)
---
.github/workflows/scan-for-to-do-comments.yml | 27 +++++++++++
.github/workflows/submit-to-do-issue.yml | 45 +++++++++++++++++++
.github/workflows/to-do-comments.yml | 22 ---------
3 files changed, 72 insertions(+), 22 deletions(-)
create mode 100644 .github/workflows/scan-for-to-do-comments.yml
create mode 100644 .github/workflows/submit-to-do-issue.yml
delete mode 100644 .github/workflows/to-do-comments.yml
diff --git a/.github/workflows/scan-for-to-do-comments.yml b/.github/workflows/scan-for-to-do-comments.yml
new file mode 100644
index 00000000000..4d959576e7e
--- /dev/null
+++ b/.github/workflows/scan-for-to-do-comments.yml
@@ -0,0 +1,27 @@
+name: Scan For To Do Comments
+on:
+ pull_request_review_comment:
+ types: [created]
+ issue_comment:
+ types: [created]
+
+jobs:
+ scan-for-todo-issue:
+ runs-on: ubuntu-latest
+ if: startsWith(github.event.comment.body, '/TODO')
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Generate artifacts
+ run: |
+ trimmed_comment=$(echo "${{ github.event.comment.body }}" | sed 's|/TODO ||I')
+ mkdir -p ./issue
+ echo -n $trimmed_comment > ./issue/issue-title
+ echo -n "${{ github.event.comment.html_url }}" > ./issue/issue-url
+ echo -n "${{ github.event.comment.user.login }}" > ./issue/issue-user
+ - name: Upload artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: issue-todo
+ path: issue/
diff --git a/.github/workflows/submit-to-do-issue.yml b/.github/workflows/submit-to-do-issue.yml
new file mode 100644
index 00000000000..5d323a4744b
--- /dev/null
+++ b/.github/workflows/submit-to-do-issue.yml
@@ -0,0 +1,45 @@
+name: 'Submit To Do Issue'
+
+on:
+ workflow_run:
+ workflows: ["Scan For To Do Comments"]
+ types:
+ - completed
+
+permissions:
+ issues: write
+
+jobs:
+ submit-todo-issue:
+ runs-on: ubuntu-latest
+ if: github.event.workflow_run.conclusion == 'success'
+ steps:
+ - uses: actions/github-script@v6.4.0
+ id: check-user
+ with:
+ script: |
+ await github.rest.repos.checkCollaborator({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ username: context.payload.workflow_run.triggering_actor.login
+ });
+ - name: Checkout
+ uses: actions/checkout@v3
+ # Download the artifact from the workflow that kicked off this one.
+ # The default artifact download action doesn't support cross-workflow
+ # artifacts, so use a 3rd party one.
+ - name: 'Download linting results'
+ uses: dawidd6/action-download-artifact@v2
+ with:
+ workflow: ${{env.workflow_name}}
+ run_id: ${{github.event.workflow_run.id }}
+ name: issue-todo
+ path: ./issue-todo
+ - name: Submit Issue
+ run: |
+ title=$(cat ./issue-todo/issue-title)
+ user=$(cat ./issue-todo/issue-user)
+ url=$(cat ./issue-todo/issue-url)
+ gh issue create --label "todo" --assignee "$user" --title "$title" --body "$url"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/to-do-comments.yml b/.github/workflows/to-do-comments.yml
deleted file mode 100644
index db0b94cba35..00000000000
--- a/.github/workflows/to-do-comments.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: To Do Comments
-on:
- pull_request_review_comment:
- types: [created]
- issue_comment:
- types: [created]
-
-permissions:
- issues: write
-
-jobs:
- create-todo-issue:
- runs-on: ubuntu-latest
- if: startsWith(github.event.comment.body, '/TODO') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - run: |
- trimmed_comment=$(echo "${{ github.event.comment.body }}" | sed 's|/TODO ||I')
- gh issue create --label "todo" --assignee "${{ github.event.comment.user.login }}" --title "$trimmed_comment" --body "${{ github.event.comment.html_url }}"
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
From 5e1406f915ad6be922be14ea29936f352310ee9a Mon Sep 17 00:00:00 2001
From: Joe Schmitt
Date: Tue, 7 Feb 2023 09:26:46 -0800
Subject: [PATCH 28/61] Update track-shipping-version.yml (#3588)
---
.github/workflows/track-shipping-version.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/track-shipping-version.yml b/.github/workflows/track-shipping-version.yml
index fe2e0f0a71c..6f1e92fdf3c 100644
--- a/.github/workflows/track-shipping-version.yml
+++ b/.github/workflows/track-shipping-version.yml
@@ -1,3 +1,4 @@
+name: Track shipped versions
on:
release:
types: [released]
From c7fc4ec2b74c001c891fa1ed701e8f59721a3f1d Mon Sep 17 00:00:00 2001
From: Justin Anderson
Date: Tue, 7 Feb 2023 13:54:13 -0800
Subject: [PATCH 29/61] Use branch name as message prefix for dependabot
updates (#3578)
---
.github/dependabot.template.yml | 7 +++++
.github/dependabot.yml | 50 +++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+)
diff --git a/.github/dependabot.template.yml b/.github/dependabot.template.yml
index 3e42072a3e9..005619b4121 100644
--- a/.github/dependabot.template.yml
+++ b/.github/dependabot.template.yml
@@ -10,6 +10,7 @@ updates:
interval: "daily"
target-branch: "main"
#@ for branch in ["main", "release/8.x", "release/7.x", "release/7.0", "release/6.x"]:
+#@ commit_prefix = "[" + branch + "] "
- package-ecosystem: "nuget"
directory: "/eng/dependabot"
schedule:
@@ -18,11 +19,15 @@ updates:
ignore:
- dependency-name: "Microsoft.Extensions.*"
update-types: [ "version-update:semver-major" ]
+ commit-message:
+ prefix: #@ commit_prefix
- package-ecosystem: "nuget"
directory: "/eng/dependabot/nuget.org"
schedule:
interval: "daily"
target-branch: #@ branch
+ commit-message:
+ prefix: #@ commit_prefix
#@ for tfm in ["net7.0", "net6.0", "netcoreapp3.1"]:
- package-ecosystem: "nuget"
directory: #@ "/eng/dependabot/" + tfm
@@ -32,5 +37,7 @@ updates:
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-major" ]
+ commit-message:
+ prefix: #@ commit_prefix
#@ end
#@ end
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index f935336482f..4b11693815c 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -14,11 +14,15 @@ updates:
- dependency-name: Microsoft.Extensions.*
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[main] '
- package-ecosystem: nuget
directory: /eng/dependabot/nuget.org
schedule:
interval: daily
target-branch: main
+ commit-message:
+ prefix: '[main] '
- package-ecosystem: nuget
directory: /eng/dependabot/net7.0
schedule:
@@ -28,6 +32,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[main] '
- package-ecosystem: nuget
directory: /eng/dependabot/net6.0
schedule:
@@ -37,6 +43,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[main] '
- package-ecosystem: nuget
directory: /eng/dependabot/netcoreapp3.1
schedule:
@@ -46,6 +54,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[main] '
- package-ecosystem: nuget
directory: /eng/dependabot
schedule:
@@ -55,11 +65,15 @@ updates:
- dependency-name: Microsoft.Extensions.*
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/8.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/nuget.org
schedule:
interval: daily
target-branch: release/8.x
+ commit-message:
+ prefix: '[release/8.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net7.0
schedule:
@@ -69,6 +83,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/8.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net6.0
schedule:
@@ -78,6 +94,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/8.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/netcoreapp3.1
schedule:
@@ -87,6 +105,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/8.x] '
- package-ecosystem: nuget
directory: /eng/dependabot
schedule:
@@ -96,11 +116,15 @@ updates:
- dependency-name: Microsoft.Extensions.*
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/nuget.org
schedule:
interval: daily
target-branch: release/7.x
+ commit-message:
+ prefix: '[release/7.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net7.0
schedule:
@@ -110,6 +134,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net6.0
schedule:
@@ -119,6 +145,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/netcoreapp3.1
schedule:
@@ -128,6 +156,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.x] '
- package-ecosystem: nuget
directory: /eng/dependabot
schedule:
@@ -137,11 +167,15 @@ updates:
- dependency-name: Microsoft.Extensions.*
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.0] '
- package-ecosystem: nuget
directory: /eng/dependabot/nuget.org
schedule:
interval: daily
target-branch: release/7.0
+ commit-message:
+ prefix: '[release/7.0] '
- package-ecosystem: nuget
directory: /eng/dependabot/net7.0
schedule:
@@ -151,6 +185,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.0] '
- package-ecosystem: nuget
directory: /eng/dependabot/net6.0
schedule:
@@ -160,6 +196,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.0] '
- package-ecosystem: nuget
directory: /eng/dependabot/netcoreapp3.1
schedule:
@@ -169,6 +207,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.0] '
- package-ecosystem: nuget
directory: /eng/dependabot
schedule:
@@ -178,11 +218,15 @@ updates:
- dependency-name: Microsoft.Extensions.*
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/6.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/nuget.org
schedule:
interval: daily
target-branch: release/6.x
+ commit-message:
+ prefix: '[release/6.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net7.0
schedule:
@@ -192,6 +236,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/6.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net6.0
schedule:
@@ -201,6 +247,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/6.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/netcoreapp3.1
schedule:
@@ -210,3 +258,5 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/6.x] '
From 8103e525e50d824a07800e4701957c04e44a5b46 Mon Sep 17 00:00:00 2001
From: Justin Anderson
Date: Tue, 7 Feb 2023 13:54:42 -0800
Subject: [PATCH 30/61] Use pool provider variables (#3581)
---
dotnet-monitor.yml | 3 ++-
eng/pipelines/dotnet-monitor-codeql.yml | 1 +
eng/pipelines/dotnet-monitor-release.yml | 5 +++--
eng/pipelines/jobs/build.yml | 8 ++++----
eng/pipelines/jobs/sign-binaries.yml | 2 +-
eng/pipelines/jobs/tpn.yml | 2 +-
eng/pipelines/stages/preparerelease.yml | 4 ++--
7 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/dotnet-monitor.yml b/dotnet-monitor.yml
index fa7ae5f06d1..b0d9331ac72 100644
--- a/dotnet-monitor.yml
+++ b/dotnet-monitor.yml
@@ -43,6 +43,7 @@ parameters:
default: false
variables:
+- template: /eng/common/templates/variables/pool-providers.yml
- name: _TeamName
value: DotNetCore
- name: _TPNFile
@@ -102,7 +103,7 @@ stages:
- Pack_Sign
publishUsingPipelines: true
pool:
- name: NetCore1ESPool-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2019
# These are the stages that perform validation of several SDL requirements and publish the bits required to the designated feed.
- template: /eng/common/templates/post-build/post-build.yml
diff --git a/eng/pipelines/dotnet-monitor-codeql.yml b/eng/pipelines/dotnet-monitor-codeql.yml
index 4677bcb60b5..71675e3b95e 100644
--- a/eng/pipelines/dotnet-monitor-codeql.yml
+++ b/eng/pipelines/dotnet-monitor-codeql.yml
@@ -1,4 +1,5 @@
variables:
+- template: /eng/common/templates/variables/pool-providers.yml
- name: _TeamName
value: DotNetCore
diff --git a/eng/pipelines/dotnet-monitor-release.yml b/eng/pipelines/dotnet-monitor-release.yml
index 7cf7dabe080..3111c12e3c5 100644
--- a/eng/pipelines/dotnet-monitor-release.yml
+++ b/eng/pipelines/dotnet-monitor-release.yml
@@ -10,6 +10,7 @@ parameters:
default: true
variables:
+- template: /eng/common/templates/variables/pool-providers.yml
- name: _TeamName
value: DotNetCore
readonly: true
@@ -30,7 +31,7 @@ stages:
- stage: Validation
pool:
- name: NetCore1ESPool-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2019
jobs:
@@ -94,7 +95,7 @@ stages:
- Validation
pool:
- name: NetCore1ESPool-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2019
jobs:
diff --git a/eng/pipelines/jobs/build.yml b/eng/pipelines/jobs/build.yml
index bbe191ad7d9..68332526719 100644
--- a/eng/pipelines/jobs/build.yml
+++ b/eng/pipelines/jobs/build.yml
@@ -47,12 +47,12 @@ jobs:
# Public Linux Build Pool
${{ if in(parameters.osGroup, 'Linux', 'Linux_Musl') }}:
${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: NetCore-Public
+ name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
# Official Build Linux Pool
${{ if ne(variables['System.TeamProject'], 'public') }}:
- name: NetCore1ESPool-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
# Build OSX Pool
@@ -62,11 +62,11 @@ jobs:
# Public Windows Build Pool
${{ if eq(parameters.osGroup, 'Windows') }}:
${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: NetCore-Public
+ name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2019.amd64.open
${{ if ne(variables['System.TeamProject'], 'public') }}:
- name: NetCore1ESPool-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2019.amd64
${{ if eq(parameters.osGroup, 'Linux') }}:
diff --git a/eng/pipelines/jobs/sign-binaries.yml b/eng/pipelines/jobs/sign-binaries.yml
index 6587fceff97..6f9d5f077f6 100644
--- a/eng/pipelines/jobs/sign-binaries.yml
+++ b/eng/pipelines/jobs/sign-binaries.yml
@@ -8,7 +8,7 @@ jobs:
name: Sign_Binaries
displayName: Sign Binaries
pool:
- name: NetCore1ESPool-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2019
enableMicrobuild: true
artifacts:
diff --git a/eng/pipelines/jobs/tpn.yml b/eng/pipelines/jobs/tpn.yml
index 2d365d2d3c9..576d7ff31d2 100644
--- a/eng/pipelines/jobs/tpn.yml
+++ b/eng/pipelines/jobs/tpn.yml
@@ -6,7 +6,7 @@ jobs:
disableComponentGovernance: true
enableSbom: false
pool:
- name: NetCore1ESPool-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2019
steps:
# Only restore the dotnet-monitor project so only packages we ship get included in the below CG scan
diff --git a/eng/pipelines/stages/preparerelease.yml b/eng/pipelines/stages/preparerelease.yml
index 88e45122192..bf8284a010a 100644
--- a/eng/pipelines/stages/preparerelease.yml
+++ b/eng/pipelines/stages/preparerelease.yml
@@ -14,10 +14,10 @@ stages:
displayName: Prepare release with Darc
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: NetCore-Public
+ name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals 1es-windows-2019-open
${{ if ne(variables['System.TeamProject'], 'public') }}:
- name: NetCore1ESPool-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2019
variables:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/test/release/'))) }}:
From e110323eb45e0762880c7a9f769679b50d892f89 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Wed, 8 Feb 2023 13:41:25 +0000
Subject: [PATCH 31/61] Update dependencies from
https://github.com/dotnet/diagnostics build 20230207.1 (#3600)
[main] Update dependencies from dotnet/diagnostics
---
eng/Version.Details.xml | 8 ++++----
eng/Versions.props | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 67c8575fbc8..ef35efb8f3c 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -4,13 +4,13 @@
https://github.com/dotnet/aspnetcore
65493f5ed529a47937066a84d43f913796bbcf30
-
+
https://github.com/dotnet/diagnostics
- 091c4839005957be5663a11dff6810ba8a46b095
+ 1efe5e57ea7bd9d027ad7320e2b11fa4c057b0f6
-
+
https://github.com/dotnet/diagnostics
- 091c4839005957be5663a11dff6810ba8a46b095
+ 1efe5e57ea7bd9d027ad7320e2b11fa4c057b0f6
https://github.com/dotnet/command-line-api
diff --git a/eng/Versions.props b/eng/Versions.props
index bc284f9f2e2..57bb1bbc745 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -67,8 +67,8 @@
2.0.0-beta4.23103.1
- 7.0.0-preview.23106.1
- 7.0.0-preview.23106.1
+ 7.0.0-preview.23107.1
+ 7.0.0-preview.23107.1
8.0.0-preview1.23104.1
From 5749cf5ab88515bb7d2d4f6d4f617ef2bcda41ce Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Wed, 8 Feb 2023 13:41:56 +0000
Subject: [PATCH 32/61] Update dependencies from
https://github.com/dotnet/arcade build 20230207.1 (#3601)
[main] Update dependencies from dotnet/arcade
---
eng/Version.Details.xml | 16 ++++++++--------
eng/Versions.props | 6 +++---
global.json | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index ef35efb8f3c..2d032c8de09 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -22,25 +22,25 @@
https://github.com/dotnet/roslyn-analyzers
1dc431ec828e9cc816fc69f89ad9b8286e74d707
-
+
https://github.com/dotnet/arcade
- 02980a654d20995c38eca6ceabf729c4c13412c4
+ b31c4466a49800c2f019690e81182c7ffd584dda
-
+
https://github.com/dotnet/arcade
- 02980a654d20995c38eca6ceabf729c4c13412c4
+ b31c4466a49800c2f019690e81182c7ffd584dda
-
+
https://github.com/dotnet/arcade
- 02980a654d20995c38eca6ceabf729c4c13412c4
+ b31c4466a49800c2f019690e81182c7ffd584dda
https://github.com/dotnet/installer
48873c2344613a8d1fc02bd27c8aecf0dd0b2654
-
+
https://github.com/dotnet/arcade
- 02980a654d20995c38eca6ceabf729c4c13412c4
+ b31c4466a49800c2f019690e81182c7ffd584dda
https://github.com/dotnet/symstore
diff --git a/eng/Versions.props b/eng/Versions.props
index 57bb1bbc745..1c8cd56cd32 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -58,9 +58,9 @@
-->
- 8.0.0-beta.23106.4
- 8.0.0-beta.23106.4
- 8.0.0-beta.23106.4
+ 8.0.0-beta.23107.1
+ 8.0.0-beta.23107.1
+ 8.0.0-beta.23107.1
8.0.0-alpha.1.23079.1
8.0.0-alpha.1.23079.1
diff --git a/global.json b/global.json
index b11e2a43e4c..7521d04a0c7 100644
--- a/global.json
+++ b/global.json
@@ -26,6 +26,6 @@
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
- "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23106.4"
+ "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23107.1"
}
}
From f2c3c8ea30ead57aff8dd07c0bd4e89d3d5ae597 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Wed, 8 Feb 2023 14:39:39 +0000
Subject: [PATCH 33/61] Update dependencies from
https://github.com/dotnet/installer build 20230208.2 (#3602)
[main] Update dependencies from dotnet/installer
- Coherency Updates:
- Microsoft.AspNetCore.App.Runtime.win-x64: from 8.0.0-alpha.1.23079.1 to 8.0.0-preview.2.23107.2 (parent: Microsoft.Dotnet.Sdk.Internal)
- Microsoft.NETCore.App.Runtime.win-x64: from 8.0.0-alpha.1.23080.2 to 8.0.0-preview.2.23107.1 (parent: Microsoft.Dotnet.Sdk.Internal)
- VS.Redist.Common.AspNetCore.SharedFramework.x64.8.0: from 8.0.0-alpha.1.23079.1 to 8.0.0-preview.2.23107.2 (parent: Microsoft.Dotnet.Sdk.Internal)
- VS.Redist.Common.NetCore.SharedFramework.x64.8.0: from 8.0.0-alpha.1.23080.2 to 8.0.0-preview.2.23107.1 (parent: Microsoft.Dotnet.Sdk.Internal)
---
eng/Version.Details.xml | 20 ++++++++++----------
eng/Versions.props | 8 ++++----
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 2d032c8de09..a8fdc0431b8 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,8 +1,8 @@
-
+
https://github.com/dotnet/aspnetcore
- 65493f5ed529a47937066a84d43f913796bbcf30
+ cec7fbf64e63af88a9165cbbf14aa4ab6f8cc76d
https://github.com/dotnet/diagnostics
@@ -34,9 +34,9 @@
https://github.com/dotnet/arcade
b31c4466a49800c2f019690e81182c7ffd584dda
-
+
https://github.com/dotnet/installer
- 48873c2344613a8d1fc02bd27c8aecf0dd0b2654
+ 5a8405088cacd536db395d6c10c2cbce18917662
https://github.com/dotnet/arcade
@@ -46,17 +46,17 @@
https://github.com/dotnet/symstore
c6ecba72647d4277bfe0f85f5ed0405fdfa3a445
-
+
https://github.com/dotnet/runtime
- 9529803ae29c2804880c6bd8ca710b8c037cb498
+ e71a4fb10d7ea6b502dd5efe7a8fcefa2b9c1550
-
+
https://github.com/dotnet/aspnetcore
- 65493f5ed529a47937066a84d43f913796bbcf30
+ cec7fbf64e63af88a9165cbbf14aa4ab6f8cc76d
-
+
https://github.com/dotnet/runtime
- 9529803ae29c2804880c6bd8ca710b8c037cb498
+ e71a4fb10d7ea6b502dd5efe7a8fcefa2b9c1550
diff --git a/eng/Versions.props b/eng/Versions.props
index 1c8cd56cd32..1c7cc33bd56 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -62,8 +62,8 @@
8.0.0-beta.23107.1
8.0.0-beta.23107.1
- 8.0.0-alpha.1.23079.1
- 8.0.0-alpha.1.23079.1
+ 8.0.0-preview.2.23107.2
+ 8.0.0-preview.2.23107.2
2.0.0-beta4.23103.1
@@ -72,8 +72,8 @@
8.0.0-preview1.23104.1
- 8.0.0-alpha.1.23080.2
- 8.0.0-alpha.1.23080.2
+ 8.0.0-preview.2.23107.1
+ 8.0.0-preview.2.23107.1
1.0.410601
From 241cd519b14ad1e777555ad679b5b07e7cf7e526 Mon Sep 17 00:00:00 2001
From: Joe Schmitt
Date: Wed, 8 Feb 2023 09:13:20 -0800
Subject: [PATCH 34/61] Avoid duplicate entries from backports when generating
release notes (#3598)
---
.github/actions/generate-release-notes/index.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/.github/actions/generate-release-notes/index.js b/.github/actions/generate-release-notes/index.js
index 8eb4b7f860d..a48322fb995 100644
--- a/.github/actions/generate-release-notes/index.js
+++ b/.github/actions/generate-release-notes/index.js
@@ -79,6 +79,7 @@ async function getPrsToMention(octokit, branch, repoOwner, repoName, minMergeDat
// Patch the origin PR information to have the backport PR number and URL
// so that the release notes links to the backport, but grabs the rest of
// the information from the origin PR.
+ originPr.originNumber = originPr.number;
originPr.number = pr.number;
originPr.html_url = pr.html_url;
@@ -99,6 +100,9 @@ async function getPrsToMention(octokit, branch, repoOwner, repoName, minMergeDat
commitHashesInRelease.add(commit.sha);
}
+ // Keep track of all of the prs we mention to avoid duplicates from resolved backports.
+ let mentionedOriginNumbers = new Set();
+
let prs = [];
for (const pr of candidatePrs) {
// Get a fully-qualified version of the pr that has all of the relevant information,
@@ -109,8 +113,10 @@ async function getPrsToMention(octokit, branch, repoOwner, repoName, minMergeDat
pull_number: pr.number
}))?.data;
- if (commitHashesInRelease.has(fqPr.merge_commit_sha)) {
- console.log(`Including: #${fqPr.number}`);
+ let originNumber = pr.originNumber ?? pr.number;
+ if (commitHashesInRelease.has(fqPr.merge_commit_sha) && !mentionedOriginNumbers.has(originNumber)) {
+ console.log(`Including: #${fqPr.number} -- origin:#${originNumber}`);
+ mentionedOriginNumbers.add(originNumber);
prs.push(pr);
} else {
console.log(`Skipping: #${fqPr.number} --- ${fqPr.merge_commit_sha}`);
From cec707bbe84bb91f213dda498270f8841f83e925 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Thu, 9 Feb 2023 13:46:09 +0000
Subject: [PATCH 35/61] Update dependencies from
https://github.com/dotnet/diagnostics build 20230208.1 (#3613)
[main] Update dependencies from dotnet/diagnostics
---
eng/Version.Details.xml | 8 ++++----
eng/Versions.props | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index a8fdc0431b8..c1af8b31d97 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -4,13 +4,13 @@
https://github.com/dotnet/aspnetcore
cec7fbf64e63af88a9165cbbf14aa4ab6f8cc76d
-
+
https://github.com/dotnet/diagnostics
- 1efe5e57ea7bd9d027ad7320e2b11fa4c057b0f6
+ d41911124f93b7a91dd289d2d00e38ad472ce211
-
+
https://github.com/dotnet/diagnostics
- 1efe5e57ea7bd9d027ad7320e2b11fa4c057b0f6
+ d41911124f93b7a91dd289d2d00e38ad472ce211
https://github.com/dotnet/command-line-api
diff --git a/eng/Versions.props b/eng/Versions.props
index 1c7cc33bd56..66b7b5c98e5 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -67,8 +67,8 @@
2.0.0-beta4.23103.1
- 7.0.0-preview.23107.1
- 7.0.0-preview.23107.1
+ 7.0.0-preview.23108.1
+ 7.0.0-preview.23108.1
8.0.0-preview1.23104.1
From 9bea7208f48c41b6b291810aad43b661a0d51f36 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Thu, 9 Feb 2023 14:20:29 +0000
Subject: [PATCH 36/61] Update dependencies from
https://github.com/dotnet/roslyn-analyzers build 20230208.2 (#3615)
[main] Update dependencies from dotnet/roslyn-analyzers
---
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index c1af8b31d97..5822a131e3d 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -18,9 +18,9 @@
-
+
https://github.com/dotnet/roslyn-analyzers
- 1dc431ec828e9cc816fc69f89ad9b8286e74d707
+ 63367165996d9dedbecf6677e3315a470a2f557c
https://github.com/dotnet/arcade
diff --git a/eng/Versions.props b/eng/Versions.props
index 66b7b5c98e5..65cdaf8a629 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -70,7 +70,7 @@
7.0.0-preview.23108.1
7.0.0-preview.23108.1
- 8.0.0-preview1.23104.1
+ 8.0.0-preview1.23108.2
8.0.0-preview.2.23107.1
8.0.0-preview.2.23107.1
From f4efa541c97e3f3fc78d824e017d843175b70a7e Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Thu, 9 Feb 2023 14:41:09 +0000
Subject: [PATCH 37/61] Update dependencies from
https://github.com/dotnet/installer build 20230209.1 (#3617)
[main] Update dependencies from dotnet/installer
---
eng/Version.Details.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 5822a131e3d..f55461b2e35 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -34,9 +34,9 @@
https://github.com/dotnet/arcade
b31c4466a49800c2f019690e81182c7ffd584dda
-
+
https://github.com/dotnet/installer
- 5a8405088cacd536db395d6c10c2cbce18917662
+ bda2c1cc61c1aee5d450ae9f6e74479f453e7b9e
https://github.com/dotnet/arcade
From 016f73b22bf35174556fa26b87467e61329754f4 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Thu, 9 Feb 2023 08:48:26 -0800
Subject: [PATCH 38/61] Update dependencies from
https://github.com/dotnet/arcade build 20230208.1 (#3614)
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitExtensions
From Version 7.0.0-beta.23073.6 -> To Version 7.0.0-beta.23108.1
Co-authored-by: dotnet-maestro[bot]
---
eng/Version.Details.xml | 16 ++---
eng/Versions.props | 6 +-
eng/common/generate-locproject.ps1 | 48 ++++++++++++++-
eng/common/loc/P22DotNetHtmlLocalization.lss | Bin 0 -> 3810 bytes
eng/common/templates/job/execute-sdl.yml | 3 +-
eng/common/templates/job/onelocbuild.yml | 43 +++++++------
.../templates/job/publish-build-assets.yml | 14 ++++-
eng/common/templates/job/source-build.yml | 7 ++-
.../templates/job/source-index-stage1.yml | 5 +-
eng/common/templates/jobs/jobs.yml | 9 ---
.../templates/post-build/post-build.yml | 12 ++--
.../templates/variables/pool-providers.yml | 57 ++++++++++++++++++
global.json | 2 +-
13 files changed, 166 insertions(+), 56 deletions(-)
create mode 100644 eng/common/loc/P22DotNetHtmlLocalization.lss
create mode 100644 eng/common/templates/variables/pool-providers.yml
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 1ec9ded800d..56202f97f57 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -22,21 +22,21 @@
https://github.com/dotnet/roslyn-analyzers
31373ce8529c3d2f6b91e61585872160b0d7d7cd
-
+
https://github.com/dotnet/arcade
- 5f8519337c864af63b8692754ca0fa971bfc55d4
+ 5eac3ace1b09862bd7421ba55795cc2a9c6a57d5
-
+
https://github.com/dotnet/arcade
- 5f8519337c864af63b8692754ca0fa971bfc55d4
+ 5eac3ace1b09862bd7421ba55795cc2a9c6a57d5
-
+
https://github.com/dotnet/arcade
- 5f8519337c864af63b8692754ca0fa971bfc55d4
+ 5eac3ace1b09862bd7421ba55795cc2a9c6a57d5
-
+
https://github.com/dotnet/arcade
- 5f8519337c864af63b8692754ca0fa971bfc55d4
+ 5eac3ace1b09862bd7421ba55795cc2a9c6a57d5
https://github.com/dotnet/symstore
diff --git a/eng/Versions.props b/eng/Versions.props
index 1f8d587b081..a5d5718f428 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -57,9 +57,9 @@
-->
- 7.0.0-beta.23073.6
- 7.0.0-beta.23073.6
- 7.0.0-beta.23073.6
+ 7.0.0-beta.23108.1
+ 7.0.0-beta.23108.1
+ 7.0.0-beta.23108.1
7.0.0
7.0.0-rtm.22513.7
diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1
index bab18543d6c..bcb579e37a9 100644
--- a/eng/common/generate-locproject.ps1
+++ b/eng/common/generate-locproject.ps1
@@ -34,6 +34,25 @@ $jsonTemplateFiles | ForEach-Object {
$jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern
$wxlFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\.+\.wxl" -And -Not( $_.Directory.Name -Match "\d{4}" ) } # localized files live in four digit lang ID directories; this excludes them
+if (-not $wxlFiles) {
+ $wxlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\1033\\.+\.wxl" } # pick up en files (1033 = en) specifically so we can copy them to use as the neutral xlf files
+ if ($wxlEnFiles) {
+ $wxlFiles = @()
+ $wxlEnFiles | ForEach-Object {
+ $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)"
+ $wxlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
+ }
+ }
+}
+
+$macosHtmlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\.lproj\\.+\.html" } # add installer HTML files
+$macosHtmlFiles = @()
+if ($macosHtmlEnFiles) {
+ $macosHtmlEnFiles | ForEach-Object {
+ $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)"
+ $macosHtmlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
+ }
+}
$xlfFiles = @()
@@ -91,6 +110,7 @@ $locJson = @{
)
},
@{
+ LanguageSet = $LanguageSet
CloneLanguageSet = "WiX_CloneLanguages"
LssFiles = @( "wxl_loc.lss" )
LocItems = @(
@@ -98,8 +118,7 @@ $locJson = @{
$outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\"
$continue = $true
foreach ($exclusion in $exclusions.Exclusions) {
- if ($_.FullName.Contains($exclusion))
- {
+ if ($_.FullName.Contains($exclusion)) {
$continue = $false
}
}
@@ -110,7 +129,30 @@ $locJson = @{
SourceFile = $sourceFile
CopyOption = "LangIDOnPath"
OutputPath = $outputPath
- Languages = "cs-CZ;de-DE;es-ES;fr-FR;it-IT;ja-JP;ko-KR;pl-PL;pt-BR;ru-RU;tr-TR;zh-CN;zh-TW"
+ }
+ }
+ }
+ )
+ },
+ @{
+ LanguageSet = $LanguageSet
+ CloneLanguageSet = "VS_macOS_CloneLanguages"
+ LssFiles = @( ".\eng\common\loc\P22DotNetHtmlLocalization.lss" )
+ LocItems = @(
+ $macosHtmlFiles | ForEach-Object {
+ $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\"
+ $continue = $true
+ foreach ($exclusion in $exclusions.Exclusions) {
+ if ($_.FullName.Contains($exclusion)) {
+ $continue = $false
+ }
+ }
+ $sourceFile = ($_.FullName | Resolve-Path -Relative)
+ if ($continue) {
+ return @{
+ SourceFile = $sourceFile
+ CopyOption = "LangIDOnPath"
+ OutputPath = $outputPath
}
}
}
diff --git a/eng/common/loc/P22DotNetHtmlLocalization.lss b/eng/common/loc/P22DotNetHtmlLocalization.lss
new file mode 100644
index 0000000000000000000000000000000000000000..6661fed566e49b0c206665bc21f135e06c9b89c4
GIT binary patch
literal 3810
zcmd^CT~8BH5S?ce|HG9Bo&v?0;P_m6l=
znU-wb=}VLT7UH{>{5H;0M4iLmRE8QeBRr|>&k=uV*L;heKY+dq>B$0^=0I}|x`)s{
zht4t9zaiEh5Fe>E-;zVT;c4G?v;9N0G=rWwo~*(Cs`OS6ZL`HL;vsL0J@I%$+0YvE
zx{9ukK|FtFx1PlPD5M;6ZM>f;1BhCf?`8y6QH*?RT9T>XwF
z#~m_N+i^UKE^j{e;KdNW`kH9Rbj{G8tDY}mafCgG+m3H`I@_PhrDmcIzxD&IX@s083kV|lLUE^0(h6wWRPN0QN1n^PU5eX8r6OZ*s^g)tt77#SZCB}znxye#U$Dtinr6lnVu
z!LzA{A}0~no7p$thFGJAnI}oSW||9H=Bz}I7kD#2MLg7WfrlE5o9sQjePc>qmv+6iQCmdp(y}(Vr
literal 0
HcmV?d00001
diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml
index aaeb83b4dcb..7c164ac02f4 100644
--- a/eng/common/templates/job/execute-sdl.yml
+++ b/eng/common/templates/job/execute-sdl.yml
@@ -46,6 +46,7 @@ jobs:
- template: /eng/common/templates/variables/sdl-variables.yml
- name: GuardianVersion
value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }}
+ - template: /eng/common/templates/variables/pool-providers.yml
pool:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
@@ -53,7 +54,7 @@ jobs:
demands: Cmd
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
- name: NetCore1ESPool-Svc-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2019.amd64
steps:
- checkout: self
diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml
index 6b8fc997080..60ab00c4de3 100644
--- a/eng/common/templates/job/onelocbuild.yml
+++ b/eng/common/templates/job/onelocbuild.yml
@@ -14,6 +14,7 @@ parameters:
ReusePr: true
UseLfLineEndings: true
UseCheckedInLocProjectJson: false
+ SkipLocProjectJsonGeneration: false
LanguageSet: VS_Main_Languages
LclSource: lclFilesInRepo
LclPackageId: ''
@@ -22,13 +23,25 @@ parameters:
MirrorRepo: ''
MirrorBranch: main
condition: ''
+ JobNameSuffix: ''
jobs:
-- job: OneLocBuild
+- job: OneLocBuild${{ parameters.JobNameSuffix }}
dependsOn: ${{ parameters.dependsOn }}
- displayName: OneLocBuild
+ displayName: OneLocBuild${{ parameters.JobNameSuffix }}
+
+ variables:
+ - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat
+ - name: _GenerateLocProjectArguments
+ value: -SourcesDirectory ${{ parameters.SourcesDirectory }}
+ -LanguageSet "${{ parameters.LanguageSet }}"
+ -CreateNeutralXlfs
+ - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}:
+ - name: _GenerateLocProjectArguments
+ value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson
+ - template: /eng/common/templates/variables/pool-providers.yml
${{ if ne(parameters.pool, '') }}:
pool: ${{ parameters.pool }}
@@ -40,27 +53,17 @@ jobs:
demands: Cmd
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
- name: NetCore1ESPool-Svc-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2019.amd64
- variables:
- - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat
- - name: _GenerateLocProjectArguments
- value: -SourcesDirectory ${{ parameters.SourcesDirectory }}
- -LanguageSet "${{ parameters.LanguageSet }}"
- -CreateNeutralXlfs
- - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}:
- - name: _GenerateLocProjectArguments
- value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson
-
-
steps:
- - task: Powershell@2
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1
- arguments: $(_GenerateLocProjectArguments)
- displayName: Generate LocProject.json
- condition: ${{ parameters.condition }}
+ - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}:
+ - task: Powershell@2
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1
+ arguments: $(_GenerateLocProjectArguments)
+ displayName: Generate LocProject.json
+ condition: ${{ parameters.condition }}
- task: OneLocBuild@2
displayName: OneLocBuild
diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml
index 1cbb6a0c560..c5fedd7f70c 100644
--- a/eng/common/templates/job/publish-build-assets.yml
+++ b/eng/common/templates/job/publish-build-assets.yml
@@ -34,15 +34,15 @@ jobs:
- job: Asset_Registry_Publish
dependsOn: ${{ parameters.dependsOn }}
+ timeoutInMinutes: 150
${{ if eq(parameters.publishAssetsImmediately, 'true') }}:
displayName: Publish Assets
${{ else }}:
displayName: Publish to Build Asset Registry
- pool: ${{ parameters.pool }}
-
variables:
+ - template: /eng/common/templates/variables/pool-providers.yml
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: Publish-Build-Assets
- group: AzureDevOps-Artifact-Feeds-Pats
@@ -51,6 +51,16 @@ jobs:
- ${{ if eq(parameters.publishAssetsImmediately, 'true') }}:
- template: /eng/common/templates/post-build/common-variables.yml
+ pool:
+ # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
+ ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
+ name: VSEngSS-MicroBuild2022-1ES
+ demands: Cmd
+ # If it's not devdiv, it's dnceng
+ ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
+ name: $(DncEngInternalBuildPool)
+ demands: ImageOverride -equals windows.vs2019.amd64
+
steps:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: DownloadBuildArtifacts@0
diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml
index b6137f44ada..8a3deef2b72 100644
--- a/eng/common/templates/job/source-build.yml
+++ b/eng/common/templates/job/source-build.yml
@@ -44,13 +44,16 @@ jobs:
${{ if eq(parameters.platform.pool, '') }}:
# The default VM host AzDO pool. This should be capable of running Docker containers: almost all
# source-build builds run in Docker, including the default managed platform.
+ # /eng/common/templates/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: NetCore-Svc-Public
+ name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')]
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
+
${{ if eq(variables['System.TeamProject'], 'internal') }}:
- name: NetCore1ESPool-Svc-Internal
+ name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')]
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
+
${{ if ne(parameters.platform.pool, '') }}:
pool: ${{ parameters.platform.pool }}
diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml
index 59a42c338ab..09c506d1185 100644
--- a/eng/common/templates/job/source-index-stage1.yml
+++ b/eng/common/templates/job/source-index-stage1.yml
@@ -22,16 +22,17 @@ jobs:
value: ${{ parameters.binlogPath }}
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: source-dot-net stage1 variables
+ - template: /eng/common/templates/variables/pool-providers.yml
${{ if ne(parameters.pool, '') }}:
pool: ${{ parameters.pool }}
${{ if eq(parameters.pool, '') }}:
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: NetCore-Svc-Public
+ name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2019.amd64.open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
- name: NetCore1ESPool-Svc-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2019.amd64
steps:
diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml
index 297e7946b0b..289bb2396ce 100644
--- a/eng/common/templates/jobs/jobs.yml
+++ b/eng/common/templates/jobs/jobs.yml
@@ -88,15 +88,6 @@ jobs:
- ${{ job.job }}
- ${{ if eq(parameters.enableSourceBuild, true) }}:
- Source_Build_Complete
- pool:
- # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
- ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
- name: VSEngSS-MicroBuild2022-1ES
- demands: Cmd
- # If it's not devdiv, it's dnceng
- ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
- name: NetCore1ESPool-Svc-Internal
- demands: ImageOverride -equals windows.vs2019.amd64
runAsPublic: ${{ parameters.runAsPublic }}
publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml
index 957375c1c1a..c051f1b65e9 100644
--- a/eng/common/templates/post-build/post-build.yml
+++ b/eng/common/templates/post-build/post-build.yml
@@ -95,6 +95,7 @@ stages:
displayName: Validate Build Assets
variables:
- template: common-variables.yml
+ - template: /eng/common/templates/variables/pool-providers.yml
jobs:
- job:
displayName: NuGet Validation
@@ -106,7 +107,7 @@ stages:
demands: Cmd
# If it's not devdiv, it's dnceng
${{ else }}:
- name: NetCore1ESPool-Svc-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2019.amd64
steps:
@@ -143,7 +144,7 @@ stages:
demands: Cmd
# If it's not devdiv, it's dnceng
${{ else }}:
- name: NetCore1ESPool-Svc-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2019.amd64
steps:
- template: setup-maestro-vars.yml
@@ -203,7 +204,7 @@ stages:
demands: Cmd
# If it's not devdiv, it's dnceng
${{ else }}:
- name: NetCore1ESPool-Svc-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2019.amd64
steps:
- template: setup-maestro-vars.yml
@@ -251,6 +252,7 @@ stages:
displayName: Publish using Darc
variables:
- template: common-variables.yml
+ - template: /eng/common/templates/variables/pool-providers.yml
jobs:
- job:
displayName: Publish Using Darc
@@ -262,7 +264,7 @@ stages:
demands: Cmd
# If it's not devdiv, it's dnceng
${{ else }}:
- name: NetCore1ESPool-Svc-Internal
+ name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2019.amd64
steps:
- template: setup-maestro-vars.yml
@@ -282,4 +284,4 @@ stages:
-MaestroToken '$(MaestroApiAccessToken)'
-WaitPublishingFinish true
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
- -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
\ No newline at end of file
+ -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
diff --git a/eng/common/templates/variables/pool-providers.yml b/eng/common/templates/variables/pool-providers.yml
new file mode 100644
index 00000000000..99c80212bac
--- /dev/null
+++ b/eng/common/templates/variables/pool-providers.yml
@@ -0,0 +1,57 @@
+# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool,
+# otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches.
+
+# Motivation:
+# Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS
+# (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing
+# (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS)
+# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services
+# team needs to move resources around and create new and potentially differently-named pools. Using this template
+# file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming.
+
+# How to use:
+# This yaml assumes your shipped product branches use the naming convention "release/..." (which many do).
+# If we find alternate naming conventions in broad usage these can be added to the condition below.
+#
+# First, import the template in an arcade-ified repo to pick up the variables, e.g.:
+#
+# variables:
+# - template: /eng/common/templates/variables/pool-providers.yml
+#
+# ... then anywhere specifying the pool provider use the runtime variables,
+# $(DncEngInternalBuildPool) and $ (DncEngPublicBuildPool), e.g.:
+#
+# pool:
+# name: $(DncEngInternalBuildPool)
+# demands: ImageOverride -equals windows.vs2019.amd64
+
+variables:
+ # Coalesce the target and source branches so we know when a PR targets a release branch
+ # If these variables are somehow missing, fall back to main (tends to have more capacity)
+
+ # Any new -Svc alternative pools should have variables added here to allow for splitting work
+ - name: DncEngPublicBuildPool
+ value: $[
+ replace(
+ replace(
+ eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'),
+ True,
+ 'NetCore-Svc-Public'
+ ),
+ False,
+ 'NetCore-Public'
+ )
+ ]
+
+ - name: DncEngInternalBuildPool
+ value: $[
+ replace(
+ replace(
+ eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'),
+ True,
+ 'NetCore1ESPool-Svc-Internal'
+ ),
+ False,
+ 'NetCore1ESPool-Internal'
+ )
+ ]
\ No newline at end of file
diff --git a/global.json b/global.json
index 2937513edbc..ee3798d617c 100644
--- a/global.json
+++ b/global.json
@@ -22,6 +22,6 @@
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
- "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.23073.6"
+ "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.23108.1"
}
}
From fa7281ef001078590f4cdd37b7c0b1ee3c995705 Mon Sep 17 00:00:00 2001
From: Joe Schmitt
Date: Thu, 9 Feb 2023 09:52:59 -0800
Subject: [PATCH 39/61] Fix release notes entry regex (#3623)
---
.github/actions/generate-release-notes/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/actions/generate-release-notes/index.js b/.github/actions/generate-release-notes/index.js
index a48322fb995..29f237e3c68 100644
--- a/.github/actions/generate-release-notes/index.js
+++ b/.github/actions/generate-release-notes/index.js
@@ -149,7 +149,7 @@ async function generateChangelog(octokit, branch, repoOwner, repoName, minMergeD
entry += ` ${significantLabels[index].moniker}`;
}
- const changelogRegex=/^###### Release Notes Entry\r?\n(?.*)/m
+ const changelogRegex=/^###### Release Notes Entry\s+(?.*)/m
const userDefinedChangelogEntry = pr.body?.match(changelogRegex)?.groups?.releaseNotesEntry?.trim();
if (userDefinedChangelogEntry !== undefined && userDefinedChangelogEntry.length !== 0) {
entry += ` ${userDefinedChangelogEntry}`
From 4b19f91bf5a1ebaf5eaacb043bab47664cce3400 Mon Sep 17 00:00:00 2001
From: kkeirstead <85592574+kkeirstead@users.noreply.github.com>
Date: Thu, 9 Feb 2023 14:11:21 -0800
Subject: [PATCH 40/61] Docs Updates (#3608)
---
documentation/api/definitions.md | 10 ++++
documentation/api/livemetrics-custom.md | 29 ++++++++--
.../collectionrules/collectionruleexamples.md | 2 +-
.../configuration/metrics-configuration.md | 58 ++++++++++++++++++-
4 files changed, 91 insertions(+), 8 deletions(-)
diff --git a/documentation/api/definitions.md b/documentation/api/definitions.md
index 8e24027de40..c5d35b743b3 100644
--- a/documentation/api/definitions.md
+++ b/documentation/api/definitions.md
@@ -244,6 +244,16 @@ Object describing a metric from the application.
| `counterType` | string | The type of metric. This is typically `Rate` or `Metric`. |
| `value` | double | The value of the metric. |
+## MetricType (8.0+)
+
+Enumeration that describes the type of metrics a provider consumes.
+
+| Name |
+|---|
+| `EventCounter` |
+| `Meter` |
+| `All` |
+
## OperationError
| Name | Type | Description |
diff --git a/documentation/api/livemetrics-custom.md b/documentation/api/livemetrics-custom.md
index ecba82ccf90..f2a5705be2c 100644
--- a/documentation/api/livemetrics-custom.md
+++ b/documentation/api/livemetrics-custom.md
@@ -115,7 +115,7 @@ Location: localhost:52323/operations/67f07e40-5cca-4709-9062-26302c484f18
}
```
-### System.Diagnostics.Metrics
+### System.Diagnostics.Metrics (8.0+)
#### Sample Request
@@ -151,11 +151,28 @@ Location: localhost:52323/operations/67f07e40-5cca-4709-9062-26302c484f18
"displayName": "myHistogram",
"unit": null,
"counterType": "Metric",
- "value": {
- "0.5": 2892,
- "0.95": 4848,
- "0.99": 4984
- }
+ "tags": "Percentile=50",
+ "value": 2292
+}
+{
+ "timestamp": "2021-08-31T16:58:39.7514031+00:00",
+ "provider": "CustomProvider",
+ "name": "myHistogram",
+ "displayName": "myHistogram",
+ "unit": null,
+ "counterType": "Metric",
+ "tags": "Percentile=95",
+ "value": 4616
+}
+{
+ "timestamp": "2021-08-31T16:58:39.7514031+00:00",
+ "provider": "CustomProvider",
+ "name": "myHistogram",
+ "displayName": "myHistogram",
+ "unit": null,
+ "counterType": "Metric",
+ "tags": "Percentile=99",
+ "value": 4960
}
```
diff --git a/documentation/collectionrules/collectionruleexamples.md b/documentation/collectionrules/collectionruleexamples.md
index 0bb3b90ed19..09108ea0b82 100644
--- a/documentation/collectionrules/collectionruleexamples.md
+++ b/documentation/collectionrules/collectionruleexamples.md
@@ -394,7 +394,7 @@ This rule, named "BadResponseStatus", will trigger when 5 4xx status codes are e
### Explanation
-This rule, named "HighRequestCount", will trigger when a process with a `ProcessId` of 12345 has 10 requests within a 1 minute sliding window. If the rule is triggered, information level logs will be collected for one minute and egressed to the specified `Egress` provider (in this case, `artifacts` has been configured to save the logs to the local filesystem). There is a limit that states that this may only be triggered for one hour (to prevent an excessive number of logs from being collected), and there is a default `ActionCount` limit stating that this rule may only be triggered 5 times.
+This rule, named "HighRequestCount", will trigger when a process with a `ProcessId` of 12345 has 10 requests within a 1 minute sliding window. If the rule is triggered, error level logs will be collected for one minute and egressed to the specified `Egress` provider (in this case, `artifacts` has been configured to save the logs to the local filesystem). There is a limit that states that this may only be triggered for one hour (to prevent an excessive number of logs from being collected), and there is a default `ActionCount` limit stating that this rule may only be triggered 5 times.
## Collect Trace - Too Many Long Requests (`AspNetRequestDuration` Trigger)
diff --git a/documentation/configuration/metrics-configuration.md b/documentation/configuration/metrics-configuration.md
index 8c81287c060..3b3cb42cd5a 100644
--- a/documentation/configuration/metrics-configuration.md
+++ b/documentation/configuration/metrics-configuration.md
@@ -166,7 +166,63 @@ Additional metrics providers and counter names to return from this route can be
When `CounterNames` are not specified, all the counters associated with the `ProviderName` are collected.
-[7.1+] Custom metrics support labels for metadata. Metadata cannot include commas (`,`); the inclusion of a comma in metadata will result in all metadata being removed from the custom metric.
+[8.0+] Custom metrics support labels for metadata. Metadata cannot include commas (`,`); the inclusion of a comma in metadata will result in all metadata being removed from the custom metric.
+
+[8.0+] `System.Diagnostics.Metrics` is now supported in a limited capacity for custom metrics. At this time, there are several known limitations:
+ * `System.Diagnostics.Metrics` cannot have multiple sessions collecting metrics concurrently (i.e. `/metrics` and `/livemetrics` cannot both be looking for `System.Diagnostics.Metrics` at the same time).
+ * There is currently no trigger for `System.Diagnostics.Metrics` for collection rule scenarios.
+ * `dotnet monitor` may fail to collect `System.Diagnostics.Metrics` if it begins collecting the metric before the target app creates the Meter ([note that this is fixed for .NET 8+ apps](https://github.com/dotnet/runtime/pull/76965)).
+
+### Set [`MetricType`](../api/definitions.md#metrictype-80)
+
+By default, `dotnet monitor` is unable to determine whether a custom provider is an `EventCounter` or `Meter`, and will attempt to collect both kinds of metrics for the specified provider. To explicitly specify whether a custom provider is an `EventCounter` or `Meter`, set the appropriate `MetricType`:
+
+
+ JSON
+
+ ```json
+ {
+ "Metrics": {
+ "Providers": [
+ {
+ "ProviderName": "MyCustomEventCounterProvider",
+ "MetricType": "EventCounter"
+ },
+ {
+ "ProviderName": "MyCustomSDMProvider",
+ "MetricType": "Meter"
+ }
+ ]
+ }
+ }
+ ```
+
+
+
+ Kubernetes ConfigMap
+
+ ```yaml
+ Metrics__Providers__0__ProviderName: "MyCustomEventCounterProvider"
+ Metrics__Providers__0__MetricType: "EventCounter"
+ Metrics__Providers__1__ProviderName: "MyCustomSDMProvider"
+ Metrics__Providers__1__MetricType: "Meter"
+ ```
+
+
+
+ Kubernetes Environment Variables
+
+ ```yaml
+ - name: DotnetMonitor_Metrics__Providers__0__ProviderName
+ value: "MyCustomEventCounterProvider"
+ - name: DotnetMonitor_Metrics__Providers__0__MetricType
+ value: "EventCounter"
+ - name: DotnetMonitor_Metrics__Providers__1__ProviderName
+ value: "MyCustomSDMProvider"
+ - name: DotnetMonitor_Metrics__Providers__1__MetricType
+ value: "Meter"
+ ```
+
## Limit How Many Histograms To Track (8.0+)
From 22b968e4d750f1221e5638e2b6231ff574c20fde Mon Sep 17 00:00:00 2001
From: Joe Schmitt
Date: Thu, 9 Feb 2023 15:57:31 -0800
Subject: [PATCH 41/61] Update authentication.md (#3627)
---
documentation/authentication.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/documentation/authentication.md b/documentation/authentication.md
index 6fa02fba561..bb9c69132cd 100644
--- a/documentation/authentication.md
+++ b/documentation/authentication.md
@@ -25,7 +25,7 @@ An API Key is the recommended authentication mechanism for `dotnet monitor`. API
or
-- Use the `--temp-api-key` command line option to generate a one-time API key for that instantiation of dotnet-monitor. The API key will be reported back as part of log output during the startup of the process.
+- Use the `--temp-apikey` command line option to generate a one-time API key for that instantiation of dotnet-monitor. The API key will be reported back as part of log output during the startup of the process.
> **Note**: API Key Authentication should only be used when TLS is enabled to protect the key while in transit. `dotnet monitor` will emit a warning if authentication is enabled over an insecure transport medium.
From 4a16c2567ad12f5191d7230b21f50f4efaeaa631 Mon Sep 17 00:00:00 2001
From: Justin Anderson
Date: Thu, 9 Feb 2023 16:28:18 -0800
Subject: [PATCH 42/61] Refactor common archive logic into targets (#3629)
---
eng/AfterSolutionBuild.targets | 2 +-
eng/Build.props | 10 ++-------
src/archives/Directory.Build.props | 6 ++++++
...argets => PublishedProjectPackage.targets} | 0
.../Package.props} | 8 +++----
.../dotnet-monitor/ProjectsToBuild.props | 10 +++++++++
.../dotnet-monitor/ProjectsToPublish.props | 0
.../dotnet-monitor-archive.proj | 4 ++++
.../dotnet-monitor-symbols.proj | 4 ++++
.../{Directory.Build.props => Common.props} | 4 +---
...Directory.Build.targets => Common.targets} | 14 ++++++++++---
src/archives/pkgs/PublishedProject.targets | 5 +++++
.../dotnet-monitor-archive.proj | 21 -------------------
.../{Directory.Build.props => Common.props} | 3 ++-
...Directory.Build.targets => Common.targets} | 2 --
src/archives/symbols/PublishedProject.targets | 5 +++++
.../dotnet-monitor-symbols.proj | 14 -------------
17 files changed, 55 insertions(+), 57 deletions(-)
rename src/archives/{PublishedProjectArchive.targets => PublishedProjectPackage.targets} (100%)
rename src/archives/{dotnet-monitor.props => dotnet-monitor/Package.props} (89%)
create mode 100644 src/archives/dotnet-monitor/ProjectsToBuild.props
rename eng/DotnetMonitorProjectToPublish.props => src/archives/dotnet-monitor/ProjectsToPublish.props (100%)
create mode 100644 src/archives/dotnet-monitor/dotnet-monitor-archive.proj
create mode 100644 src/archives/dotnet-monitor/dotnet-monitor-symbols.proj
rename src/archives/pkgs/{Directory.Build.props => Common.props} (80%)
rename src/archives/pkgs/{Directory.Build.targets => Common.targets} (89%)
create mode 100644 src/archives/pkgs/PublishedProject.targets
delete mode 100644 src/archives/pkgs/dotnet-monitor/dotnet-monitor-archive.proj
rename src/archives/symbols/{Directory.Build.props => Common.props} (87%)
rename src/archives/symbols/{Directory.Build.targets => Common.targets} (92%)
create mode 100644 src/archives/symbols/PublishedProject.targets
delete mode 100644 src/archives/symbols/dotnet-monitor/dotnet-monitor-symbols.proj
diff --git a/eng/AfterSolutionBuild.targets b/eng/AfterSolutionBuild.targets
index b760369927d..8fed7c9b7d7 100644
--- a/eng/AfterSolutionBuild.targets
+++ b/eng/AfterSolutionBuild.targets
@@ -1,6 +1,6 @@
-
+
-
-
- TargetFramework=$(LatestTargetFramework);RuntimeIdentifier=$(PackageRid)
-
-
- TargetFramework=$(LatestTargetFramework);RuntimeIdentifier=$(PackageRid)
-
-
+
diff --git a/src/archives/Directory.Build.props b/src/archives/Directory.Build.props
index 6749e52a6ee..6e6549b128c 100644
--- a/src/archives/Directory.Build.props
+++ b/src/archives/Directory.Build.props
@@ -2,5 +2,11 @@
$(MSBuildThisFileDirectory)
+
+ $(ToolTargetFrameworks)
+ $(DefaultRuntimeIdentifiers)
diff --git a/src/archives/PublishedProjectArchive.targets b/src/archives/PublishedProjectPackage.targets
similarity index 100%
rename from src/archives/PublishedProjectArchive.targets
rename to src/archives/PublishedProjectPackage.targets
diff --git a/src/archives/dotnet-monitor.props b/src/archives/dotnet-monitor/Package.props
similarity index 89%
rename from src/archives/dotnet-monitor.props
rename to src/archives/dotnet-monitor/Package.props
index 79d12aa8454..436c4024548 100644
--- a/src/archives/dotnet-monitor.props
+++ b/src/archives/dotnet-monitor/Package.props
@@ -1,7 +1,9 @@
-
-
+
+
+ dotnet-monitor
+ dotnet-monitor
$(DotnetMonitorPublishPath)
@@ -36,6 +38,4 @@
-
-
diff --git a/src/archives/dotnet-monitor/ProjectsToBuild.props b/src/archives/dotnet-monitor/ProjectsToBuild.props
new file mode 100644
index 00000000000..a2b69dcc3de
--- /dev/null
+++ b/src/archives/dotnet-monitor/ProjectsToBuild.props
@@ -0,0 +1,10 @@
+
+
+
+ TargetFramework=$(LatestTargetFramework);RuntimeIdentifier=$(PackageRid)
+
+
+ TargetFramework=$(LatestTargetFramework);RuntimeIdentifier=$(PackageRid)
+
+
+
\ No newline at end of file
diff --git a/eng/DotnetMonitorProjectToPublish.props b/src/archives/dotnet-monitor/ProjectsToPublish.props
similarity index 100%
rename from eng/DotnetMonitorProjectToPublish.props
rename to src/archives/dotnet-monitor/ProjectsToPublish.props
diff --git a/src/archives/dotnet-monitor/dotnet-monitor-archive.proj b/src/archives/dotnet-monitor/dotnet-monitor-archive.proj
new file mode 100644
index 00000000000..16533c4261b
--- /dev/null
+++ b/src/archives/dotnet-monitor/dotnet-monitor-archive.proj
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/archives/dotnet-monitor/dotnet-monitor-symbols.proj b/src/archives/dotnet-monitor/dotnet-monitor-symbols.proj
new file mode 100644
index 00000000000..c6b8d6cc668
--- /dev/null
+++ b/src/archives/dotnet-monitor/dotnet-monitor-symbols.proj
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/archives/pkgs/Directory.Build.props b/src/archives/pkgs/Common.props
similarity index 80%
rename from src/archives/pkgs/Directory.Build.props
rename to src/archives/pkgs/Common.props
index 10875c413c6..d756f8815b8 100644
--- a/src/archives/pkgs/Directory.Build.props
+++ b/src/archives/pkgs/Common.props
@@ -1,10 +1,8 @@
-
zip
tar.gz
-
- false
+ true
true
true
diff --git a/src/archives/pkgs/Directory.Build.targets b/src/archives/pkgs/Common.targets
similarity index 89%
rename from src/archives/pkgs/Directory.Build.targets
rename to src/archives/pkgs/Common.targets
index 2cef2ca20b4..2d3c58992d4 100644
--- a/src/archives/pkgs/Directory.Build.targets
+++ b/src/archives/pkgs/Common.targets
@@ -1,12 +1,10 @@
-
-
+ DependsOnTargets="$(PublishToDiskDependsOn);MarkEntrypointAsExecutable">
<_FileToArchive Remove="@(_FileToArchive)" />
@@ -76,4 +74,14 @@
+
+
+
+
+
+ true
+
+
+
diff --git a/src/archives/pkgs/PublishedProject.targets b/src/archives/pkgs/PublishedProject.targets
new file mode 100644
index 00000000000..8a4305a7297
--- /dev/null
+++ b/src/archives/pkgs/PublishedProject.targets
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/archives/pkgs/dotnet-monitor/dotnet-monitor-archive.proj b/src/archives/pkgs/dotnet-monitor/dotnet-monitor-archive.proj
deleted file mode 100644
index 20f69d0d786..00000000000
--- a/src/archives/pkgs/dotnet-monitor/dotnet-monitor-archive.proj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- dotnet-monitor
- $(ToolTargetFrameworks)
- $(DefaultRuntimeIdentifiers)
- true
-
-
-
- $(PublishToDiskDependsOn);UpdateFilesToArchive
-
-
-
-
-
- true
-
-
-
-
diff --git a/src/archives/symbols/Directory.Build.props b/src/archives/symbols/Common.props
similarity index 87%
rename from src/archives/symbols/Directory.Build.props
rename to src/archives/symbols/Common.props
index f8d330e4e22..7f5915c5b58 100644
--- a/src/archives/symbols/Directory.Build.props
+++ b/src/archives/symbols/Common.props
@@ -1,6 +1,7 @@
-
+ $(ArchiveName)-archive.$(RuntimeIdentifier)
+ Symbols for the $(ArchiveName) $(RuntimeIdentifier) archive.
true
true
diff --git a/src/archives/symbols/Directory.Build.targets b/src/archives/symbols/Common.targets
similarity index 92%
rename from src/archives/symbols/Directory.Build.targets
rename to src/archives/symbols/Common.targets
index 3cded050aaa..fc27c685b49 100644
--- a/src/archives/symbols/Directory.Build.targets
+++ b/src/archives/symbols/Common.targets
@@ -1,6 +1,4 @@
-
-
diff --git a/src/archives/symbols/PublishedProject.targets b/src/archives/symbols/PublishedProject.targets
new file mode 100644
index 00000000000..8a4305a7297
--- /dev/null
+++ b/src/archives/symbols/PublishedProject.targets
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/archives/symbols/dotnet-monitor/dotnet-monitor-symbols.proj b/src/archives/symbols/dotnet-monitor/dotnet-monitor-symbols.proj
deleted file mode 100644
index 511ae70d71a..00000000000
--- a/src/archives/symbols/dotnet-monitor/dotnet-monitor-symbols.proj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- dotnet-monitor-archive.$(RuntimeIdentifier)
-
- $(ToolTargetFrameworks)
- $(DefaultRuntimeIdentifiers)
- Symbols for the dotnet-monitor $(RuntimeIdentifier) archive.
-
-
-
From 45c05cf68587438267b1433a70837092dc8c0ac7 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Fri, 10 Feb 2023 13:37:00 +0000
Subject: [PATCH 43/61] Update dependencies from
https://github.com/dotnet/diagnostics build 20230209.1 (#3633)
[main] Update dependencies from dotnet/diagnostics
---
eng/Version.Details.xml | 8 ++++----
eng/Versions.props | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index f55461b2e35..65903da5dfd 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -4,13 +4,13 @@
https://github.com/dotnet/aspnetcore
cec7fbf64e63af88a9165cbbf14aa4ab6f8cc76d
-
+
https://github.com/dotnet/diagnostics
- d41911124f93b7a91dd289d2d00e38ad472ce211
+ ae326a3c6fe3ed64718a6c77e263dac59cabc41b
-
+
https://github.com/dotnet/diagnostics
- d41911124f93b7a91dd289d2d00e38ad472ce211
+ ae326a3c6fe3ed64718a6c77e263dac59cabc41b
https://github.com/dotnet/command-line-api
diff --git a/eng/Versions.props b/eng/Versions.props
index 65cdaf8a629..c4aa4af031b 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -67,8 +67,8 @@
2.0.0-beta4.23103.1
- 7.0.0-preview.23108.1
- 7.0.0-preview.23108.1
+ 7.0.0-preview.23109.1
+ 7.0.0-preview.23109.1
8.0.0-preview1.23108.2
From 66c4e651ed7065d695c3920929807bb5561e35d7 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Fri, 10 Feb 2023 13:42:49 +0000
Subject: [PATCH 44/61] Update dependencies from
https://github.com/dotnet/arcade build 20230209.5 (#3634)
[main] Update dependencies from dotnet/arcade
---
eng/Version.Details.xml | 16 ++++++++--------
eng/Versions.props | 6 +++---
eng/common/init-tools-native.ps1 | 9 +++------
eng/common/templates/job/job.yml | 6 +++---
global.json | 2 +-
5 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 65903da5dfd..3e0f600bd20 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -22,25 +22,25 @@
https://github.com/dotnet/roslyn-analyzers
63367165996d9dedbecf6677e3315a470a2f557c
-
+
https://github.com/dotnet/arcade
- b31c4466a49800c2f019690e81182c7ffd584dda
+ b888df17a4acb65630c1e9ad5e94f22a33b62ab0
-
+
https://github.com/dotnet/arcade
- b31c4466a49800c2f019690e81182c7ffd584dda
+ b888df17a4acb65630c1e9ad5e94f22a33b62ab0
-
+
https://github.com/dotnet/arcade
- b31c4466a49800c2f019690e81182c7ffd584dda
+ b888df17a4acb65630c1e9ad5e94f22a33b62ab0
https://github.com/dotnet/installer
bda2c1cc61c1aee5d450ae9f6e74479f453e7b9e
-
+
https://github.com/dotnet/arcade
- b31c4466a49800c2f019690e81182c7ffd584dda
+ b888df17a4acb65630c1e9ad5e94f22a33b62ab0
https://github.com/dotnet/symstore
diff --git a/eng/Versions.props b/eng/Versions.props
index c4aa4af031b..41926001cf6 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -58,9 +58,9 @@
-->
- 8.0.0-beta.23107.1
- 8.0.0-beta.23107.1
- 8.0.0-beta.23107.1
+ 8.0.0-beta.23109.5
+ 8.0.0-beta.23109.5
+ 8.0.0-beta.23109.5
8.0.0-preview.2.23107.2
8.0.0-preview.2.23107.2
diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1
index fbc67effc36..27ccdb9ecc9 100644
--- a/eng/common/init-tools-native.ps1
+++ b/eng/common/init-tools-native.ps1
@@ -83,7 +83,8 @@ try {
Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue
if ($NativeTools) {
if ($PathPromotion -eq $True) {
- if ($env:SYSTEM_TEAMPROJECT) { # check to see if we're in an Azure pipelines build
+ $ArcadeToolsDirectory = "$env:SYSTEMDRIVE\arcade-tools"
+ if (Test-Path $ArcadeToolsDirectory) { # if this directory exists, we should use native tools on machine
$NativeTools.PSObject.Properties | ForEach-Object {
$ToolName = $_.Name
$ToolVersion = $_.Value
@@ -93,11 +94,6 @@ try {
if ($ToolVersion -eq "latest") {
$ToolVersion = ""
}
- $ArcadeToolsDirectory = "C:\arcade-tools"
- if (-not (Test-Path $ArcadeToolsDirectory)) {
- Write-Error "Arcade tools directory '$ArcadeToolsDirectory' was not found; artifacts were not properly installed."
- exit 1
- }
$ToolDirectories = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending)
if ($ToolDirectories -eq $null) {
Write-Error "Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image."
@@ -125,6 +121,7 @@ try {
if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) {
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding."
+ Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "If this is running on a build machine, the arcade-tools directory was not found, which means there's an error with the image."
}
}
exit 0
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index f0af425d9f6..61914a1fbcd 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -134,7 +134,7 @@ jobs:
- ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}:
- task: NuGetAuthenticate@0
- - ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}:
+ - ${{ if and(ne(parameters.artifacts.download, 'false'), ne(parameters.artifacts.download, '')) }}:
- task: DownloadPipelineArtifact@2
inputs:
buildType: current
@@ -171,7 +171,7 @@ jobs:
TeamName: $(_TeamName)
- ${{ if ne(parameters.artifacts.publish, '') }}:
- - ${{ if or(eq(parameters.artifacts.publish.artifacts, 'true'), ne(parameters.artifacts.publish.artifacts, '')) }}:
+ - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}:
- task: CopyFiles@2
displayName: Gather binaries for publish to artifacts
inputs:
@@ -192,7 +192,7 @@ jobs:
ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}
continueOnError: true
condition: always()
- - ${{ if or(eq(parameters.artifacts.publish.logs, 'true'), ne(parameters.artifacts.publish.logs, '')) }}:
+ - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}:
- publish: artifacts/log
artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }}
displayName: Publish logs
diff --git a/global.json b/global.json
index 7521d04a0c7..ebbc3e2442c 100644
--- a/global.json
+++ b/global.json
@@ -26,6 +26,6 @@
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
- "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23107.1"
+ "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23109.5"
}
}
From 37b4b3199ece10898dad65f3b0b1daa13a635e7d Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Fri, 10 Feb 2023 14:21:35 +0000
Subject: [PATCH 45/61] Update dependencies from
https://github.com/dotnet/installer build 20230209.11 (#3635)
[main] Update dependencies from dotnet/installer
---
eng/Version.Details.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 3e0f600bd20..8d7e12534ce 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -34,9 +34,9 @@
https://github.com/dotnet/arcade
b888df17a4acb65630c1e9ad5e94f22a33b62ab0
-
+
https://github.com/dotnet/installer
- bda2c1cc61c1aee5d450ae9f6e74479f453e7b9e
+ 15a73ed7d66fea97cce5b7de432b8b6630708620
https://github.com/dotnet/arcade
From e92a55364d6455f5bc314c72df7368828255ac07 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Fri, 10 Feb 2023 10:34:51 -0800
Subject: [PATCH 46/61] Sync branch with origin/main (#3638)
---
.../actions/generate-release-notes/index.js | 12 +++-
.github/dependabot.template.yml | 7 +++
.github/dependabot.yml | 50 ++++++++++++++++
.github/workflows/scan-for-to-do-comments.yml | 27 +++++++++
.github/workflows/submit-to-do-issue.yml | 45 ++++++++++++++
.github/workflows/track-shipping-version.yml | 1 +
documentation/api/definitions.md | 10 ++++
documentation/api/livemetrics-custom.md | 29 ++++++++--
documentation/authentication.md | 2 +-
.../collectionrules/collectionruleexamples.md | 2 +-
.../configuration/metrics-configuration.md | 58 ++++++++++++++++++-
11 files changed, 231 insertions(+), 12 deletions(-)
create mode 100644 .github/workflows/scan-for-to-do-comments.yml
create mode 100644 .github/workflows/submit-to-do-issue.yml
diff --git a/.github/actions/generate-release-notes/index.js b/.github/actions/generate-release-notes/index.js
index 8eb4b7f860d..29f237e3c68 100644
--- a/.github/actions/generate-release-notes/index.js
+++ b/.github/actions/generate-release-notes/index.js
@@ -79,6 +79,7 @@ async function getPrsToMention(octokit, branch, repoOwner, repoName, minMergeDat
// Patch the origin PR information to have the backport PR number and URL
// so that the release notes links to the backport, but grabs the rest of
// the information from the origin PR.
+ originPr.originNumber = originPr.number;
originPr.number = pr.number;
originPr.html_url = pr.html_url;
@@ -99,6 +100,9 @@ async function getPrsToMention(octokit, branch, repoOwner, repoName, minMergeDat
commitHashesInRelease.add(commit.sha);
}
+ // Keep track of all of the prs we mention to avoid duplicates from resolved backports.
+ let mentionedOriginNumbers = new Set();
+
let prs = [];
for (const pr of candidatePrs) {
// Get a fully-qualified version of the pr that has all of the relevant information,
@@ -109,8 +113,10 @@ async function getPrsToMention(octokit, branch, repoOwner, repoName, minMergeDat
pull_number: pr.number
}))?.data;
- if (commitHashesInRelease.has(fqPr.merge_commit_sha)) {
- console.log(`Including: #${fqPr.number}`);
+ let originNumber = pr.originNumber ?? pr.number;
+ if (commitHashesInRelease.has(fqPr.merge_commit_sha) && !mentionedOriginNumbers.has(originNumber)) {
+ console.log(`Including: #${fqPr.number} -- origin:#${originNumber}`);
+ mentionedOriginNumbers.add(originNumber);
prs.push(pr);
} else {
console.log(`Skipping: #${fqPr.number} --- ${fqPr.merge_commit_sha}`);
@@ -143,7 +149,7 @@ async function generateChangelog(octokit, branch, repoOwner, repoName, minMergeD
entry += ` ${significantLabels[index].moniker}`;
}
- const changelogRegex=/^###### Release Notes Entry\r?\n(?.*)/m
+ const changelogRegex=/^###### Release Notes Entry\s+(?.*)/m
const userDefinedChangelogEntry = pr.body?.match(changelogRegex)?.groups?.releaseNotesEntry?.trim();
if (userDefinedChangelogEntry !== undefined && userDefinedChangelogEntry.length !== 0) {
entry += ` ${userDefinedChangelogEntry}`
diff --git a/.github/dependabot.template.yml b/.github/dependabot.template.yml
index 3e42072a3e9..005619b4121 100644
--- a/.github/dependabot.template.yml
+++ b/.github/dependabot.template.yml
@@ -10,6 +10,7 @@ updates:
interval: "daily"
target-branch: "main"
#@ for branch in ["main", "release/8.x", "release/7.x", "release/7.0", "release/6.x"]:
+#@ commit_prefix = "[" + branch + "] "
- package-ecosystem: "nuget"
directory: "/eng/dependabot"
schedule:
@@ -18,11 +19,15 @@ updates:
ignore:
- dependency-name: "Microsoft.Extensions.*"
update-types: [ "version-update:semver-major" ]
+ commit-message:
+ prefix: #@ commit_prefix
- package-ecosystem: "nuget"
directory: "/eng/dependabot/nuget.org"
schedule:
interval: "daily"
target-branch: #@ branch
+ commit-message:
+ prefix: #@ commit_prefix
#@ for tfm in ["net7.0", "net6.0", "netcoreapp3.1"]:
- package-ecosystem: "nuget"
directory: #@ "/eng/dependabot/" + tfm
@@ -32,5 +37,7 @@ updates:
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-major" ]
+ commit-message:
+ prefix: #@ commit_prefix
#@ end
#@ end
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index f935336482f..4b11693815c 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -14,11 +14,15 @@ updates:
- dependency-name: Microsoft.Extensions.*
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[main] '
- package-ecosystem: nuget
directory: /eng/dependabot/nuget.org
schedule:
interval: daily
target-branch: main
+ commit-message:
+ prefix: '[main] '
- package-ecosystem: nuget
directory: /eng/dependabot/net7.0
schedule:
@@ -28,6 +32,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[main] '
- package-ecosystem: nuget
directory: /eng/dependabot/net6.0
schedule:
@@ -37,6 +43,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[main] '
- package-ecosystem: nuget
directory: /eng/dependabot/netcoreapp3.1
schedule:
@@ -46,6 +54,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[main] '
- package-ecosystem: nuget
directory: /eng/dependabot
schedule:
@@ -55,11 +65,15 @@ updates:
- dependency-name: Microsoft.Extensions.*
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/8.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/nuget.org
schedule:
interval: daily
target-branch: release/8.x
+ commit-message:
+ prefix: '[release/8.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net7.0
schedule:
@@ -69,6 +83,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/8.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net6.0
schedule:
@@ -78,6 +94,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/8.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/netcoreapp3.1
schedule:
@@ -87,6 +105,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/8.x] '
- package-ecosystem: nuget
directory: /eng/dependabot
schedule:
@@ -96,11 +116,15 @@ updates:
- dependency-name: Microsoft.Extensions.*
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/nuget.org
schedule:
interval: daily
target-branch: release/7.x
+ commit-message:
+ prefix: '[release/7.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net7.0
schedule:
@@ -110,6 +134,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net6.0
schedule:
@@ -119,6 +145,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/netcoreapp3.1
schedule:
@@ -128,6 +156,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.x] '
- package-ecosystem: nuget
directory: /eng/dependabot
schedule:
@@ -137,11 +167,15 @@ updates:
- dependency-name: Microsoft.Extensions.*
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.0] '
- package-ecosystem: nuget
directory: /eng/dependabot/nuget.org
schedule:
interval: daily
target-branch: release/7.0
+ commit-message:
+ prefix: '[release/7.0] '
- package-ecosystem: nuget
directory: /eng/dependabot/net7.0
schedule:
@@ -151,6 +185,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.0] '
- package-ecosystem: nuget
directory: /eng/dependabot/net6.0
schedule:
@@ -160,6 +196,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.0] '
- package-ecosystem: nuget
directory: /eng/dependabot/netcoreapp3.1
schedule:
@@ -169,6 +207,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/7.0] '
- package-ecosystem: nuget
directory: /eng/dependabot
schedule:
@@ -178,11 +218,15 @@ updates:
- dependency-name: Microsoft.Extensions.*
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/6.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/nuget.org
schedule:
interval: daily
target-branch: release/6.x
+ commit-message:
+ prefix: '[release/6.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net7.0
schedule:
@@ -192,6 +236,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/6.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/net6.0
schedule:
@@ -201,6 +247,8 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/6.x] '
- package-ecosystem: nuget
directory: /eng/dependabot/netcoreapp3.1
schedule:
@@ -210,3 +258,5 @@ updates:
- dependency-name: '*'
update-types:
- version-update:semver-major
+ commit-message:
+ prefix: '[release/6.x] '
diff --git a/.github/workflows/scan-for-to-do-comments.yml b/.github/workflows/scan-for-to-do-comments.yml
new file mode 100644
index 00000000000..4d959576e7e
--- /dev/null
+++ b/.github/workflows/scan-for-to-do-comments.yml
@@ -0,0 +1,27 @@
+name: Scan For To Do Comments
+on:
+ pull_request_review_comment:
+ types: [created]
+ issue_comment:
+ types: [created]
+
+jobs:
+ scan-for-todo-issue:
+ runs-on: ubuntu-latest
+ if: startsWith(github.event.comment.body, '/TODO')
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Generate artifacts
+ run: |
+ trimmed_comment=$(echo "${{ github.event.comment.body }}" | sed 's|/TODO ||I')
+ mkdir -p ./issue
+ echo -n $trimmed_comment > ./issue/issue-title
+ echo -n "${{ github.event.comment.html_url }}" > ./issue/issue-url
+ echo -n "${{ github.event.comment.user.login }}" > ./issue/issue-user
+ - name: Upload artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: issue-todo
+ path: issue/
diff --git a/.github/workflows/submit-to-do-issue.yml b/.github/workflows/submit-to-do-issue.yml
new file mode 100644
index 00000000000..5d323a4744b
--- /dev/null
+++ b/.github/workflows/submit-to-do-issue.yml
@@ -0,0 +1,45 @@
+name: 'Submit To Do Issue'
+
+on:
+ workflow_run:
+ workflows: ["Scan For To Do Comments"]
+ types:
+ - completed
+
+permissions:
+ issues: write
+
+jobs:
+ submit-todo-issue:
+ runs-on: ubuntu-latest
+ if: github.event.workflow_run.conclusion == 'success'
+ steps:
+ - uses: actions/github-script@v6.4.0
+ id: check-user
+ with:
+ script: |
+ await github.rest.repos.checkCollaborator({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ username: context.payload.workflow_run.triggering_actor.login
+ });
+ - name: Checkout
+ uses: actions/checkout@v3
+ # Download the artifact from the workflow that kicked off this one.
+ # The default artifact download action doesn't support cross-workflow
+ # artifacts, so use a 3rd party one.
+ - name: 'Download linting results'
+ uses: dawidd6/action-download-artifact@v2
+ with:
+ workflow: ${{env.workflow_name}}
+ run_id: ${{github.event.workflow_run.id }}
+ name: issue-todo
+ path: ./issue-todo
+ - name: Submit Issue
+ run: |
+ title=$(cat ./issue-todo/issue-title)
+ user=$(cat ./issue-todo/issue-user)
+ url=$(cat ./issue-todo/issue-url)
+ gh issue create --label "todo" --assignee "$user" --title "$title" --body "$url"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/track-shipping-version.yml b/.github/workflows/track-shipping-version.yml
index fe2e0f0a71c..6f1e92fdf3c 100644
--- a/.github/workflows/track-shipping-version.yml
+++ b/.github/workflows/track-shipping-version.yml
@@ -1,3 +1,4 @@
+name: Track shipped versions
on:
release:
types: [released]
diff --git a/documentation/api/definitions.md b/documentation/api/definitions.md
index 8e24027de40..c5d35b743b3 100644
--- a/documentation/api/definitions.md
+++ b/documentation/api/definitions.md
@@ -244,6 +244,16 @@ Object describing a metric from the application.
| `counterType` | string | The type of metric. This is typically `Rate` or `Metric`. |
| `value` | double | The value of the metric. |
+## MetricType (8.0+)
+
+Enumeration that describes the type of metrics a provider consumes.
+
+| Name |
+|---|
+| `EventCounter` |
+| `Meter` |
+| `All` |
+
## OperationError
| Name | Type | Description |
diff --git a/documentation/api/livemetrics-custom.md b/documentation/api/livemetrics-custom.md
index ecba82ccf90..f2a5705be2c 100644
--- a/documentation/api/livemetrics-custom.md
+++ b/documentation/api/livemetrics-custom.md
@@ -115,7 +115,7 @@ Location: localhost:52323/operations/67f07e40-5cca-4709-9062-26302c484f18
}
```
-### System.Diagnostics.Metrics
+### System.Diagnostics.Metrics (8.0+)
#### Sample Request
@@ -151,11 +151,28 @@ Location: localhost:52323/operations/67f07e40-5cca-4709-9062-26302c484f18
"displayName": "myHistogram",
"unit": null,
"counterType": "Metric",
- "value": {
- "0.5": 2892,
- "0.95": 4848,
- "0.99": 4984
- }
+ "tags": "Percentile=50",
+ "value": 2292
+}
+{
+ "timestamp": "2021-08-31T16:58:39.7514031+00:00",
+ "provider": "CustomProvider",
+ "name": "myHistogram",
+ "displayName": "myHistogram",
+ "unit": null,
+ "counterType": "Metric",
+ "tags": "Percentile=95",
+ "value": 4616
+}
+{
+ "timestamp": "2021-08-31T16:58:39.7514031+00:00",
+ "provider": "CustomProvider",
+ "name": "myHistogram",
+ "displayName": "myHistogram",
+ "unit": null,
+ "counterType": "Metric",
+ "tags": "Percentile=99",
+ "value": 4960
}
```
diff --git a/documentation/authentication.md b/documentation/authentication.md
index 6fa02fba561..bb9c69132cd 100644
--- a/documentation/authentication.md
+++ b/documentation/authentication.md
@@ -25,7 +25,7 @@ An API Key is the recommended authentication mechanism for `dotnet monitor`. API
or
-- Use the `--temp-api-key` command line option to generate a one-time API key for that instantiation of dotnet-monitor. The API key will be reported back as part of log output during the startup of the process.
+- Use the `--temp-apikey` command line option to generate a one-time API key for that instantiation of dotnet-monitor. The API key will be reported back as part of log output during the startup of the process.
> **Note**: API Key Authentication should only be used when TLS is enabled to protect the key while in transit. `dotnet monitor` will emit a warning if authentication is enabled over an insecure transport medium.
diff --git a/documentation/collectionrules/collectionruleexamples.md b/documentation/collectionrules/collectionruleexamples.md
index 0bb3b90ed19..09108ea0b82 100644
--- a/documentation/collectionrules/collectionruleexamples.md
+++ b/documentation/collectionrules/collectionruleexamples.md
@@ -394,7 +394,7 @@ This rule, named "BadResponseStatus", will trigger when 5 4xx status codes are e
### Explanation
-This rule, named "HighRequestCount", will trigger when a process with a `ProcessId` of 12345 has 10 requests within a 1 minute sliding window. If the rule is triggered, information level logs will be collected for one minute and egressed to the specified `Egress` provider (in this case, `artifacts` has been configured to save the logs to the local filesystem). There is a limit that states that this may only be triggered for one hour (to prevent an excessive number of logs from being collected), and there is a default `ActionCount` limit stating that this rule may only be triggered 5 times.
+This rule, named "HighRequestCount", will trigger when a process with a `ProcessId` of 12345 has 10 requests within a 1 minute sliding window. If the rule is triggered, error level logs will be collected for one minute and egressed to the specified `Egress` provider (in this case, `artifacts` has been configured to save the logs to the local filesystem). There is a limit that states that this may only be triggered for one hour (to prevent an excessive number of logs from being collected), and there is a default `ActionCount` limit stating that this rule may only be triggered 5 times.
## Collect Trace - Too Many Long Requests (`AspNetRequestDuration` Trigger)
diff --git a/documentation/configuration/metrics-configuration.md b/documentation/configuration/metrics-configuration.md
index 8c81287c060..3b3cb42cd5a 100644
--- a/documentation/configuration/metrics-configuration.md
+++ b/documentation/configuration/metrics-configuration.md
@@ -166,7 +166,63 @@ Additional metrics providers and counter names to return from this route can be
When `CounterNames` are not specified, all the counters associated with the `ProviderName` are collected.
-[7.1+] Custom metrics support labels for metadata. Metadata cannot include commas (`,`); the inclusion of a comma in metadata will result in all metadata being removed from the custom metric.
+[8.0+] Custom metrics support labels for metadata. Metadata cannot include commas (`,`); the inclusion of a comma in metadata will result in all metadata being removed from the custom metric.
+
+[8.0+] `System.Diagnostics.Metrics` is now supported in a limited capacity for custom metrics. At this time, there are several known limitations:
+ * `System.Diagnostics.Metrics` cannot have multiple sessions collecting metrics concurrently (i.e. `/metrics` and `/livemetrics` cannot both be looking for `System.Diagnostics.Metrics` at the same time).
+ * There is currently no trigger for `System.Diagnostics.Metrics` for collection rule scenarios.
+ * `dotnet monitor` may fail to collect `System.Diagnostics.Metrics` if it begins collecting the metric before the target app creates the Meter ([note that this is fixed for .NET 8+ apps](https://github.com/dotnet/runtime/pull/76965)).
+
+### Set [`MetricType`](../api/definitions.md#metrictype-80)
+
+By default, `dotnet monitor` is unable to determine whether a custom provider is an `EventCounter` or `Meter`, and will attempt to collect both kinds of metrics for the specified provider. To explicitly specify whether a custom provider is an `EventCounter` or `Meter`, set the appropriate `MetricType`:
+
+
+ JSON
+
+ ```json
+ {
+ "Metrics": {
+ "Providers": [
+ {
+ "ProviderName": "MyCustomEventCounterProvider",
+ "MetricType": "EventCounter"
+ },
+ {
+ "ProviderName": "MyCustomSDMProvider",
+ "MetricType": "Meter"
+ }
+ ]
+ }
+ }
+ ```
+
+
+
+ Kubernetes ConfigMap
+
+ ```yaml
+ Metrics__Providers__0__ProviderName: "MyCustomEventCounterProvider"
+ Metrics__Providers__0__MetricType: "EventCounter"
+ Metrics__Providers__1__ProviderName: "MyCustomSDMProvider"
+ Metrics__Providers__1__MetricType: "Meter"
+ ```
+
+
+
+ Kubernetes Environment Variables
+
+ ```yaml
+ - name: DotnetMonitor_Metrics__Providers__0__ProviderName
+ value: "MyCustomEventCounterProvider"
+ - name: DotnetMonitor_Metrics__Providers__0__MetricType
+ value: "EventCounter"
+ - name: DotnetMonitor_Metrics__Providers__1__ProviderName
+ value: "MyCustomSDMProvider"
+ - name: DotnetMonitor_Metrics__Providers__1__MetricType
+ value: "Meter"
+ ```
+
## Limit How Many Histograms To Track (8.0+)
From 92217cd12cbaf926c40eb7f9fcf2ab6228279142 Mon Sep 17 00:00:00 2001
From: Wiktor Kopec
Date: Fri, 10 Feb 2023 17:19:17 -0800
Subject: [PATCH 47/61] Allow per provider interval specification (#3591)
* Allow per provider interval specification
* Update src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsSettingsFactory.cs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/MetricsSettingsTests.cs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Pr feedback
* pr feedback
* pr feedback
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---
.../configuration/metrics-configuration.md | 44 ++++++
documentation/schema.json | 25 ++++
.../GlobalCounterOptions.cs | 40 +++++-
.../OptionsDisplayStrings.Designer.cs | 18 +++
.../OptionsDisplayStrings.resx | 6 +
.../Controllers/DiagController.cs | 2 +-
.../Metrics/MetricsSettingsFactory.cs | 14 ++
.../Strings.Designer.cs | 2 +-
.../Strings.resx | 2 +-
.../Utilities/TraceUtilities.cs | 11 +-
.../Validation/CounterValidator.cs | 4 +-
.../Options/OptionsExtensions.cs | 10 ++
.../CollectionRuleOptionsTests.cs | 79 +++++++++++
.../MetricsSettingsTests.cs | 126 ++++++++++++++++++
.../Actions/CollectTraceAction.cs | 4 +-
.../Actions/CollectTraceOptions.Validate.cs | 16 ++-
.../AspNetRequestDurationTriggerFactory.cs | 3 +-
.../Triggers/EventCounterTriggerFactory.cs | 2 +-
.../ServiceCollectionExtensions.cs | 4 +-
19 files changed, 395 insertions(+), 17 deletions(-)
create mode 100644 src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/MetricsSettingsTests.cs
diff --git a/documentation/configuration/metrics-configuration.md b/documentation/configuration/metrics-configuration.md
index 3b3cb42cd5a..396a71bb830 100644
--- a/documentation/configuration/metrics-configuration.md
+++ b/documentation/configuration/metrics-configuration.md
@@ -8,6 +8,8 @@
Due to limitations in event counters, `dotnet monitor` supports only **one** refresh interval when collecting metrics. This interval is used for
Prometheus metrics, livemetrics, triggers, traces, and trigger actions that collect traces. The default interval is 5 seconds, but can be changed in configuration.
+[7.1+] For EventCounter providers, is possible to specify a different interval for each provider. See [Per provider intervals](#per-provider-intervals-71).
+
JSON
@@ -37,6 +39,48 @@ Prometheus metrics, livemetrics, triggers, traces, and trigger actions that coll
```
+## Per provider intervals (7.1+)
+
+It is possible to override the global interval on a per provider basis. Note this forces all scenarios (triggers, live metrics, prometheus metrics, traces) that use a particular provider to use that interval. Metrics that are `System.Diagnostics.Metrics` based always use global interval.
+
+
+ JSON
+
+ ```json
+ {
+ "GlobalCounter": {
+ "IntervalSeconds": 5,
+ "Providers": {
+ "System.Runtime": {
+ "IntervalSeconds": 10
+ }
+ }
+ }
+ }
+ ```
+
+
+
+ Kubernetes ConfigMap
+
+ ```yaml
+ GlobalCounter__IntervalSeconds: "5"
+ GlobalCounter__Providers__System.Runtime__IntervalSeconds: "10"
+ ```
+
+
+
+ Kubernetes Environment Variables
+
+ ```yaml
+ - name: DotnetMonitor_GlobalCounter__IntervalSeconds
+ value: "5"
+ - name: DotnetMonitor_GlobalCounter__Providers__System.Runtime__IntervalSeconds
+ value: "10"
+
+ ```
+
+
## Metrics Urls
In addition to the ordinary diagnostics urls that `dotnet monitor` binds to, it also binds to metric urls that only expose the `/metrics` endpoint. Unlike the other endpoints, the metrics urls do not require authentication. Unless you enable collection of custom providers that may contain sensitive business logic, it is generally considered safe to expose metrics endpoints.
diff --git a/documentation/schema.json b/documentation/schema.json
index 0f3a2756fba..8c0b1c4acd3 100644
--- a/documentation/schema.json
+++ b/documentation/schema.json
@@ -899,6 +899,31 @@
"default": 1000,
"maximum": 2147483647.0,
"minimum": 1.0
+ },
+ "Providers": {
+ "type": [
+ "null",
+ "object"
+ ],
+ "description": "Dictionary of provider names and their global configuration.",
+ "additionalProperties": {
+ "$ref": "#/definitions/GlobalProviderOptions"
+ }
+ }
+ }
+ },
+ "GlobalProviderOptions": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "IntervalSeconds": {
+ "type": [
+ "null",
+ "number"
+ ],
+ "format": "float",
+ "maximum": 86400.0,
+ "minimum": 1.0
}
}
},
diff --git a/src/Microsoft.Diagnostics.Monitoring.Options/GlobalCounterOptions.cs b/src/Microsoft.Diagnostics.Monitoring.Options/GlobalCounterOptions.cs
index 54e601769c1..ccb83017e09 100644
--- a/src/Microsoft.Diagnostics.Monitoring.Options/GlobalCounterOptions.cs
+++ b/src/Microsoft.Diagnostics.Monitoring.Options/GlobalCounterOptions.cs
@@ -2,12 +2,15 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System;
+using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
+using System.Globalization;
+using System.Linq;
namespace Microsoft.Diagnostics.Monitoring.WebApi
{
- public class GlobalCounterOptions
+ public partial class GlobalCounterOptions
{
public const float IntervalMinSeconds = 1;
public const float IntervalMaxSeconds = 60 * 60 * 24; // One day
@@ -32,6 +35,38 @@ public class GlobalCounterOptions
[DefaultValue(GlobalCounterOptionsDefaults.MaxTimeSeries)]
[Range(1, int.MaxValue)]
public int? MaxTimeSeries { get; set; }
+
+ [Display(
+ ResourceType = typeof(OptionsDisplayStrings),
+ Description = nameof(OptionsDisplayStrings.DisplayAttributeDescription_GlobalCounterOptions_Providers))]
+ public System.Collections.Generic.IDictionary Providers { get; set; } = new Dictionary(StringComparer.OrdinalIgnoreCase);
+ }
+
+ public class GlobalProviderOptions
+ {
+ [Range(GlobalCounterOptions.IntervalMinSeconds, GlobalCounterOptions.IntervalMaxSeconds)]
+ public float? IntervalSeconds { get; set; }
+ }
+
+ partial class GlobalCounterOptions : IValidatableObject
+ {
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ var results = new List();
+ var providerResults = new List();
+ foreach ((string provider, GlobalProviderOptions options) in Providers)
+ {
+ providerResults.Clear();
+ if (!Validator.TryValidateObject(options, new ValidationContext(options), providerResults, true))
+ {
+ // We prefix the validation error with the provider.
+ results.AddRange(providerResults.Select(r => new ValidationResult(
+ string.Format(CultureInfo.CurrentCulture, OptionsDisplayStrings.ErrorMessage_NestedProviderValidationError, provider, r.ErrorMessage))));
+ }
+ }
+
+ return results;
+ }
}
internal static class GlobalCounterOptionsExtensions
@@ -44,5 +79,8 @@ public static int GetMaxHistograms(this GlobalCounterOptions options) =>
public static int GetMaxTimeSeries(this GlobalCounterOptions options) =>
options.MaxTimeSeries.GetValueOrDefault(GlobalCounterOptionsDefaults.MaxTimeSeries);
+
+ public static float GetProviderSpecificInterval(this GlobalCounterOptions options, string providerName) =>
+ options.Providers.TryGetValue(providerName, out GlobalProviderOptions providerOptions) ? providerOptions.IntervalSeconds ?? options.GetIntervalSeconds() : options.GetIntervalSeconds();
}
}
diff --git a/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.Designer.cs b/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.Designer.cs
index e0416dddc5f..544e74f4bcf 100644
--- a/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.Designer.cs
+++ b/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.Designer.cs
@@ -1040,6 +1040,15 @@ public static string DisplayAttributeDescription_GlobalCounterOptions_IntervalSe
}
}
+ ///
+ /// Looks up a localized string similar to Dictionary of provider names and their global configuration..
+ ///
+ public static string DisplayAttributeDescription_GlobalCounterOptions_Providers {
+ get {
+ return ResourceManager.GetString("DisplayAttributeDescription_GlobalCounterOptions_Providers", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Allows features that require diagnostic components to be loaded into target processes to be enabled. These features may have minimal performance impact on target processes..
///
@@ -1589,6 +1598,15 @@ public static string ErrorMessage_FilterValueMissing {
}
}
+ ///
+ /// Looks up a localized string similar to Provider '{0}' validation error: '{1}'.
+ ///
+ public static string ErrorMessage_NestedProviderValidationError {
+ get {
+ return ResourceManager.GetString("ErrorMessage_NestedProviderValidationError", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to An egress provider must be specified if there is no default egress provider..
///
diff --git a/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.resx b/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.resx
index d162e18422f..d34628caba4 100644
--- a/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.resx
+++ b/src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.resx
@@ -811,4 +811,10 @@
The type of metrics this provider consumes
The description provided for the MetricType parameter on MetricProvider.
+
+ Dictionary of provider names and their global configuration.
+
+
+ Provider '{0}' validation error: '{1}'
+
\ No newline at end of file
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs b/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs
index 5b17611c6a6..1276751232d 100644
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs
+++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs
@@ -337,7 +337,7 @@ public Task CaptureTrace(
{
TimeSpan duration = Utilities.ConvertSecondsToTimeSpan(durationSeconds);
- var aggregateConfiguration = TraceUtilities.GetTraceConfiguration(profile, _counterOptions.CurrentValue.GetIntervalSeconds());
+ var aggregateConfiguration = TraceUtilities.GetTraceConfiguration(profile, _counterOptions.CurrentValue);
return StartTrace(processInfo, aggregateConfiguration, duration, egressProvider, tags);
}, processKey, Utilities.ArtifactType_Trace);
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsSettingsFactory.cs b/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsSettingsFactory.cs
index 4385a11487d..0bc17e7e9a1 100644
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsSettingsFactory.cs
+++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/Metrics/MetricsSettingsFactory.cs
@@ -4,6 +4,7 @@
using Microsoft.Diagnostics.Monitoring.EventPipe;
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Threading;
@@ -20,6 +21,7 @@ public static MetricsPipelineSettings CreateSettings(GlobalCounterOptions counte
return CreateSettings(includeDefaults,
durationSeconds,
counterOptions.GetIntervalSeconds(),
+ counterOptions.Providers,
counterOptions.GetMaxHistograms(),
counterOptions.GetMaxTimeSeries(),
() => new List(0));
@@ -29,6 +31,7 @@ public static MetricsPipelineSettings CreateSettings(GlobalCounterOptions counte
{
return CreateSettings(options.IncludeDefaultProviders.GetValueOrDefault(MetricsOptionsDefaults.IncludeDefaultProviders),
Timeout.Infinite, counterOptions.GetIntervalSeconds(),
+ counterOptions.Providers,
counterOptions.GetMaxHistograms(),
counterOptions.GetMaxTimeSeries(),
() => ConvertCounterGroups(options.Providers));
@@ -40,6 +43,7 @@ public static MetricsPipelineSettings CreateSettings(GlobalCounterOptions counte
return CreateSettings(configuration.IncludeDefaultProviders,
durationSeconds,
counterOptions.GetIntervalSeconds(),
+ counterOptions.Providers,
counterOptions.GetMaxHistograms(),
counterOptions.GetMaxTimeSeries(),
() => ConvertCounterGroups(configuration.Providers));
@@ -48,6 +52,7 @@ public static MetricsPipelineSettings CreateSettings(GlobalCounterOptions counte
private static MetricsPipelineSettings CreateSettings(bool includeDefaults,
int durationSeconds,
float counterInterval,
+ IDictionary intervalMap,
int maxHistograms,
int maxTimeSeries,
Func> createCounterGroups)
@@ -61,6 +66,15 @@ private static MetricsPipelineSettings CreateSettings(bool includeDefaults,
eventPipeCounterGroups.Add(new EventPipeCounterGroup { ProviderName = MonitoringSourceConfiguration.GrpcAspNetCoreServer, Type = CounterGroupType.EventCounter });
}
+ foreach (EventPipeCounterGroup counterGroup in eventPipeCounterGroups)
+ {
+ if (intervalMap.TryGetValue(counterGroup.ProviderName, out GlobalProviderOptions providerInterval))
+ {
+ Debug.Assert(counterGroup.IntervalSeconds == null, "Unexpected value for provider interval");
+ counterGroup.IntervalSeconds = providerInterval.IntervalSeconds;
+ }
+ }
+
return new MetricsPipelineSettings
{
CounterGroups = eventPipeCounterGroups.ToArray(),
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/Strings.Designer.cs b/src/Microsoft.Diagnostics.Monitoring.WebApi/Strings.Designer.cs
index 1aeb9e1bf36..6a73c585fe8 100644
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/Strings.Designer.cs
+++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/Strings.Designer.cs
@@ -106,7 +106,7 @@ internal static string ErrorMessage_InvalidMetricCount {
}
///
- /// Looks up a localized string similar to Custom trace metric provider '{0}' must use the global counter interval '{1}'.
+ /// Looks up a localized string similar to Custom trace metric provider '{0}' must use the expected counter interval '{1}'..
///
internal static string ErrorMessage_InvalidMetricInterval {
get {
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/Strings.resx b/src/Microsoft.Diagnostics.Monitoring.WebApi/Strings.resx
index aef63084a5d..c855827f271 100644
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/Strings.resx
+++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/Strings.resx
@@ -136,7 +136,7 @@
Gets a string similar to "Invalid metric count.".
- Custom trace metric provider '{0}' must use the global counter interval '{1}'
+ Custom trace metric provider '{0}' must use the expected counter interval '{1}'.
Metrics was not enabled.
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/Utilities/TraceUtilities.cs b/src/Microsoft.Diagnostics.Monitoring.WebApi/Utilities/TraceUtilities.cs
index 33ecebe9f2f..ee4a949fe13 100644
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/Utilities/TraceUtilities.cs
+++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/Utilities/TraceUtilities.cs
@@ -13,7 +13,7 @@ namespace Microsoft.Diagnostics.Monitoring.WebApi
{
internal static class TraceUtilities
{
- public static MonitoringSourceConfiguration GetTraceConfiguration(Models.TraceProfile profile, float metricsIntervalSeconds)
+ public static MonitoringSourceConfiguration GetTraceConfiguration(Models.TraceProfile profile, GlobalCounterOptions options)
{
var configurations = new List();
if (profile.HasFlag(Models.TraceProfile.Cpu))
@@ -34,7 +34,14 @@ public static MonitoringSourceConfiguration GetTraceConfiguration(Models.TracePr
}
if (profile.HasFlag(Models.TraceProfile.Metrics))
{
- configurations.Add(new MetricSourceConfiguration(metricsIntervalSeconds, Enumerable.Empty()));
+ IEnumerable defaultProviders = MonitoringSourceConfiguration.DefaultMetricProviders.Select(provider => new MetricEventPipeProvider
+ {
+ Provider = provider,
+ IntervalSeconds = options.GetProviderSpecificInterval(provider),
+ Type = MetricType.EventCounter
+ });
+
+ configurations.Add(new MetricSourceConfiguration(options.GetIntervalSeconds(), defaultProviders));
}
return new AggregateSourceConfiguration(configurations.ToArray());
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/Validation/CounterValidator.cs b/src/Microsoft.Diagnostics.Monitoring.WebApi/Validation/CounterValidator.cs
index a1f6ad99d65..bae063dd3c3 100644
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/Validation/CounterValidator.cs
+++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/Validation/CounterValidator.cs
@@ -17,12 +17,12 @@ public static bool ValidateProvider(GlobalCounterOptions counterOptions,
if (provider.Arguments?.TryGetValue("EventCounterIntervalSec", out string intervalValue) == true)
{
if (float.TryParse(intervalValue, out float intervalSeconds) &&
- intervalSeconds != counterOptions.GetIntervalSeconds())
+ intervalSeconds != counterOptions.GetProviderSpecificInterval(provider.Name))
{
errorMessage = string.Format(CultureInfo.CurrentCulture,
Strings.ErrorMessage_InvalidMetricInterval,
provider.Name,
- counterOptions.GetIntervalSeconds());
+ counterOptions.GetProviderSpecificInterval(provider.Name));
return false;
}
}
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/Options/OptionsExtensions.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/Options/OptionsExtensions.cs
index b40c9a80433..d953295bcd1 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/Options/OptionsExtensions.cs
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/Options/OptionsExtensions.cs
@@ -13,6 +13,7 @@
using System.Security.Cryptography;
using System.Text.Json;
using System.Text.Json.Serialization;
+using Xunit;
namespace Microsoft.Diagnostics.Monitoring.TestCommon.Options
{
@@ -46,6 +47,15 @@ public static RootOptions AddGlobalCounter(this RootOptions options, int interva
return options;
}
+ public static RootOptions AddProviderInterval(this RootOptions options, string name, int intervalSeconds)
+ {
+ Assert.NotNull(options.GlobalCounter);
+
+ options.GlobalCounter.Providers.Add(name, new GlobalProviderOptions { IntervalSeconds = (float)intervalSeconds });
+
+ return options;
+ }
+
public static CollectionRuleOptions CreateCollectionRule(this RootOptions rootOptions, string name)
{
CollectionRuleOptions options = new();
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/CollectionRuleOptionsTests.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/CollectionRuleOptionsTests.cs
index 5b2d4ba92f7..55f88a787ef 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/CollectionRuleOptionsTests.cs
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/CollectionRuleOptionsTests.cs
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using Microsoft.Diagnostics.Monitoring.EventPipe;
using Microsoft.Diagnostics.Monitoring.TestCommon;
using Microsoft.Diagnostics.Monitoring.TestCommon.Options;
using Microsoft.Diagnostics.Monitoring.WebApi.Models;
@@ -19,6 +20,7 @@
using System.Diagnostics.Tracing;
using System.Globalization;
using System.Linq;
+using System.Reflection;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -1055,6 +1057,65 @@ public Task CollectionRuleOptions_CollectTraceAction_PropertyValidation()
});
}
+ [Fact]
+ public Task CollectionRuleOptions_CollectTraceAction_ValidateProviderIntervals()
+ {
+ const string ExpectedEgressProvider = "TmpEgressProvider";
+ const int ExpectedInterval = 7;
+
+ return ValidateFailure(
+ rootOptions =>
+ {
+ rootOptions.AddGlobalCounter(5);
+ rootOptions.AddProviderInterval(MonitoringSourceConfiguration.SystemRuntimeEventSourceName, ExpectedInterval);
+
+ rootOptions.AddFileSystemEgress(ExpectedEgressProvider, "/tmp");
+
+ rootOptions.CreateCollectionRule(DefaultRuleName)
+ .SetStartupTrigger()
+ .AddCollectTraceAction(new EventPipeProvider[] { new EventPipeProvider
+ {
+ Name = MonitoringSourceConfiguration.SystemRuntimeEventSourceName,
+ Arguments = new Dictionary{ { "EventCounterIntervalSec", "5" } },
+ }},
+ ExpectedEgressProvider, null);
+ },
+ ex =>
+ {
+ string failure = Assert.Single(ex.Failures);
+ VerifyProviderIntervalMessage(failure, MonitoringSourceConfiguration.SystemRuntimeEventSourceName, ExpectedInterval);
+ });
+ }
+
+ [Fact]
+ public Task CollectionRuleOptions_CollectTraceAction_InvalidProviderInterval()
+ {
+ const string ExpectedEgressProvider = "TmpEgressProvider";
+
+ return ValidateFailure(
+ rootOptions =>
+ {
+ rootOptions.AddGlobalCounter(5);
+ rootOptions.AddProviderInterval(MonitoringSourceConfiguration.SystemRuntimeEventSourceName, -2);
+
+ rootOptions.AddFileSystemEgress(ExpectedEgressProvider, "/tmp");
+
+ rootOptions.CreateCollectionRule(DefaultRuleName)
+ .SetStartupTrigger()
+ .AddCollectTraceAction(new EventPipeProvider[] { new EventPipeProvider
+ {
+ Name = MonitoringSourceConfiguration.SystemRuntimeEventSourceName,
+ Arguments = new Dictionary{ { "EventCounterIntervalSec", "5" } },
+ }},
+ ExpectedEgressProvider, null);
+ },
+ ex =>
+ {
+ string failure = Assert.Single(ex.Failures);
+ VerifyNestedGlobalInterval(failure, MonitoringSourceConfiguration.SystemRuntimeEventSourceName);
+ });
+ }
+
[Fact]
public Task CollectionRuleOptions_CollectTraceAction_NoProfileOrProviders()
{
@@ -1869,5 +1930,23 @@ private static void VerifyMissingStoppingEventProviderMessage(string[] failures,
Assert.Equal(message, failures[index]);
}
+
+ private static void VerifyProviderIntervalMessage(string failure, string provider, int expectedInterval)
+ {
+ string message = string.Format(CultureInfo.CurrentCulture, WebApi.Strings.ErrorMessage_InvalidMetricInterval, provider, expectedInterval);
+
+ Assert.Equal(message, failure);
+ }
+
+ private static void VerifyNestedGlobalInterval(string failure, string provider)
+ {
+ string rangeValidationMessage = typeof(WebApi.GlobalProviderOptions)
+ .GetProperty(nameof(WebApi.GlobalProviderOptions.IntervalSeconds))
+ .GetCustomAttribute()
+ .FormatErrorMessage(nameof(WebApi.GlobalProviderOptions.IntervalSeconds));
+
+ string message = string.Format(CultureInfo.CurrentCulture, WebApi.OptionsDisplayStrings.ErrorMessage_NestedProviderValidationError, provider, rangeValidationMessage);
+ Assert.Equal(message, failure);
+ }
}
}
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/MetricsSettingsTests.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/MetricsSettingsTests.cs
new file mode 100644
index 00000000000..f6a1a9a5a7b
--- /dev/null
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.UnitTests/MetricsSettingsTests.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using Microsoft.Diagnostics.Monitoring.EventPipe;
+using Microsoft.Diagnostics.Monitoring.TestCommon;
+using Microsoft.Diagnostics.Monitoring.TestCommon.Options;
+using Microsoft.Diagnostics.Monitoring.WebApi;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Options;
+using System.Collections.Generic;
+using System.Linq;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Microsoft.Diagnostics.Monitoring.Tool.UnitTests
+{
+ public class MetricsSettingsTests
+ {
+ private readonly ITestOutputHelper _outputHelper;
+
+ public MetricsSettingsTests(ITestOutputHelper outputHelper)
+ {
+ _outputHelper = outputHelper;
+ }
+
+ [Fact]
+ public void ValidateDefaultMetricSettings()
+ {
+ const int ExpectedGlobalInterval = 5;
+ int customInterval = ExpectedGlobalInterval + 1;
+ int[] expectedIntervals = MonitoringSourceConfiguration.DefaultMetricProviders.Select((_, index) => index + ExpectedGlobalInterval + 1).ToArray();
+
+ using IHost host = TestHostHelper.CreateHost(_outputHelper, (rootOptions) =>
+ {
+ rootOptions.AddGlobalCounter(ExpectedGlobalInterval);
+ foreach (string provider in MonitoringSourceConfiguration.DefaultMetricProviders)
+ {
+ rootOptions.AddProviderInterval(provider, customInterval++);
+ }
+ },
+ servicesCallback: null,
+ loggingCallback: null,
+ overrideSource: null);
+
+ var options = host.Services.GetRequiredService>();
+
+ var settings = MetricsSettingsFactory.CreateSettings(options.CurrentValue, includeDefaults: true, durationSeconds: 30);
+
+ Assert.Equal(ExpectedGlobalInterval, settings.CounterIntervalSeconds);
+
+ customInterval = ExpectedGlobalInterval + 1;
+ foreach (string provider in MonitoringSourceConfiguration.DefaultMetricProviders)
+ {
+ Assert.Equal(customInterval++, GetInterval(settings, provider));
+ }
+ }
+
+ [Fact]
+ public void ValidateApiMetricsSettings()
+ {
+ const int ExpectedGlobalInterval = 5;
+ const int CustomInterval = 6;
+ const string CustomProvider1 = nameof(CustomProvider1);
+ const string CustomProvider2 = nameof(CustomProvider2);
+
+ using IHost host = TestHostHelper.CreateHost(_outputHelper, (rootOptions) =>
+ {
+ rootOptions.AddGlobalCounter(ExpectedGlobalInterval)
+ .AddProviderInterval(CustomProvider1, CustomInterval);
+ },
+ servicesCallback: null,
+ loggingCallback: null,
+ overrideSource: null);
+
+ var options = host.Services.GetRequiredService>();
+
+ var settings = MetricsSettingsFactory.CreateSettings(options.CurrentValue, 30, new WebApi.Models.EventMetricsConfiguration
+ {
+ IncludeDefaultProviders = false,
+ Providers = new[] { new WebApi.Models.EventMetricsProvider { ProviderName = CustomProvider1 }, new WebApi.Models.EventMetricsProvider { ProviderName = CustomProvider2 } }
+ });
+
+ Assert.Equal(ExpectedGlobalInterval, settings.CounterIntervalSeconds);
+ Assert.Equal(CustomInterval, GetInterval(settings, CustomProvider1));
+ Assert.Null(GetInterval(settings, CustomProvider2));
+ }
+
+ [Fact]
+ public void ValidateMetricStoreSettings()
+ {
+ const int ExpectedGlobalInterval = 5;
+ const int CustomInterval = 6;
+ const string CustomProvider1 = nameof(CustomProvider1);
+ const string CustomProvider2 = nameof(CustomProvider2);
+
+ using IHost host = TestHostHelper.CreateHost(_outputHelper, (rootOptions) =>
+ {
+ rootOptions.AddGlobalCounter(ExpectedGlobalInterval)
+ .AddProviderInterval(CustomProvider1, CustomInterval);
+ },
+ servicesCallback: null,
+ loggingCallback: null,
+ overrideSource: null);
+
+ var options = host.Services.GetRequiredService>();
+
+ var settings = MetricsSettingsFactory.CreateSettings(options.CurrentValue, new MetricsOptions
+ {
+ IncludeDefaultProviders = false,
+ Providers = new List { new MetricProvider { ProviderName = CustomProvider1 }, new MetricProvider { ProviderName = CustomProvider2 } }
+ });
+
+ Assert.Equal(ExpectedGlobalInterval, settings.CounterIntervalSeconds);
+ Assert.Equal(CustomInterval, GetInterval(settings, CustomProvider1));
+ Assert.Null(GetInterval(settings, CustomProvider2));
+ }
+
+ private static float? GetInterval(MetricsPipelineSettings settings, string provider)
+ {
+ EventPipeCounterGroup counterGroup = settings.CounterGroups.FirstOrDefault(g => g.ProviderName == provider);
+ Assert.NotNull(counterGroup);
+ return counterGroup.IntervalSeconds;
+ }
+ }
+}
diff --git a/src/Tools/dotnet-monitor/CollectionRules/Actions/CollectTraceAction.cs b/src/Tools/dotnet-monitor/CollectionRules/Actions/CollectTraceAction.cs
index cfe51e83b74..e0f7f83c097 100644
--- a/src/Tools/dotnet-monitor/CollectionRules/Actions/CollectTraceAction.cs
+++ b/src/Tools/dotnet-monitor/CollectionRules/Actions/CollectTraceAction.cs
@@ -70,9 +70,7 @@ protected override async Task ExecuteCoreAsync(
if (Options.Profile.HasValue)
{
TraceProfile profile = Options.Profile.Value;
- float metricsIntervalSeconds = _counterOptions.CurrentValue.GetIntervalSeconds();
-
- configuration = TraceUtilities.GetTraceConfiguration(profile, metricsIntervalSeconds);
+ configuration = TraceUtilities.GetTraceConfiguration(profile, _counterOptions.CurrentValue);
}
else
{
diff --git a/src/Tools/dotnet-monitor/CollectionRules/Options/Actions/CollectTraceOptions.Validate.cs b/src/Tools/dotnet-monitor/CollectionRules/Options/Actions/CollectTraceOptions.Validate.cs
index 182973fd250..6ab69e32461 100644
--- a/src/Tools/dotnet-monitor/CollectionRules/Options/Actions/CollectTraceOptions.Validate.cs
+++ b/src/Tools/dotnet-monitor/CollectionRules/Options/Actions/CollectTraceOptions.Validate.cs
@@ -55,6 +55,18 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali
}
else if (hasProviders)
{
+ GlobalCounterOptions counterOptions = null;
+
+ try
+ {
+ // Nested validations have to be handled by catching the exception and converting it to a ValidationResult.
+ counterOptions = validationContext.GetRequiredService>().CurrentValue;
+ }
+ catch (OptionsValidationException e)
+ {
+ results.AddRange(e.Failures.Select((string failure) => new ValidationResult(e.Message)));
+ }
+
// Validate that each provider is valid.
int index = 0;
foreach (EventPipeProvider provider in Providers)
@@ -64,9 +76,7 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali
Validator.TryValidateObject(provider, providerContext, results, validateAllProperties: true);
- IOptionsMonitor counterOptions = validationContext.GetRequiredService>();
- if (!CounterValidator.ValidateProvider(counterOptions.CurrentValue,
- provider, out string errorMessage))
+ if (counterOptions != null && !CounterValidator.ValidateProvider(counterOptions, provider, out string errorMessage))
{
results.Add(new ValidationResult(errorMessage, new[] { nameof(EventPipeProvider.Arguments) }));
}
diff --git a/src/Tools/dotnet-monitor/CollectionRules/Triggers/AspNetRequestDurationTriggerFactory.cs b/src/Tools/dotnet-monitor/CollectionRules/Triggers/AspNetRequestDurationTriggerFactory.cs
index 6091b366e95..616862cf5ed 100644
--- a/src/Tools/dotnet-monitor/CollectionRules/Triggers/AspNetRequestDurationTriggerFactory.cs
+++ b/src/Tools/dotnet-monitor/CollectionRules/Triggers/AspNetRequestDurationTriggerFactory.cs
@@ -44,7 +44,8 @@ public ICollectionRuleTrigger Create(IEndpointInfo endpointInfo, Action callback
SlidingWindowDuration = options.SlidingWindowDuration ?? TimeSpan.Parse(AspNetRequestDurationOptionsDefaults.SlidingWindowDuration, CultureInfo.InvariantCulture),
};
- var aspnetTriggerSourceConfiguration = new AspNetTriggerSourceConfiguration(_counterOptions.CurrentValue.GetIntervalSeconds());
+ //HACK we get the provider specific interval for the configuration
+ var aspnetTriggerSourceConfiguration = new AspNetTriggerSourceConfiguration(_counterOptions.CurrentValue.GetProviderSpecificInterval(MonitoringSourceConfiguration.MicrosoftAspNetCoreHostingEventSourceName));
return EventPipeTriggerFactory.Create(endpointInfo, aspnetTriggerSourceConfiguration, _traceEventTriggerFactory, settings, callback);
}
diff --git a/src/Tools/dotnet-monitor/CollectionRules/Triggers/EventCounterTriggerFactory.cs b/src/Tools/dotnet-monitor/CollectionRules/Triggers/EventCounterTriggerFactory.cs
index 690bed92cce..309bfa90933 100644
--- a/src/Tools/dotnet-monitor/CollectionRules/Triggers/EventCounterTriggerFactory.cs
+++ b/src/Tools/dotnet-monitor/CollectionRules/Triggers/EventCounterTriggerFactory.cs
@@ -40,7 +40,7 @@ public ICollectionRuleTrigger Create(IEndpointInfo endpointInfo, Action callback
EventCounterTriggerSettings settings = new()
{
ProviderName = options.ProviderName,
- CounterIntervalSeconds = _counterOptions.CurrentValue.GetIntervalSeconds(),
+ CounterIntervalSeconds = _counterOptions.CurrentValue.GetProviderSpecificInterval(options.ProviderName),
CounterName = options.CounterName,
GreaterThan = options.GreaterThan,
LessThan = options.LessThan,
diff --git a/src/Tools/dotnet-monitor/ServiceCollectionExtensions.cs b/src/Tools/dotnet-monitor/ServiceCollectionExtensions.cs
index f3ce951dd42..d062a71d8ea 100644
--- a/src/Tools/dotnet-monitor/ServiceCollectionExtensions.cs
+++ b/src/Tools/dotnet-monitor/ServiceCollectionExtensions.cs
@@ -39,7 +39,9 @@ public static IServiceCollection ConfigureCors(this IServiceCollection services,
public static IServiceCollection ConfigureGlobalCounter(this IServiceCollection services, IConfiguration configuration)
{
- return ConfigureOptions(services, configuration, ConfigurationKeys.GlobalCounter);
+ return ConfigureOptions(services, configuration, ConfigurationKeys.GlobalCounter)
+ .AddSingleton, DataAnnotationValidateOptions>();
+
}
public static IServiceCollection ConfigureCollectionRuleDefaults(this IServiceCollection services, IConfiguration configuration)
From a824a52a0e985ccab3d54a62778a5500f7ec65da Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Sat, 11 Feb 2023 13:36:49 +0000
Subject: [PATCH 48/61] Update dependencies from
https://github.com/dotnet/diagnostics build 20230210.1 (#3647)
[main] Update dependencies from dotnet/diagnostics
---
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 8d7e12534ce..3d0ddcbdb37 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -4,11 +4,11 @@
https://github.com/dotnet/aspnetcore
cec7fbf64e63af88a9165cbbf14aa4ab6f8cc76d
-
+
https://github.com/dotnet/diagnostics
ae326a3c6fe3ed64718a6c77e263dac59cabc41b
-
+
https://github.com/dotnet/diagnostics
ae326a3c6fe3ed64718a6c77e263dac59cabc41b
diff --git a/eng/Versions.props b/eng/Versions.props
index 41926001cf6..4cf99244ddf 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -67,8 +67,8 @@
2.0.0-beta4.23103.1
- 7.0.0-preview.23109.1
- 7.0.0-preview.23109.1
+ 7.0.0-preview.23110.1
+ 7.0.0-preview.23110.1
8.0.0-preview1.23108.2
From 82f506b64c531ea997b1cae15d04b04a837818d8 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Sat, 11 Feb 2023 13:42:28 +0000
Subject: [PATCH 49/61] Update dependencies from
https://github.com/dotnet/arcade build 20230210.3 (#3648)
[main] Update dependencies from dotnet/arcade
---
eng/Version.Details.xml | 16 ++++++++--------
eng/Versions.props | 6 +++---
global.json | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 3d0ddcbdb37..6265c1c51bf 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -22,25 +22,25 @@
https://github.com/dotnet/roslyn-analyzers
63367165996d9dedbecf6677e3315a470a2f557c
-
+
https://github.com/dotnet/arcade
- b888df17a4acb65630c1e9ad5e94f22a33b62ab0
+ 96d8be74c39a4765ec919ff9bebf9e0c875fc195
-
+
https://github.com/dotnet/arcade
- b888df17a4acb65630c1e9ad5e94f22a33b62ab0
+ 96d8be74c39a4765ec919ff9bebf9e0c875fc195
-
+
https://github.com/dotnet/arcade
- b888df17a4acb65630c1e9ad5e94f22a33b62ab0
+ 96d8be74c39a4765ec919ff9bebf9e0c875fc195
https://github.com/dotnet/installer
15a73ed7d66fea97cce5b7de432b8b6630708620
-
+
https://github.com/dotnet/arcade
- b888df17a4acb65630c1e9ad5e94f22a33b62ab0
+ 96d8be74c39a4765ec919ff9bebf9e0c875fc195
https://github.com/dotnet/symstore
diff --git a/eng/Versions.props b/eng/Versions.props
index 4cf99244ddf..c9dd9b01e32 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -58,9 +58,9 @@
-->
- 8.0.0-beta.23109.5
- 8.0.0-beta.23109.5
- 8.0.0-beta.23109.5
+ 8.0.0-beta.23110.3
+ 8.0.0-beta.23110.3
+ 8.0.0-beta.23110.3
8.0.0-preview.2.23107.2
8.0.0-preview.2.23107.2
diff --git a/global.json b/global.json
index ebbc3e2442c..41eea54716a 100644
--- a/global.json
+++ b/global.json
@@ -26,6 +26,6 @@
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
- "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23109.5"
+ "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23110.3"
}
}
From 348bbd8f919e66afbdaea0baa555b4035ffc1d80 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Sat, 11 Feb 2023 14:20:59 +0000
Subject: [PATCH 50/61] Update dependencies from
https://github.com/dotnet/installer build 20230210.7 (#3649)
[main] Update dependencies from dotnet/installer
---
eng/Version.Details.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 6265c1c51bf..e9613cc18cb 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -34,9 +34,9 @@
https://github.com/dotnet/arcade
96d8be74c39a4765ec919ff9bebf9e0c875fc195
-
+
https://github.com/dotnet/installer
- 15a73ed7d66fea97cce5b7de432b8b6630708620
+ c84d89ca68e3c038defd371c092818446507b785
https://github.com/dotnet/arcade
From c7679addc8d69eae2cebfc401aa1d5e5bdb90ecf Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Sun, 12 Feb 2023 14:02:52 +0000
Subject: [PATCH 51/61] Update dependencies from
https://github.com/dotnet/roslyn-analyzers build 20230211.1 (#3650)
[main] Update dependencies from dotnet/roslyn-analyzers
---
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index e9613cc18cb..44593b08c23 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -18,9 +18,9 @@
-
+
https://github.com/dotnet/roslyn-analyzers
- 63367165996d9dedbecf6677e3315a470a2f557c
+ 5cd64de1a3319d7f15380b843352a2b963e59b57
https://github.com/dotnet/arcade
diff --git a/eng/Versions.props b/eng/Versions.props
index c9dd9b01e32..b41c5b7f87e 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -70,7 +70,7 @@
7.0.0-preview.23110.1
7.0.0-preview.23110.1
- 8.0.0-preview1.23108.2
+ 8.0.0-preview1.23111.1
8.0.0-preview.2.23107.1
8.0.0-preview.2.23107.1
From dacb7c893da0191d5e3570c8da6d86e6587c6392 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Mon, 13 Feb 2023 14:10:59 +0000
Subject: [PATCH 52/61] Update dependencies from
https://github.com/dotnet/installer build 20230213.1 (#3654)
[main] Update dependencies from dotnet/installer
---
eng/Version.Details.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 44593b08c23..681f8d88bb9 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -34,9 +34,9 @@
https://github.com/dotnet/arcade
96d8be74c39a4765ec919ff9bebf9e0c875fc195
-
+
https://github.com/dotnet/installer
- c84d89ca68e3c038defd371c092818446507b785
+ 0004325188fe0c920870901208d774c8e9ff6753
https://github.com/dotnet/arcade
From 6b9218e60ef52973292f1bd71d8678c88aa7c0ad Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 13 Feb 2023 08:15:00 -0800
Subject: [PATCH 53/61] Generate 7.0.2 release notes (#3624)
---
documentation/releaseNotes/releaseNotes.v7.0.2.md | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 documentation/releaseNotes/releaseNotes.v7.0.2.md
diff --git a/documentation/releaseNotes/releaseNotes.v7.0.2.md b/documentation/releaseNotes/releaseNotes.v7.0.2.md
new file mode 100644
index 00000000000..3f922d11390
--- /dev/null
+++ b/documentation/releaseNotes/releaseNotes.v7.0.2.md
@@ -0,0 +1,3 @@
+Today we are releasing the 7.0.2 build of the `dotnet monitor` tool. This release includes:
+
+- Produce RID-specific, TFM-specific, framework dependent archives ([#3520](https://github.com/dotnet/dotnet-monitor/pull/3520))
\ No newline at end of file
From 94ed583ed7cce3cc808ef3ebf70626ec99df5885 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 13 Feb 2023 08:15:49 -0800
Subject: [PATCH 54/61] Generate 6.3.2 release notes (#3625)
---
documentation/releaseNotes/releaseNotes.v6.3.2.md | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 documentation/releaseNotes/releaseNotes.v6.3.2.md
diff --git a/documentation/releaseNotes/releaseNotes.v6.3.2.md b/documentation/releaseNotes/releaseNotes.v6.3.2.md
new file mode 100644
index 00000000000..a0049beb2ec
--- /dev/null
+++ b/documentation/releaseNotes/releaseNotes.v6.3.2.md
@@ -0,0 +1,3 @@
+Today we are releasing the 6.3.2 build of the `dotnet monitor` tool. This release includes:
+
+- Produce RID-specific, TFM-specific, framework dependent archives ([#3521](https://github.com/dotnet/dotnet-monitor/pull/3521))
\ No newline at end of file
From 13cfcf5e65729cc1ffe80368a125591796b34ff4 Mon Sep 17 00:00:00 2001
From: Joe Schmitt
Date: Mon, 13 Feb 2023 09:10:30 -0800
Subject: [PATCH 55/61] Generate openapi.json at runtime (aad-auth pt 1)
(#3637)
---
documentation/openapi.json | 15 +----
.../Controllers/SwaggerFilesController.cs | 43 -------------
...osoft.Diagnostics.Monitoring.WebApi.csproj | 6 +-
...t.Diagnostics.Monitoring.OpenApiGen.csproj | 4 --
.../Program.cs | 53 +---------------
.../Commands/CollectCommandHandler.cs | 7 +++
src/Tools/dotnet-monitor/Startup.cs | 1 +
.../BadRequestResponseDocumentFilter.cs | 2 +-
.../BadRequestResponseOperationFilter.cs | 2 +-
...emoveFailureContentTypesOperationFilter.cs | 2 +-
.../TooManyRequestsResponseDocumentFilter.cs | 2 +-
.../TooManyRequestsResponseOperationFilter.cs | 2 +-
.../UnauthorizedResponseDocumentFilter.cs | 2 +-
.../UnauthorizedResponseOperationFilter.cs | 2 +-
.../dotnet-monitor/Swagger}/ResponseNames.cs | 2 +-
.../Swagger}/StatusCodeStrings.cs | 2 +-
.../Swagger/SwaggerGenOptionsExtensions.cs | 60 +++++++++++++++++++
.../dotnet-monitor/dotnet-monitor.csproj | 5 +-
18 files changed, 84 insertions(+), 128 deletions(-)
delete mode 100644 src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/SwaggerFilesController.cs
rename src/{Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen => Tools/dotnet-monitor/Swagger/Filters}/BadRequestResponseDocumentFilter.cs (95%)
rename src/{Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen => Tools/dotnet-monitor/Swagger/Filters}/BadRequestResponseOperationFilter.cs (94%)
rename src/{Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen => Tools/dotnet-monitor/Swagger/Filters}/RemoveFailureContentTypesOperationFilter.cs (93%)
rename src/{Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen => Tools/dotnet-monitor/Swagger/Filters}/TooManyRequestsResponseDocumentFilter.cs (95%)
rename src/{Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen => Tools/dotnet-monitor/Swagger/Filters}/TooManyRequestsResponseOperationFilter.cs (93%)
rename src/{Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen => Tools/dotnet-monitor/Swagger/Filters}/UnauthorizedResponseDocumentFilter.cs (94%)
rename src/{Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen => Tools/dotnet-monitor/Swagger/Filters}/UnauthorizedResponseOperationFilter.cs (94%)
rename src/{Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen => Tools/dotnet-monitor/Swagger}/ResponseNames.cs (89%)
rename src/{Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen => Tools/dotnet-monitor/Swagger}/StatusCodeStrings.cs (92%)
create mode 100644 src/Tools/dotnet-monitor/Swagger/SwaggerGenOptionsExtensions.cs
diff --git a/documentation/openapi.json b/documentation/openapi.json
index 189a55a4cc9..69746ef80d6 100644
--- a/documentation/openapi.json
+++ b/documentation/openapi.json
@@ -1903,19 +1903,6 @@
}
}
}
- },
- "securitySchemes": {
- "ApiKeyAuth": {
- "type": "apiKey",
- "description": "JWT Authorization header using bearer token authentication. Put the Authorization header value (\"Bearer\" prefix and the JWT value) in the textbox when prompted.",
- "name": "Authorization",
- "in": "header"
- }
- }
- },
- "security": [
- {
- "ApiKeyAuth": [ ]
}
- ]
+ }
}
\ No newline at end of file
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/SwaggerFilesController.cs b/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/SwaggerFilesController.cs
deleted file mode 100644
index ad500ba1e3b..00000000000
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/SwaggerFilesController.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Logging;
-using System;
-using System.Reflection;
-
-
-namespace Microsoft.Diagnostics.Monitoring.WebApi.Controllers
-{
- [Route("/swagger/v1/")]
- [ApiController]
- [ApiExplorerSettings(IgnoreApi = true)]
- public class SwaggerFilesController : ControllerBase
- {
- private readonly ILogger _logger;
-
- public SwaggerFilesController(ILogger logger,
- IServiceProvider serviceProvider)
- {
- _logger = logger;
- }
-
- ///
- /// Get the swagger files embedded into the assembly
- ///
- [HttpGet("{filename}")]
- [ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
- public FileStreamResult GetFile(string filename)
- {
- if (filename != "swagger.json") { throw new Exception(string.Format(Strings.ErrorMessage_ResourceNotFound, filename)); }
- var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Microsoft.Diagnostics.Monitoring.WebApi.swagger.v1." + filename);
- string mimetype = "text/json";
-
- return new FileStreamResult(stream, mimetype)
- {
- FileDownloadName = filename
- };
- }
- }
-}
diff --git a/src/Microsoft.Diagnostics.Monitoring.WebApi/Microsoft.Diagnostics.Monitoring.WebApi.csproj b/src/Microsoft.Diagnostics.Monitoring.WebApi/Microsoft.Diagnostics.Monitoring.WebApi.csproj
index 8e005ca8ba0..3b49c225ac1 100644
--- a/src/Microsoft.Diagnostics.Monitoring.WebApi/Microsoft.Diagnostics.Monitoring.WebApi.csproj
+++ b/src/Microsoft.Diagnostics.Monitoring.WebApi/Microsoft.Diagnostics.Monitoring.WebApi.csproj
@@ -41,10 +41,6 @@
-
-
-
-
True
@@ -56,4 +52,4 @@
Strings.Designer.cs
-
\ No newline at end of file
+
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/Microsoft.Diagnostics.Monitoring.OpenApiGen.csproj b/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/Microsoft.Diagnostics.Monitoring.OpenApiGen.csproj
index c571e2ae38a..9737afbb262 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/Microsoft.Diagnostics.Monitoring.OpenApiGen.csproj
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/Microsoft.Diagnostics.Monitoring.OpenApiGen.csproj
@@ -9,8 +9,4 @@
-
-
-
-
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/Program.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/Program.cs
index c6ba3b42e35..6c861c8f153 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/Program.cs
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/Program.cs
@@ -1,12 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using Microsoft.AspNetCore.Authentication.JwtBearer;
-using Microsoft.Diagnostics.Monitoring.WebApi.Controllers;
using Microsoft.Diagnostics.Tools.Monitor;
+using Microsoft.Diagnostics.Tools.Monitor.Swagger;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
-using Microsoft.Net.Http.Headers;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
using Swashbuckle.AspNetCore.Swagger;
@@ -18,18 +16,6 @@ namespace Microsoft.Diagnostics.Monitoring.OpenApiGen
{
internal sealed class Program
{
- private const string ApiKeySecurityDefinitionName = "ApiKeyAuth";
-
- private static readonly OpenApiSchema ProcessKey_Int32Schema =
- new OpenApiSchema() { Type = "integer", Format = "int32", Description = "The ID of the process." };
- private static readonly OpenApiSchema ProcessKey_GuidSchema =
- new OpenApiSchema() { Type = "string", Format = "uuid", Description = "The runtime instance cookie of the runtime." };
- private static readonly OpenApiSchema ProcessKey_StringSchema =
- new OpenApiSchema() { Type = "string", Description = "The name of the process." };
-
- private static Func CreateProcessKeySchema =>
- () => new OpenApiSchema() { OneOf = { ProcessKey_Int32Schema, ProcessKey_GuidSchema, ProcessKey_StringSchema } };
-
public static void Main(string[] args)
{
if (args.Length != 1)
@@ -56,42 +42,7 @@ public static void Main(string[] args)
.CreateHostBuilder(settings)
.ConfigureServices(services =>
{
- services.AddSwaggerGen(options =>
- {
- options.AddSecurityDefinition(ApiKeySecurityDefinitionName, new OpenApiSecurityScheme
- {
- Name = HeaderNames.Authorization,
- Type = SecuritySchemeType.ApiKey,
- Scheme = JwtBearerDefaults.AuthenticationScheme,
- BearerFormat = "JWT",
- In = ParameterLocation.Header,
- Description = Strings.HelpDescription_SecurityDefinitionDescription_ApiKey
- });
-
- options.AddSecurityRequirement(new OpenApiSecurityRequirement
- {
- {
- new OpenApiSecurityScheme
- {
- Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = ApiKeySecurityDefinitionName }
- },
- Array.Empty()
- }
- });
-
- options.DocumentFilter();
- options.DocumentFilter();
- options.DocumentFilter();
-
- options.OperationFilter();
- options.OperationFilter();
- options.OperationFilter();
- options.OperationFilter();
-
- var documentationFile = $"{typeof(DiagController).Assembly.GetName().Name}.xml";
- var documentationPath = Path.Combine(AppContext.BaseDirectory, documentationFile);
- options.IncludeXmlComments(documentationPath);
- });
+ services.AddSwaggerGen(options => options.ConfigureMonitorSwaggerGen());
})
.Build();
diff --git a/src/Tools/dotnet-monitor/Commands/CollectCommandHandler.cs b/src/Tools/dotnet-monitor/Commands/CollectCommandHandler.cs
index ec8ceed7dbb..6c9a122d22f 100644
--- a/src/Tools/dotnet-monitor/Commands/CollectCommandHandler.cs
+++ b/src/Tools/dotnet-monitor/Commands/CollectCommandHandler.cs
@@ -6,6 +6,7 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Diagnostics.Monitoring;
using Microsoft.Diagnostics.Monitoring.WebApi;
+using Microsoft.Diagnostics.Tools.Monitor.Swagger;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
@@ -137,6 +138,12 @@ private static IHostBuilder Configure(this IHostBuilder builder, AuthConfigurati
services.AddSingleton();
}
+ services.AddSwaggerGen(options =>
+ {
+ options.ConfigureMonitorSwaggerGen();
+ options.ConfigureMonitorSwaggerGenSecurity();
+ });
+
services.ConfigureDiagnosticPort(context.Configuration);
services.AddSingleton();
diff --git a/src/Tools/dotnet-monitor/Startup.cs b/src/Tools/dotnet-monitor/Startup.cs
index 61456611574..9f7b82e3dae 100644
--- a/src/Tools/dotnet-monitor/Startup.cs
+++ b/src/Tools/dotnet-monitor/Startup.cs
@@ -81,6 +81,7 @@ public static void Configure(IApplicationBuilder app, IWebHostEnvironment env, I
app.UseHsts();
}
+ app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "dotnet-monitor v1.0");
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/BadRequestResponseDocumentFilter.cs b/src/Tools/dotnet-monitor/Swagger/Filters/BadRequestResponseDocumentFilter.cs
similarity index 95%
rename from src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/BadRequestResponseDocumentFilter.cs
rename to src/Tools/dotnet-monitor/Swagger/Filters/BadRequestResponseDocumentFilter.cs
index d4948d002fd..6039d889ef2 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/BadRequestResponseDocumentFilter.cs
+++ b/src/Tools/dotnet-monitor/Swagger/Filters/BadRequestResponseDocumentFilter.cs
@@ -6,7 +6,7 @@
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
-namespace Microsoft.Diagnostics.Monitoring.OpenApiGen
+namespace Microsoft.Diagnostics.Tools.Monitor.Swagger.Filters
{
///
/// Adds an BadRequestResponse response component to the document.
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/BadRequestResponseOperationFilter.cs b/src/Tools/dotnet-monitor/Swagger/Filters/BadRequestResponseOperationFilter.cs
similarity index 94%
rename from src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/BadRequestResponseOperationFilter.cs
rename to src/Tools/dotnet-monitor/Swagger/Filters/BadRequestResponseOperationFilter.cs
index 334d65600ed..1c21b56e58c 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/BadRequestResponseOperationFilter.cs
+++ b/src/Tools/dotnet-monitor/Swagger/Filters/BadRequestResponseOperationFilter.cs
@@ -4,7 +4,7 @@
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
-namespace Microsoft.Diagnostics.Monitoring.OpenApiGen
+namespace Microsoft.Diagnostics.Tools.Monitor.Swagger.Filters
{
///
/// Clears all content of the 400 response and adds a reference to the
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/RemoveFailureContentTypesOperationFilter.cs b/src/Tools/dotnet-monitor/Swagger/Filters/RemoveFailureContentTypesOperationFilter.cs
similarity index 93%
rename from src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/RemoveFailureContentTypesOperationFilter.cs
rename to src/Tools/dotnet-monitor/Swagger/Filters/RemoveFailureContentTypesOperationFilter.cs
index 45dd06d5164..ff8a00784e8 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/RemoveFailureContentTypesOperationFilter.cs
+++ b/src/Tools/dotnet-monitor/Swagger/Filters/RemoveFailureContentTypesOperationFilter.cs
@@ -6,7 +6,7 @@
using Swashbuckle.AspNetCore.SwaggerGen;
using System.Collections.Generic;
-namespace Microsoft.Diagnostics.Monitoring.OpenApiGen
+namespace Microsoft.Diagnostics.Tools.Monitor.Swagger.Filters
{
///
/// Removes failure content types (e.g. application/problem+json) from success operations.
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/TooManyRequestsResponseDocumentFilter.cs b/src/Tools/dotnet-monitor/Swagger/Filters/TooManyRequestsResponseDocumentFilter.cs
similarity index 95%
rename from src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/TooManyRequestsResponseDocumentFilter.cs
rename to src/Tools/dotnet-monitor/Swagger/Filters/TooManyRequestsResponseDocumentFilter.cs
index 3786991f0bb..6fcefacf981 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/TooManyRequestsResponseDocumentFilter.cs
+++ b/src/Tools/dotnet-monitor/Swagger/Filters/TooManyRequestsResponseDocumentFilter.cs
@@ -6,7 +6,7 @@
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
-namespace Microsoft.Diagnostics.Monitoring.OpenApiGen
+namespace Microsoft.Diagnostics.Tools.Monitor.Swagger.Filters
{
internal sealed class TooManyRequestsResponseDocumentFilter : IDocumentFilter
{
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/TooManyRequestsResponseOperationFilter.cs b/src/Tools/dotnet-monitor/Swagger/Filters/TooManyRequestsResponseOperationFilter.cs
similarity index 93%
rename from src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/TooManyRequestsResponseOperationFilter.cs
rename to src/Tools/dotnet-monitor/Swagger/Filters/TooManyRequestsResponseOperationFilter.cs
index 342994728d3..eb57e961d6d 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/TooManyRequestsResponseOperationFilter.cs
+++ b/src/Tools/dotnet-monitor/Swagger/Filters/TooManyRequestsResponseOperationFilter.cs
@@ -4,7 +4,7 @@
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
-namespace Microsoft.Diagnostics.Monitoring.OpenApiGen
+namespace Microsoft.Diagnostics.Tools.Monitor.Swagger.Filters
{
internal sealed class TooManyRequestsResponseOperationFilter : IOperationFilter
{
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/UnauthorizedResponseDocumentFilter.cs b/src/Tools/dotnet-monitor/Swagger/Filters/UnauthorizedResponseDocumentFilter.cs
similarity index 94%
rename from src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/UnauthorizedResponseDocumentFilter.cs
rename to src/Tools/dotnet-monitor/Swagger/Filters/UnauthorizedResponseDocumentFilter.cs
index dc6b25e3a65..58267696f22 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/UnauthorizedResponseDocumentFilter.cs
+++ b/src/Tools/dotnet-monitor/Swagger/Filters/UnauthorizedResponseDocumentFilter.cs
@@ -4,7 +4,7 @@
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
-namespace Microsoft.Diagnostics.Monitoring.OpenApiGen
+namespace Microsoft.Diagnostics.Tools.Monitor.Swagger.Filters
{
///
/// Adds an UnauthorizedResponse response component to the document.
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/UnauthorizedResponseOperationFilter.cs b/src/Tools/dotnet-monitor/Swagger/Filters/UnauthorizedResponseOperationFilter.cs
similarity index 94%
rename from src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/UnauthorizedResponseOperationFilter.cs
rename to src/Tools/dotnet-monitor/Swagger/Filters/UnauthorizedResponseOperationFilter.cs
index 171af2bad3e..c9542c3a87c 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/UnauthorizedResponseOperationFilter.cs
+++ b/src/Tools/dotnet-monitor/Swagger/Filters/UnauthorizedResponseOperationFilter.cs
@@ -4,7 +4,7 @@
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
-namespace Microsoft.Diagnostics.Monitoring.OpenApiGen
+namespace Microsoft.Diagnostics.Tools.Monitor.Swagger.Filters
{
///
/// Clears all content of the 401 response and adds a reference to the
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/ResponseNames.cs b/src/Tools/dotnet-monitor/Swagger/ResponseNames.cs
similarity index 89%
rename from src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/ResponseNames.cs
rename to src/Tools/dotnet-monitor/Swagger/ResponseNames.cs
index 92847a5f2eb..8dfa5710382 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/ResponseNames.cs
+++ b/src/Tools/dotnet-monitor/Swagger/ResponseNames.cs
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-namespace Microsoft.Diagnostics.Monitoring.OpenApiGen
+namespace Microsoft.Diagnostics.Tools.Monitor.Swagger
{
internal static class ResponseNames
{
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/StatusCodeStrings.cs b/src/Tools/dotnet-monitor/Swagger/StatusCodeStrings.cs
similarity index 92%
rename from src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/StatusCodeStrings.cs
rename to src/Tools/dotnet-monitor/Swagger/StatusCodeStrings.cs
index 1d923515d7c..3ccc27573d5 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/StatusCodeStrings.cs
+++ b/src/Tools/dotnet-monitor/Swagger/StatusCodeStrings.cs
@@ -4,7 +4,7 @@
using Microsoft.AspNetCore.Http;
using System.Globalization;
-namespace Microsoft.Diagnostics.Monitoring.OpenApiGen
+namespace Microsoft.Diagnostics.Tools.Monitor.Swagger
{
internal static class StatusCodeStrings
{
diff --git a/src/Tools/dotnet-monitor/Swagger/SwaggerGenOptionsExtensions.cs b/src/Tools/dotnet-monitor/Swagger/SwaggerGenOptionsExtensions.cs
new file mode 100644
index 00000000000..4bc6d430205
--- /dev/null
+++ b/src/Tools/dotnet-monitor/Swagger/SwaggerGenOptionsExtensions.cs
@@ -0,0 +1,60 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using Microsoft.AspNetCore.Authentication.JwtBearer;
+using Microsoft.Diagnostics.Monitoring.WebApi.Controllers;
+using Microsoft.Diagnostics.Tools.Monitor.Swagger.Filters;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Net.Http.Headers;
+using Microsoft.OpenApi.Models;
+using Swashbuckle.AspNetCore.SwaggerGen;
+using System;
+using System.IO;
+
+namespace Microsoft.Diagnostics.Tools.Monitor.Swagger
+{
+ internal static class SwaggerGenOptionsExtensions
+ {
+ public static void ConfigureMonitorSwaggerGen(this SwaggerGenOptions options)
+ {
+ options.DocumentFilter();
+ options.DocumentFilter();
+ options.DocumentFilter();
+
+ options.OperationFilter();
+ options.OperationFilter();
+ options.OperationFilter();
+ options.OperationFilter();
+
+ string documentationFile = $"{typeof(DiagController).Assembly.GetName().Name}.xml";
+ string documentationPath = Path.Combine(AppContext.BaseDirectory, documentationFile);
+ options.IncludeXmlComments(documentationPath);
+ }
+
+ public static void ConfigureMonitorSwaggerGenSecurity(this SwaggerGenOptions options)
+ {
+ const string ApiKeySecurityDefinitionName = "ApiKeyAuth";
+
+ options.AddSecurityDefinition(ApiKeySecurityDefinitionName, new OpenApiSecurityScheme
+ {
+ Name = HeaderNames.Authorization,
+ Type = SecuritySchemeType.ApiKey,
+ Scheme = JwtBearerDefaults.AuthenticationScheme,
+ BearerFormat = "JWT",
+ In = ParameterLocation.Header,
+ Description = Strings.HelpDescription_SecurityDefinitionDescription_ApiKey
+ });
+
+ options.AddSecurityRequirement(new OpenApiSecurityRequirement
+ {
+ {
+ new OpenApiSecurityScheme
+ {
+ Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = ApiKeySecurityDefinitionName }
+ },
+ Array.Empty()
+ }
+ });
+ }
+ }
+}
diff --git a/src/Tools/dotnet-monitor/dotnet-monitor.csproj b/src/Tools/dotnet-monitor/dotnet-monitor.csproj
index 23413c41719..874417704e0 100644
--- a/src/Tools/dotnet-monitor/dotnet-monitor.csproj
+++ b/src/Tools/dotnet-monitor/dotnet-monitor.csproj
@@ -9,7 +9,7 @@
false
false
-
+
@@ -19,6 +19,7 @@
+
@@ -44,7 +45,7 @@
-
+
True
From a4f5a99550f93265c126a23244ed59629d7e5d00 Mon Sep 17 00:00:00 2001
From: Justin Anderson
Date: Mon, 13 Feb 2023 09:19:01 -0800
Subject: [PATCH 56/61] Fix GetBuildVersion script (#3660)
---
eng/release/Scripts/GetBuildVersion.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/release/Scripts/GetBuildVersion.ps1 b/eng/release/Scripts/GetBuildVersion.ps1
index e0886f31295..1d3204ee20f 100644
--- a/eng/release/Scripts/GetBuildVersion.ps1
+++ b/eng/release/Scripts/GetBuildVersion.ps1
@@ -19,7 +19,7 @@ Write-Verbose 'ReleaseData:'
$releaseDataJson = $releaseData | ConvertTo-Json
Write-Verbose $releaseDataJson
-[array]$matchingData = $releaseData | Where-Object { $_.name -match '.nupkg.buildversion$' }
+[array]$matchingData = $releaseData | Where-Object { $_.name -match '.nupkg.buildversion$' -and $_.nonShipping -ieq 'false' }
if ($matchingData.Length -ne 1) {
Write-Error 'Unable to obtain build version.'
From 0bbbb96a3960d3615e9cea289207bcc6bbfd1396 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Feb 2023 10:04:16 -0800
Subject: [PATCH 57/61] [main] Bump Microsoft.IdentityModel.Tokens in
/eng/dependabot (#3592)
Bumps [Microsoft.IdentityModel.Tokens](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) from 6.26.0 to 6.26.1.
- [Release notes](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases)
- [Changelog](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/compare/6.26.0...v6.26.1)
---
updated-dependencies:
- dependency-name: Microsoft.IdentityModel.Tokens
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
eng/dependabot/Versions.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/dependabot/Versions.props b/eng/dependabot/Versions.props
index ee702ccf5e2..182a4abd622 100644
--- a/eng/dependabot/Versions.props
+++ b/eng/dependabot/Versions.props
@@ -10,7 +10,7 @@
7.0.0
7.0.0
7.0.0
- 6.26.0
+ 6.26.1
1.6.0
4.3.2
5.0.0
From dadaaa9a96edfc2ca45690596a3344560f705000 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Feb 2023 10:05:15 -0800
Subject: [PATCH 58/61] [main] Bump Azure.Identity from 1.8.1 to 1.8.2 in
/eng/dependabot (#3618)
Bumps [Azure.Identity](https://github.com/Azure/azure-sdk-for-net) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/Azure/azure-sdk-for-net/releases)
- [Commits](https://github.com/Azure/azure-sdk-for-net/compare/Azure.Identity_1.8.1...Azure.Identity_1.8.2)
---
updated-dependencies:
- dependency-name: Azure.Identity
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
eng/dependabot/Versions.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/dependabot/Versions.props b/eng/dependabot/Versions.props
index 182a4abd622..1fba04a0076 100644
--- a/eng/dependabot/Versions.props
+++ b/eng/dependabot/Versions.props
@@ -2,7 +2,7 @@
- 1.8.1
+ 1.8.2
12.14.1
12.12.0
7.0.0
From 08d7d74ad79d22f12e32c253d9591c1733f0286d Mon Sep 17 00:00:00 2001
From: Justin Anderson
Date: Mon, 13 Feb 2023 10:49:25 -0800
Subject: [PATCH 59/61] Use MergeManifest to lookup build version (#3661)
---
eng/release/Scripts/GetBuildVersion.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/release/Scripts/GetBuildVersion.ps1 b/eng/release/Scripts/GetBuildVersion.ps1
index 1d3204ee20f..2fa5941a61c 100644
--- a/eng/release/Scripts/GetBuildVersion.ps1
+++ b/eng/release/Scripts/GetBuildVersion.ps1
@@ -19,7 +19,7 @@ Write-Verbose 'ReleaseData:'
$releaseDataJson = $releaseData | ConvertTo-Json
Write-Verbose $releaseDataJson
-[array]$matchingData = $releaseData | Where-Object { $_.name -match '.nupkg.buildversion$' -and $_.nonShipping -ieq 'false' }
+[array]$matchingData = $releaseData | Where-Object { $_.name -match 'MergedManifest.xml$' -and $_.nonShipping -ieq 'true' }
if ($matchingData.Length -ne 1) {
Write-Error 'Unable to obtain build version.'
From 3e9499fb6676cffb4c436834ffebaab18098d507 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Feb 2023 11:04:17 -0800
Subject: [PATCH 60/61] [main] Bump Microsoft.OpenApi.Readers from 1.6.0 to
1.6.1 in /eng/dependabot (#3655)
* [main] Bump Microsoft.OpenApi.Readers in /eng/dependabot
Bumps [Microsoft.OpenApi.Readers](https://github.com/Microsoft/OpenAPI.NET) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Microsoft/OpenAPI.NET/releases)
- [Commits](https://github.com/Microsoft/OpenAPI.NET/compare/1.6.0...1.6.1)
---
updated-dependencies:
- dependency-name: Microsoft.OpenApi.Readers
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
* Update Versions.props
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Justin Anderson
---
eng/dependabot/Versions.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/dependabot/Versions.props b/eng/dependabot/Versions.props
index 1fba04a0076..d4d721d5928 100644
--- a/eng/dependabot/Versions.props
+++ b/eng/dependabot/Versions.props
@@ -11,7 +11,7 @@
7.0.0
7.0.0
6.26.1
- 1.6.0
+ 1.6.1
4.3.2
5.0.0
From 540ab30c4ec26d26acf88ae634febde047201541 Mon Sep 17 00:00:00 2001
From: Justin Anderson
Date: Mon, 13 Feb 2023 13:38:28 -0800
Subject: [PATCH 61/61] Add 3P signing entries for Swashbuckle (#3666)
---
eng/Signing.props | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eng/Signing.props b/eng/Signing.props
index a00e9db071a..699b16dfc98 100644
--- a/eng/Signing.props
+++ b/eng/Signing.props
@@ -4,6 +4,8 @@
+
+