Skip to content

Commit 5e59fa4

Browse files
nohwnddotnet-maestro[bot]Sanan07jakubch1cvpoienaru
authored
Update from 16.8 (#2588)
* Hide -release in console * Add param block * Match on whole branch name * Set var * Change assertion * Trim version * Update dependencies from https://github.com/dotnet/arcade build 20200602.3 (#2456) Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild From Version 5.0.0-beta.20052.1 -> To Version 1.0.0-beta.20302.3 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update feeds * Revert to previous dotnet version * Added new exception handling (#2461) * Test space added * Exception handler was added to catch AccessDeniedException while trying to create TestResults folder * Remove unnecessary space * Deleted unnecessary test. Changed console message and corrected folder path in that message * Remove unnecessary dot * Removed unnecessary lines and usings and coreccted exception message * Removed unnecessary line * Updating resource files * New exception handling was added * Formatted exception message * Adding test run attachments processing (#2463) * v1 * Merging v1 * Rename to MultiTestRunsFinalization * New version * More changes * More changes * Next changes * Fix * test * More changes * Dmc chagnes * next * small changes * compiled * More changes * acceptance tests green * Review comments #1 * Resolving more comments * Tests for design mode client * Tests for events handler * revert not related changes * More changes * Compiling OK, tests OK * Unit tests for manager * More changes * More tests * tests for reqeust sender * more tests * Tests for cancelling * Acceptance tests done * Remove not used stuff * Fix comments * Fix race condition in test * Fix another race condition * Fix converting to xml * fix next test * fix test * Next changes * Review changes #1 * Fixing multi test finalization manager tests * Fixes * Fix last unit test * Fix acceptance tests * Progress feature, compiling + unit tests * acceptance tests changes * More changes * Fixing resources accesability * Fix test * Fix race conditions in acceptance tests * RFC changes merged * Log warning in case of unexpected message id * Fix spelling * Additional comment * Restore some stuff in interfaces * Big renaming * Added processingSettings * Fix naming * Move explanation to <remarks> * Add environment variables to enable MacOS dump * Fixed code coverage compatibility issue (#2527) Fixed code coverage compatibility issue * Print version of the product in log (#2535) * Trigger dumps asynchronously (#2533) * Run each dump in a task in netclient dumper * More reasonable timeout * Revert "Trigger dumps asynchronously (#2533)" (#2541) This reverts commit 3454261. * Remove env variables * Remove sleeps and extra process dumps from blame * Fix blame parameter, warning, and add all testhosts to be ngend (#2579) * Forward merge fixes from master to rc2 (#2581) * Avoid logging >Task returned false but did not log an error.< (#2557) * Avoid logging >Task returned false but did not log an error.< on test failure * Add VSTEST_BUILD_DEBUG env var * Using namespaces * Invert the switch because it will be still backwards in the final release * Use bitness from process or OS (#2571) * Do not force .NET4.5 in case legacy test settings are provided (#2545) * Do not force .NET4.5 in case legacy test settings are provided * Net core app * Fix runconfig * Default platform * Generate release notes in pipeline * Fix release-notes-script Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Sanan Yuzbashiyev <[email protected]> Co-authored-by: Jakub Chocholowicz <[email protected]> Co-authored-by: Codrin-Victor Poienaru <[email protected]>
1 parent a319f62 commit 5e59fa4

File tree

8 files changed

+445
-27
lines changed

8 files changed

+445
-27
lines changed

scripts/write-release-notes.ps1

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
[CmdletBinding()]
2+
param
3+
(
4+
[string] $Path = ".",
5+
# if this is a pre-release or stable version
6+
[switch] $Stable,
7+
# externally provide the version number we will use
8+
[string] $PackageVersion,
9+
# in CI we don't know the end tag, so we diff till the current commit
10+
[switch] $EndWithLatestCommit
11+
)
12+
13+
if ($EndWithLatestCommit -and [string]::IsNullOrWhiteSpace($PackageVersion)) {
14+
throw "EndWithLatestCommit was enabled, provide PackageVersion in this format 16.8.0-preview-20200924-01, or this format 16.8.0."
15+
}
16+
17+
$repoUrl = $(if ((git -C $Path remote -v) -match "upstream") {
18+
git -C $Path remote get-url --push upstream
19+
}
20+
else {
21+
git -C $Path remote get-url --push origin
22+
})-replace "\.git$"
23+
24+
# list all tags on this branch ordered by creator date to get the latest, stable or pre-release tag.
25+
# For stable release we choose only tags without any dash, for pre-release we choose all tags.
26+
$tags = git -C $Path tag -l --sort=creatordate | Where-Object { $_ -match "v\d+\.\d+\.\d+.*" -and (-not $Stable -or $_ -notlike '*-*') }
27+
28+
if ($EndWithLatestCommit) {
29+
# in CI we don't have the tag yet, so we show changes between the most recent tag, and this commit
30+
# we figure out the tag from the package version that is set by vsts-prebuild
31+
$start = $tags | Select-Object -Last 1
32+
$end = git -C $Path rev-parse HEAD
33+
$tag = "v$PackageVersion"
34+
}
35+
else {
36+
# normally we show changes between the latest two tags
37+
$start, $end = $tags | Select-Object -Last 2
38+
$tag = $end
39+
}
40+
41+
# # override the tags to use if you need
42+
# $start = "v16.8.0-preview-20200812-03"
43+
# $end = $tag = "v16.8.0-preview-20200921-01"
44+
45+
46+
Write-Host "Generating release notes for $start..$end$(if ($EndWithLatestCommit) { " (expected tag: $tag)" })"
47+
48+
$sourceBranch = $branch = git -C $Path rev-parse --abbrev-ref HEAD
49+
if ($sourceBranch -eq "HEAD") {
50+
# when CI checks out just the single commit, https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml
51+
$sourceBranch = $env:BUILD_SOURCEBRANCH -replace "^refs/heads/"
52+
}
53+
54+
if ([string]::IsNullOrWhiteSpace($branch)) {
55+
throw "Branch is null or empty!"
56+
}
57+
58+
if ([string]::IsNullOrWhiteSpace($sourceBranch)) {
59+
throw "SourceBranch is null or empty!"
60+
}
61+
62+
Write-Host "Branch is $branch"
63+
Write-Host "SourceBranch is $sourceBranch"
64+
$branchesWithStartTag = git -C $Path branch --contains tags/$start
65+
66+
if (-not $branchesWithStartTag -or -not ($branchesWithStartTag -match $branch)) {
67+
Write-Host "This branch $branch$(if($branch -ne $sourceBranch){" ($sourceBranch)"}), does not contain the starting tag $start. Skipping generating release notes."
68+
if ($branchesWithStartTag) {
69+
Write-Host "The tag is present on branches:`n$($branchesWithStartTag)."
70+
}
71+
return
72+
}
73+
else {
74+
Write-Host "Branch $branch$(if($branch -ne $sourceBranch){" ($sourceBranch)"}) has tag $start, getting log since that."
75+
}
76+
77+
$prUrl = "$repoUrl/pull/"
78+
$v = $tag -replace '^v'
79+
$b = if ($Stable) { $v } else { $tag -replace '.*?(\d+-\d+)$', '$1' }
80+
# using .. because I want to know the changes that are on this branch, but don't care about the changes that I don't have https://stackoverflow.com/a/24186641/3065397
81+
$log = (git -C $Path log "$start..$end" --oneline --pretty="format:%s" --first-parent)
82+
$issues = $log | ForEach-Object {
83+
if ($_ -match '^(?<message>.+)\s\(#(?<pr>\d+)\)?$') {
84+
$message = "* $($matches.message)"
85+
if ($matches.pr) {
86+
$pr = $matches.pr
87+
$message += " [#$pr]($prUrl$pr)"
88+
}
89+
90+
$message
91+
}
92+
else
93+
{
94+
"* $_"
95+
}
96+
}
97+
98+
$output = @"
99+
100+
See the release notes [here](https://github.com/microsoft/vstest-docs/blob/master/docs/releases.md#$($v -replace '\.')).
101+
102+
-------------------------------
103+
104+
## $v
105+
106+
### Issue Fixed
107+
$($issues -join "`n")
108+
109+
See full log [here]($repoUrl/compare/$start...$tag)
110+
111+
### Drops
112+
113+
* TestPlatform vsix: [$v](https://vsdrop.corp.microsoft.com/file/v1/Products/DevDiv/microsoft/vstest/$sourceBranch/$b;/TestPlatform.vsix)
114+
* Microsoft.TestPlatform.ObjectModel : [$v](https://www.nuget.org/packages/Microsoft.TestPlatform.ObjectModel/$v)
115+
"@
116+
117+
118+
$output
119+
$output | clip

src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ private void ValidateAndAddHangBasedProcessDumpParameters(XmlElement collectDump
348348

349349
break;
350350

351+
// allow HangDumpType attribute to be used on the hang dump this is the prefered way
351352
case XmlAttribute attribute when string.Equals(attribute.Name, Constants.HangDumpTypeKey, StringComparison.OrdinalIgnoreCase):
352353

353354
if (string.Equals(attribute.Value, Constants.FullConfigurationValue, StringComparison.OrdinalIgnoreCase) || string.Equals(attribute.Value, Constants.MiniConfigurationValue, StringComparison.OrdinalIgnoreCase))
@@ -361,6 +362,20 @@ private void ValidateAndAddHangBasedProcessDumpParameters(XmlElement collectDump
361362

362363
break;
363364

365+
// allow DumpType attribute to be used on the hang dump for backwards compatibility
366+
case XmlAttribute attribute when string.Equals(attribute.Name, Constants.DumpTypeKey, StringComparison.OrdinalIgnoreCase):
367+
368+
if (string.Equals(attribute.Value, Constants.FullConfigurationValue, StringComparison.OrdinalIgnoreCase) || string.Equals(attribute.Value, Constants.MiniConfigurationValue, StringComparison.OrdinalIgnoreCase))
369+
{
370+
this.processFullDumpEnabled = string.Equals(attribute.Value, Constants.FullConfigurationValue, StringComparison.OrdinalIgnoreCase);
371+
}
372+
else
373+
{
374+
this.logger.LogWarning(this.context.SessionDataCollectionContext, string.Format(CultureInfo.CurrentUICulture, Resources.Resources.BlameParameterValueIncorrect, attribute.Name, Constants.FullConfigurationValue, Constants.MiniConfigurationValue));
375+
}
376+
377+
break;
378+
364379
default:
365380

366381
this.logger.LogWarning(this.context.SessionDataCollectionContext, string.Format(CultureInfo.CurrentUICulture, Resources.Resources.BlameParameterKeyIncorrect, blameAttribute.Name));
@@ -454,7 +469,7 @@ private void SessionEndedHandler(object sender, SessionEndEventArgs args)
454469
{
455470
try
456471
{
457-
var dumpFiles = this.processDumpUtility.GetDumpFiles();
472+
var dumpFiles = this.processDumpUtility.GetDumpFiles(warnOnNoDumpFiles: this.collectDumpAlways);
458473
foreach (var dumpFile in dumpFiles)
459474
{
460475
if (!string.IsNullOrEmpty(dumpFile))

src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Interfaces/IProcessDumpUtility.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ public interface IProcessDumpUtility
1111
/// <summary>
1212
/// Get generated dump files
1313
/// </summary>
14+
/// <param name="warnOnNoDumpFiles">Writes warning when no dump file is found.</param>
1415
/// <returns>
1516
/// Path of dump file
1617
/// </returns>
17-
IEnumerable<string> GetDumpFiles();
18+
IEnumerable<string> GetDumpFiles(bool warnOnNoDumpFiles = true);
1819

1920
/// <summary>
2021
/// Launch proc dump process

src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcessDumpUtility.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public ProcessDumpUtility(IProcessHelper processHelper, IFileHelper fileHelper,
5151
};
5252

5353
/// <inheritdoc/>
54-
public IEnumerable<string> GetDumpFiles()
54+
public IEnumerable<string> GetDumpFiles(bool warnOnNoDumpFiles = true)
5555
{
5656
if (!this.wasHangDumped)
5757
{
@@ -82,7 +82,7 @@ public IEnumerable<string> GetDumpFiles()
8282
}
8383
}
8484

85-
if (!foundDumps.Any())
85+
if (warnOnNoDumpFiles && !foundDumps.Any())
8686
{
8787
EqtTrace.Error($"ProcessDumpUtility.GetDumpFile: Could not find any dump file in {this.hangDumpDirectory}.");
8888
throw new FileNotFoundException(Resources.Resources.DumpFileNotGeneratedErrorMessage);

src/Microsoft.TestPlatform.Extensions.BlameDataCollector/WindowsHangDumper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public WindowsHangDumper(Action<string> logWarning)
2727
public void Dump(int processId, string outputDirectory, DumpTypeOption type)
2828
{
2929
var process = Process.GetProcessById(processId);
30-
var processTree = process.GetProcessTree();
30+
var processTree = process.GetProcessTree().Where(p => p.Process.ProcessName != "conhost" && p.Process.ProcessName != "WerFault").ToList();
3131

3232
if (processTree.Count > 1)
3333
{

src/package/VSIXProject/TestPlatform.csproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,22 @@
238238

239239
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.exe" Ngen="true" NgenArchitecture="X64" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.exe" />
240240
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.x86.exe" Ngen="true" NgenArchitecture="X86" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.x86.exe" />
241+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net452.exe" Ngen="true" NgenArchitecture="X64" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net452.exe" />
242+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net452.x86.exe" Ngen="true" NgenArchitecture="X86" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net452.x86.exe" />
243+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net46.exe" Ngen="true" NgenArchitecture="X64" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net46.exe" />
244+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net46.x86.exe" Ngen="true" NgenArchitecture="X86" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net46.x86.exe" />
245+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net461.exe" Ngen="true" NgenArchitecture="X64" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net461.exe" />
246+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net461.x86.exe" Ngen="true" NgenArchitecture="X86" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net461.x86.exe" />
247+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net462.exe" Ngen="true" NgenArchitecture="X64" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net462.exe" />
248+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net462.x86.exe" Ngen="true" NgenArchitecture="X86" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net462.x86.exe" />
249+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net47.exe" Ngen="true" NgenArchitecture="X64" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net47.exe" />
250+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net47.x86.exe" Ngen="true" NgenArchitecture="X86" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net47.x86.exe" />
251+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net471.exe" Ngen="true" NgenArchitecture="X64" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net471.exe" />
252+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net471.x86.exe" Ngen="true" NgenArchitecture="X86" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net471.x86.exe" />
253+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net472.exe" Ngen="true" NgenArchitecture="X64" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net472.exe" />
254+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net472.x86.exe" Ngen="true" NgenArchitecture="X86" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net472.x86.exe" />
255+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net48.exe" Ngen="true" NgenArchitecture="X64" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net48.exe" />
256+
<VsixSourceItem Update="$(VsixInputFileLocation)\testhost.net48.x86.exe" Ngen="true" NgenArchitecture="X86" NgenPriority="2" NgenApplication="$(ExtensionInstallationRelativeToVS)\testhost.net48.x86.exe" />
241257
</ItemGroup>
242258
<ItemGroup>
243259
<Content Include="License.rtf">

0 commit comments

Comments
 (0)