From c899055642d8574a142f2390ac83b97eb5505f29 Mon Sep 17 00:00:00 2001 From: "dellgil\\Stephen.Gillie" Date: Fri, 7 Jun 2024 21:00:20 -0700 Subject: [PATCH] 6-7 weekly --- Tools/ExitCodes.csv | 21 +++++-- Tools/ManualValidationPipeline.cs | 94 +++++++++++++++++------------- Tools/ManualValidationPipeline.ps1 | 17 +++--- Tools/Review.csv | 2 +- 4 files changed, 79 insertions(+), 55 deletions(-) diff --git a/Tools/ExitCodes.csv b/Tools/ExitCodes.csv index f830d1c95d4b2..d4f22f316ff6a 100644 --- a/Tools/ExitCodes.csv +++ b/Tools/ExitCodes.csv @@ -14,7 +14,7 @@ Code, Message -2145844845,Forbidden (403). -2146232576,Dependency on `WindowsFeatues`, specifically `netfx3`. -2147012867,Network or Firewall Error. --2147012894,ERROR_INTERNET_TIMEOUT +-2147012894,The operation timed out. -2147450749,Missing dependency on `Microsoft.DotNet.DesktopRuntime.8`. -532459699,Unhandled exception in .NET application. -532462766,EXCEPTION_COMPLUS (Unhandled Exception) @@ -23,11 +23,15 @@ Code, Message 0x80070057,The parameter is incorrect. 0x800700d8,This version of this application is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher. (Should this have `Architecture: x64`?) 0x80070424,The specified service does not exist as an installed service. -0x80072EE2,ERROR_INTERNET_TIMEOUT +0x80072EE2,The operation timed out. +0x80072EFD,The operation timed out. +0x80072EFE,The operation timed out. +0x80D02002,The operation timed out. 0x80072F76,Network or Firewall Error. 0x80190193,Forbidden (403) 0x80190194,Not found (404). 0x81F40001,Bundle condition evaluated to false. (Possibly `Microsoft.VCRedist.2015+.` with the wrong architecture.) +0x8A150003,Executing command failed (APPINSTALLER_CLI_ERROR_COMMAND_FAILED). 0x8A150104,This package has a dependency missing from your system. (APPINSTALLER_CLI_ERROR_INSTALL_MISSING_DEPENDENCY) (The most common dependency is `Microsoft.VCRedist.2015+.x64` / `.x86`) 0xC0000017,Not enough virtual memory is available. (VM ran out of RAM) 0xC00000FD,Stack overflow / exhaustion. @@ -41,9 +45,8 @@ Code, Message 1618,install In Progress. 1623,System Not Supported. Does this manifest have `Architecture: x86`? It might need to be `x64`. 1625,Blocked By Policy. -1628,invalidParameter -1633,System Not Supported. Does this manifest have `Architecture: x86`? It might need to be `x64`. -1638,alreadyInstalled +1628,Invalid Parameter. Double-check the installer switches. +1638,`alreadyInstalled` - does this package's UpgradeBehavior need to be modified? 1639,Invalid Parameter. Double-check the installer switches. 1641,Reboot Initiated. 1640,Blocked By Policy. @@ -56,6 +59,13 @@ Code, Message 2147942402,File not found. 2147954550,Network or Firewall Error. 2147958003,Error Installing Dependency - Windows cannot install this package because it depends on a framework (version) that could not be found. +2147954402,The operation timed out. +2147954429,A connection with the server could not be established. +2147954407,The server name or address could not be resolved. +2148086027,ASN1 bad tag value met. +2149122451,Forbidden (403). +2149122455,Proxy authentication required (407). +2149122449,Unauthorized (401). 3010,Install successful but system restart may be required. Should this be add as an `InstallerSuccessCode` or similar? 3221225477,Converted to hexadecimal (0xC0000005) possibly [Access Violation](https://learn.microsoft.com/en-us/shows/inside/access-violation-c0000005-execute). (This is occasionally seen in PRs, despite the install otherwise being successful. Should it be added as an `InstallerSuccessCode` or similar here?) 3221225495,Not enough virtual memory is available. (VM ran out of RAM) @@ -64,3 +74,4 @@ Code, Message 3221225794,The application failed to initialize properly - does this package require `ElevationRequirement: elevationRequired`? 3221226505,Stack overflow / exhaustion. 3762507597,Unhandled exception in .NET application. +autopf64,Application is 64-bit only. Does this manifest have `Architecture: x86`? It might need to be `x64`. diff --git a/Tools/ManualValidationPipeline.cs b/Tools/ManualValidationPipeline.cs index 281e5d7147c37..59b0dd60a13af 100644 --- a/Tools/ManualValidationPipeline.cs +++ b/Tools/ManualValidationPipeline.cs @@ -145,7 +145,7 @@ 17. Status bar (pending) namespace WinGetApprovalNamespace { public class WinGetApprovalPipeline : Form { //vars - public int build = 901;//Get-RebuildPipeApp + public int build = 907;//Get-RebuildPipeApp public string appName = "WinGetApprovalPipeline"; public string appTitle = "WinGet Approval Pipeline - Build "; public static string owner = "microsoft"; @@ -1197,37 +1197,47 @@ public void PRWatch(bool noNew, string Chromatic = "Default", string LogFile = " */ string replyType = ""; - int entryType = 0; + AnF = ""; foreach (string Entry in AppsAndFeaturesEntriesList) { + string replyString = "un"; + int entryType = 0; if (Entry == "DisplayName") { + replyString = "dn"; } else if (Entry == "DisplayVersion") { - entryType = 1; - } else if (Entry == "Publisher") { + replyString = "dv"; + // entryType = 1; + // } else if (Entry == "InstallerType") { + // replyString = "it"; + // } else if (Entry == "Publisher") { + // replyString = "pu"; } else if (Entry == "ProductCode") { + replyString = "pc"; } else if (Entry == "UpgradeCode") { + replyString = "uc"; } - + bool ANFOld = ManifestEntryCheck(PackageIdentifier, ManifestVersion, Entry); bool ANFCurrent = clip.Contains(Entry); if ((ANFOld == true) && (ANFCurrent == false)) { if (entryType == 1) { - AnF = "-"; + AnF = replyString+"O-"; } replyType = "AppsAndFeaturesMissing"; } else if ((ANFOld == false) && (ANFCurrent == true)) { if (entryType == 1) { - AnF = "-"; + AnF = replyString+"C-"; } replyType = "AppsAndFeaturesNew"; //InvokeGitHubPRRequest(PR,"Post","comments","[Policy] Needs-Author-Feedback","Silent") } else if ((ANFOld == false) && (ANFCurrent == false)) { - AnF = "0"; + AnF += replyString+"0"; } else if ((ANFOld == true) && (ANFCurrent == true)) { - AnF = "1"; + AnF += replyString+"1"; }//end if ANFOld }//end foreach Entry if (replyType != "") { + // ReplyToPR(PR,replyType,Submitter,MagicLabels[30]); // AddPRToRecord(PR,"Feedback",PRTitle); } @@ -1306,6 +1316,7 @@ string to number 155031 "v576" 155918 "v0.8.0-alpha1" 156200 "V0" +156550 "dev-2024-06" */ @@ -1315,25 +1326,21 @@ string to number (PRTitle.Contains("Remove")))) {//Removal PR - if highest version in repo. if ((PRVersion == ManifestVersion) || (NumVersions == 1)) { /* - ReplyToPR(PR,"VersionCount",Submitter,"[Policy] Needs-Author-Feedback\n[Policy] Highest-Version-Remaining"); + ReplyToPR(PR,"VersionCount",Submitter,"[Policy] Needs-Author-Feedback\n[Policy] Highest-Version-Removal"); AddPRToRecord(PR,"Feedback",PRTitle); */ NumVersions = -1; } } else {//Addition PR - has more files than repo. - string GLD = "";//ListingDiff(clip .Where(n => n.SideIndicator == "<=")).installer.yaml //Ignores when a PR adds files that didn't exist before. - if ("" != GLD) { - if (GLD == "Error") { - string_ListingDiff = "E"; - } else { - string_ListingDiff = "-!"; + bool GLD =ListingDiff(clip);// //Ignores when a PR adds files that didn't exist before. + if (GLD == true) { + string_ListingDiff = "-!"; /* ReplyToPR(PR,"ListingDiff",GLD); InvokeGitHubPRRequest(PR,"Post","comments","[Policy] Needs-Author-Feedback","Silent"); AddPRToRecord(PR,"Feedback",PRTitle); */ - }//end if GLD - }//end if null + }//end if GLD }//end if PRvMan table_val.Rows[LastRow].SetField("D", string_ListingDiff); table_val.Rows[LastRow].SetField("V", NumVersions); @@ -1406,7 +1413,7 @@ public void WorkSearch(string Preset, int Days = 7) { int PR = FullPR["number"]; //Get-TrackerProgress -PR $PR $MyInvocation.MyCommand line PRs.Length //line++; - //This part is too spammy, checking Highest-Version-Remaining on every run (sometimes twice a day) for a week as the PR sits. I think this is fixed in the other version. #PendingBugfix + //This part is too spammy, checking Highest-Version-Removal on every run (sometimes twice a day) for a week as the PR sits. I think this is fixed in the other version. #PendingBugfix if((FullPR["title"].Contains("Remove")) || (FullPR["title"].Contains("Delete")) || (FullPR["title"].Contains("Automatic deletion"))){ @@ -1824,7 +1831,7 @@ public dynamic SearchGitHub(string Preset, int Page = 1,int Days = 0,bool IEDS = string Workable = "-label:Validation-Merge-Conflict+"; Workable += "-label:Unexpected-File+"; - Workable += "-label:Highest-Version-Remaining+"; + Workable += "-label:Highest-Version-Removal+"; //Composite settings; string Set1 = Common + Review1; @@ -1987,7 +1994,7 @@ public string AutoValLog(int PR){ int? BuildNumber = ADOBuildFromPR(PR); if (BuildNumber != null) { - string Url =ADOMSBaseUrl+"/ed6a5dfa-6e7f-413b-842c-8305dd9e89e6/_apis/build/builds/" + BuildNumber + "/artifacts?artifactName=InstallationVerificationLogs&api-version=7.0&%24format=zip"; + string Url =ADOMSBaseUrl+"/ed6a5dfa-6e7f-413b-842c-8305dd9e89e6/_apis/build/builds/" + BuildNumber + "/artifacts?artifactName=InstallationVerificationLogs&api-version=7.1&%24format=zip"; System.Diagnostics.Process.Start(Url);//This downloads to Windows default location, which has already been set to DestinationPath Thread.Sleep(DownloadSeconds*1000);//Sleep while download completes. @@ -3101,18 +3108,18 @@ public void ManifestAutomation(int VM = 0, int PR =0, string Arch = "", string } public List ManifestListing(string PackageIdentifier){ - List string_out = null; + List string_out = new List(); try{ - string FirstLetter = PackageIdentifier.ToLower()[0].ToString(); - string Path = PackageIdentifier.Replace(".","/"); - string Version = FindWinGetVersion(PackageIdentifier); - string Uri = GitHubApiBaseUrl+"/contents/manifests/"+FirstLetter+"/"+Path+"/"+Version+"/"; - string_out = FromJson(InvokeGitHubRequest(Uri)); + string FirstLetter = PackageIdentifier.ToLower()[0].ToString(); + string Path = PackageIdentifier.Replace(".","/"); + string Version = FindWinGetVersion(PackageIdentifier); + string Uri = GitHubApiBaseUrl+"/contents/manifests/"+FirstLetter+"/"+Path+"/"+Version+"/"; + dynamic FromGH = FromJson(InvokeGitHubRequest(Uri)); + int n = 0; - foreach (dynamic line in string_out) { - string_out[n] = line["name"]; - string_out[n] = string_out[n]; + foreach (dynamic line in FromGH) { n++; + string_out.Add(line["name"]); } } catch { string_out.Add("Error"); @@ -3120,7 +3127,7 @@ public List ManifestListing(string PackageIdentifier){ return string_out; } - public string ListingDiff(string string_PRManifest){ + public bool ListingDiff(string string_PRManifest){ string PackageIdentifier = YamlValue("PackageIdentifier", string_PRManifest.Replace("\"","")); //Get the lines from the PR manifest containing the filenames. @@ -3130,20 +3137,23 @@ public string ListingDiff(string string_PRManifest){ //Go through these and snip the PackageIdentifier, split on slashes, and get the last one. for (int i = 0; i < array_PRManifest.Length; i++) { string[] swap_array = array_PRManifest[i].Replace(PackageIdentifier+".", "").Split('/'); - array_PRManifest[i] = array_PRManifest[i].Replace(PackageIdentifier+".", "").Split('/')[swap_array.Length]; + array_PRManifest[i] = array_PRManifest[i].Replace(PackageIdentifier+".", "").Split('/')[swap_array.Length - 1]; } - string difference = ""; + bool difference = false; if (array_PRManifest.Length > 2){//If there are more than 2 files, so a full multi-part manifest and not just updating ReleaseNotes or ReleaseDate, etc. The other checks for this logic (not deletion PR,etc) are in the main Approval Watch method, so maybe this should join them. - string CurrentManifest = string.Join("\n",ManifestListing(PackageIdentifier)); + List CurrentManifest = ManifestListing(PackageIdentifier); + // string CurrentManifest = string.Join("\n",ManifestListing(PackageIdentifier)); + outBox_msg.AppendText(Environment.NewLine + "CurrentManifest: " + CurrentManifest); //Gather the lines from the newest manifest in repo. Counterpart to the above section. - if (CurrentManifest == "Error") { + // if (CurrentManifest == "Error") { //If CurrentManifest didn't get any results, (no newest manifest = New package) compare that error with the file list in the PR. // difference = diff CurrentManifest array_PRManifest.Length; //Need to rebuild in absence of Compare-Object. - } else { + // } else { //But if CurrentManifest did return something, return that. - difference = CurrentManifest; + if (array_PRManifest.Length < CurrentManifest.Count){ + difference = true; } } return difference; @@ -4763,7 +4773,7 @@ public void Manual_Merge_Action(object sender, EventArgs e) { }// end Approval_Search_Action public void Highest_Version_Remaining_Action(object sender, EventArgs e) { - System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/pulls?q=is%3Aopen+is%3Apr+draft%3Afalse+label%3AHighest-Version-Remaining+");//HVR + System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/pulls?q=is%3Aopen+is%3Apr+draft%3Afalse+label%3AHighest-Version-Removal+");//HVR }// end Approval_Search_Action public void Approval_Search_Action(object sender, EventArgs e) { @@ -4816,7 +4826,7 @@ public void Start_Of_Day_Action(object sender, EventArgs e) { System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/issues"); System.Diagnostics.Process.Start("https://github.com/microsoft/winget-cli/issues"); System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/labels/Needs-Manual-Merge"); - System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/pulls?q=is%3Aopen+is%3Apr+draft%3Afalse+label%3AHighest-Version-Remaining+");//HVR + System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/pulls?q=is%3Aopen+is%3Apr+draft%3Afalse+label%3AHighest-Version-Removal+");//HVR SearchGitHub("Defender",1,0, false,false,true); }// end Start_Of_Day_Action //Open In Browser @@ -5050,10 +5060,10 @@ public void Idle_Action(object sender, EventArgs e) { public string[] AppsAndFeaturesEntriesList = { "DisplayName", "DisplayVersion", - "Publisher", + // "Publisher", "ProductCode", - "UpgradeCode", - "InstallerType" + "UpgradeCode" //, + // "InstallerType" }; public string[] CountrySet = { diff --git a/Tools/ManualValidationPipeline.ps1 b/Tools/ManualValidationPipeline.ps1 index 81c5d934a8570..e43437e462170 100644 --- a/Tools/ManualValidationPipeline.ps1 +++ b/Tools/ManualValidationPipeline.ps1 @@ -10,7 +10,7 @@ #3.88.19 - A few bugfixes. #3.88.18 - Restore waiver and retry fucntionality. -$build = 883 +$build = 884 $appName = "ManualValidationPipeline" Write-Host "$appName build: $build" $MainFolder = "C:\ManVal" @@ -102,7 +102,7 @@ $MagicLabels = "Validation-Defender-Error", #0 "Needs-Author-Feedback",#30 "Policy-Test-2.7", #31 "Manifest-Version-Error",#32 -"Highest-Version-Remaining"#33 +"Highest-Version-Removal"#33 #First tab Function Get-TrackerVMRunTracker { @@ -205,6 +205,7 @@ Function Get-PRWatch { $LogFile = ".\PR.txt", $ReviewFile = ".\Review.csv", $oldclip = "", + $PrePipeline = $false, $AuthList = (Get-ValidationData -Property authStrictness), $AgreementsList = (Get-ValidationData -Property AgreementUrl), $ReviewList = (Get-LoadFileIfExists $ReviewFile), @@ -1721,9 +1722,11 @@ Function Get-PRWatch { - if ($Approve -eq "+") { - $Approve = Approve-PR -PR $PR - Add-PRToRecord -PR $PR -Action "Approved" -Title $PRtitle + if ($PrePipeline -eq $false) { + if ($Approve -eq "+") { + $Approve = Approve-PR -PR $PR + Add-PRToRecord -PR $PR -Action "Approved" -Title $PRtitle + } } Write-Host -nonewline -f $matchColor "$Approve | " @@ -2623,7 +2626,7 @@ Function Get-AutoValLog { if ($BuildNumber) { #This downloads to Windows default location, which has already been set to $DestinationPath - Start-Process "$ADOMSBaseUrl/ed6a5dfa-6e7f-413b-842c-8305dd9e89e6/_apis/build/builds/$BuildNumber/artifacts?artifactName=InstallationVerificationLogs&api-version=7.0&%24format=zip" + Start-Process "$ADOMSBaseUrl/ed6a5dfa-6e7f-413b-842c-8305dd9e89e6/_apis/build/builds/$BuildNumber/artifacts?artifactName=InstallationVerificationLogs&api-version=7.1&%24format=zip" Start-Sleep $DownloadSeconds; if (!(Test-Path $ZipPath) -AND !$Force) { Write-Host "No logs." @@ -2698,7 +2701,7 @@ Function Get-AutoValLog { $UserInput = $UserInput | Select-Object -Unique $UserInput = "Automatic Validation ended with:`n"+($UserInput -join "`n> ") -if ($UserInput -match "exit code") { +if ($UserInput -match "exit code" -OR $UserInput -match "DeliveryOptimization error" -OR $UserInput -match "Error information") { $ExitCodeTable = gc $ExitCodeFile | ConvertFrom-Csv foreach ($ExitCode in $ExitCodeTable) { if ($UserInput -match $ExitCode.code) { diff --git a/Tools/Review.csv b/Tools/Review.csv index 9d7f02d88e128..8ebedf63f6d47 100644 --- a/Tools/Review.csv +++ b/Tools/Review.csv @@ -1,7 +1,7 @@ PackageIdentifier,Reason,PR DBeaver.DBeaver,Vedant not respecting machine install scope defined in settings.json,135726 Discord.Discord,Self-updates and does not update the version number in the registry when doing so - applying an update via winget will break/override the user preferences and forcefully enable auto-start on system boot.,90642 -geeksoftwareGmbH.PDF24Creator,With every new version we release, the urls here are incorrect again and we have to start a pull request to change the urls.,137595 +geeksoftwareGmbH.PDF24Creator,Verify it just uses "download.pdf24.org". The urls have been incorrect with every release and we have to start a pull request to fix.,137595 Kitware.CMake,Make sure it's not a release candidate.,140606 TechPowerUp.GPU-Z,Download only works for WinGet's user agent string.,150500 TechPowerUp.NVCleanstall,Download only works for WinGet's user agent string.,153878