diff --git a/Tools/ExitCodes.csv b/Tools/ExitCodes.csv index b90e7c19316ba..e1fe0766feab1 100644 --- a/Tools/ExitCodes.csv +++ b/Tools/ExitCodes.csv @@ -1,7 +1,12 @@ Code, Message -2147012867,Network or Firewall Error. --1073741515,Dependency on `Microsoft.VCRedist.2015+.64` (or `.x86`). +-1073741515,STATUS_DLL_NOT_FOUND, possibly due to a dependency on `Microsoft.VCRedist.2015+.x64` (or `.x86`). 1603,Install successful but system restart may be required. 3010,Install successful but system restart may be required. -1978335226,Install successful but system restart may be required. -1978335215,Hash mismatch. +-1978335141,Unable to locate nested installer - does the version number in the nested path need to be incremented? +0x80072EE2,ERROR_INTERNET_TIMEOUT +-2147012894,ERROR_INTERNET_TIMEOUT +2147958003,Error Installing Dependency - is the dependency able to run in each scope and architecture specified in this manifest? +-532462766,EXCEPTION_COMPLUS \ No newline at end of file diff --git a/Tools/ManualValidationPipeline.cs b/Tools/ManualValidationPipeline.cs index 92541b0de888a..60c4bf2c376b2 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 = 881;//Get-RebuildPipeApp + public int build = 882;//Get-RebuildPipeApp public string appName = "WinGetApprovalPipeline"; public string appTitle = "WinGet Approval Pipeline - Build "; public static string owner = "microsoft"; @@ -193,7 +193,7 @@ public class WinGetApprovalPipeline : Form { public string CheckpointName = "Validation"; public string VMUserName = "user"; //Set to the internal username you're using in your VMs.; - public string GitHubUserName = "stephengillie"; + public string gitHubUserName = "stephengillie"; //public string SystemRAM = (Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property capacity -Sum).sum /1gb; public int displayLine = 0; @@ -211,7 +211,8 @@ public class WinGetApprovalPipeline : Form { public string file_GitHubToken = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\Documents\\PowerShell\\ght.txt"; public string GitHubToken; public bool TokenLoaded = false; - public int GitHubRateLimitDelay = 333; + public int GitHubRateLimitDelay = 333; // ms + public int HyperVRateLimitDelay = 3; // seconds //JSON JavaScriptSerializer serializer = new JavaScriptSerializer(); @@ -551,7 +552,7 @@ public void drawMenuBar (){ submenu.MenuItems.Add("Add dependency (VS2015+)", new EventHandler(Add_Dependency_Disk_Action)); submenu.MenuItems.Add("Add installer switch (/S)", new EventHandler(Add_Installer_Switch_Action)); - item = new MenuItem("Modify PR"); + item = new MenuItem("Current PR"); this.Menu.MenuItems.Add(item); item.MenuItems.Add("Approve PR", new EventHandler(Approved_Action)); item.MenuItems.Add("Label Action", new EventHandler(Label_Action_Action)); @@ -917,10 +918,6 @@ public void PRWatch(bool noNew, string Chromatic = "Default", string LogFile = " PRTitle = split_clip.Where(n => regex_hashPRRegexEnd.IsMatch(n)).FirstOrDefault(); int PR = GetCurrentPR(); - // dynamic AuthList = GetValidationData("authStrictness"); - // dynamic AgreementsList = GetValidationData("AgreementUrl"); - // dynamic ReviewList = FromCsv(GetContent(ReviewFile)); - if (PRTitle != "") { if (PRTitle != oldclip) { //(GetStatus() .Where(n => n["status"] == "ValidationCompleted"} | format-Table);//Drops completed VMs in the middle of the PR approval display. @@ -998,14 +995,15 @@ public void PRWatch(bool noNew, string Chromatic = "Default", string LogFile = " //"PackageIdentifier","gitHubUserName","authStrictness","authUpdateType","autoWaiverLabel","versionParamOverrideUserName","versionParamOverridePR","code200OverrideUserName","code200OverridePR","AgreementOverridePR","AgreementURL","reviewText" string strictness = ""; + outBox_msg.AppendText(Environment.NewLine + "PR: " + PR ); try { - strictness = GetValidationData(PackageIdentifier,"authStrictness"); - outBox_msg.AppendText(Environment.NewLine + "PR: " + PR + " strictness: " + strictness); + strictness = GetFileData(DataFileName,PackageIdentifier,"authStrictness"); } catch {} string AuthAccount = ""; - if (strictness != null) { + if (strictness != "") { try { - AuthAccount = GetValidationData(PackageIdentifier,"GitHubUserName"); + AuthAccount = GetFileData(DataFileName,PackageIdentifier,"gitHubUserName"); + outBox_msg.AppendText(Environment.NewLine + "PR: " + PR + " AuthAccount: " + AuthAccount); } catch {} } if (ManifestVersion == "") { @@ -1115,9 +1113,12 @@ public void PRWatch(bool noNew, string Chromatic = "Default", string LogFile = " //Not in list or PR - pass //Not in list, in PR - alert and pass? //Check previous version for omission - depend on wingetbot for now. -/* - string AgreementUrlFromList = "";//AgreementsList.Where(n => n["PackageIdentifier"] == PackageIdentifier).FirstOrDefault()["AgreementUrl"]; - if (AgreementUrlFromList != null) { + string AgreementUrlFromList = ""; + try { + AgreementUrlFromList = GetFileData(DataFileName,PackageIdentifier,"AgreementUrl"); + outBox_msg.AppendText(Environment.NewLine + "PR: " + PR + " AgreementUrlFromList: " + AgreementUrlFromList); + } catch {} + if (AgreementUrlFromList != "") { string AgreementUrlFromClip = YamlValue("AgreementUrl",replace_clip); if (AgreementUrlFromClip == AgreementUrlFromList) { //Explicit Approve - URL is present and matches. @@ -1131,7 +1132,6 @@ public void PRWatch(bool noNew, string Chromatic = "Default", string LogFile = " AgreementAccept = "+"; //Implicit Approve - your AgreementsUrl is in another file. Can't modify what isn't there. } -*/ table_val.Rows[LastRow].SetField("G", AgreementAccept); // matchColor = validColor; @@ -1147,9 +1147,11 @@ public void PRWatch(bool noNew, string Chromatic = "Default", string LogFile = " (!PRTitle.Contains("Remove")) && (!AgreementAccept.Contains("[+]"))) { - string[] WordFilterMatch = null; + List WordFilterMatch = null; foreach (string word in WordFilterList) { - //WordFilterMatch += Clip.Contains(word) -notmatch "Url" -notmatch "Agreement" + if (clip.Contains(word)) { + WordFilterMatch.Add(word); + } } if (WordFilterMatch != null) { @@ -1377,7 +1379,7 @@ public void WorkSearch(string Preset, int Days = 7) { Get-GitHubPreset -Preset LabelAction -PR $PR OpenPRInBrowser(PR); } else { - if ($Comments[-1].UserName != $GitHubUserName) { + if ($Comments[-1].UserName != $gitHubUserName) { OpenPRInBrowser(PR); } }//end if LastCommenter @@ -1625,7 +1627,7 @@ public void LabelAction(int PR){ } else if (Label == MagicLabels[19]) { } else if (Label == MagicLabels[20]) { string PRTitle = FromJson(InvokeGitHubPRRequest(PR,""))["title"]; - // foreach (Dictionary Waiver in GetValidationData("autoWaiverLabel")) { + // foreach (Dictionary Waiver in GetFileData(DataFileName,"autoWaiverLabel")) { // if (PRTitle.Contains((string)Waiver["PackageIdentifier"])) { // AddWaiver(PR); // } @@ -1718,7 +1720,7 @@ public dynamic SearchGitHub(string Preset, int Page = 1,int Days = 0,bool IEDS = string nApproved = "-label:Moderator-Approved+"; string string_nBI = "-label:Blocking-Issue+"; string Defender = "label:"+MagicLabels[0]+"+"; - string HaventWorked = "-commenter:"+GitHubUserName+"+"; + string HaventWorked = "-commenter:"+gitHubUserName+"+"; string string_nHW = "-label:Hardware+"; string IEDSLabel = "label:Internal-Error-Dynamic-Scan+"; string nIEDS = "-"+IEDSLabel; @@ -2172,7 +2174,7 @@ public void GetPRApproval(string Clip = "",int PR = 0,string PackageIdentifier = PackageIdentifier = ((Clip.Split(':'))[1].Split(' ')[0]); } //Happens only during Bulk Approval, when manifest is in clipboard. - string auth = GetValidationData("PackageIdentifier",PackageIdentifier,true)["GitHubUserName"]; + string auth = GetFileData(DataFileName,PackageIdentifier,"gitHubUserName"); List Approver = auth.Split('/').Where(n => !n.Contains("(")).ToList(); string string_joined = string.Join("; @", Approver); ReplyToPR(PR,string_joined,"Approve","Needs-Review"); @@ -2259,16 +2261,16 @@ public DataTable PRStateFromComments(int PR){ if (string.Equals(UserName, FabricBot) && body.Contains("The check-in policies require a moderator to approve PRs from the community")) { State = "PreApproval"; } - if (string.Equals(UserName, GitHubUserName) && body.Contains("The package didn't pass a Defender or similar security scan")) { + if (string.Equals(UserName, gitHubUserName) && body.Contains("The package didn't pass a Defender or similar security scan")) { State = "DefenderFail"; } - if (string.Equals(UserName, GitHubUserName) && body.Contains("Status Code: 200")) { + if (string.Equals(UserName, gitHubUserName) && body.Contains("Status Code: 200")) { State = "InstallerAvailable"; } - if (string.Equals(UserName, GitHubUserName) && body.Contains("Response status code does not indicate success")) { + if (string.Equals(UserName, gitHubUserName) && body.Contains("Response status code does not indicate success")) { State = "InstallerRemoved"; } - if (string.Equals(UserName, GitHubUserName) && body.Contains("which is greater than the current manifest's version")) { + if (string.Equals(UserName, gitHubUserName) && body.Contains("which is greater than the current manifest's version")) { State = "VersionParamMismatch"; } if (string.Equals(UserName, FabricBot) && ( @@ -2283,13 +2285,13 @@ public DataTable PRStateFromComments(int PR){ if (string.Equals(UserName, FabricBot) && body.Contains("One or more of the installer URLs doesn't appear valid")) { State = "DomainReview"; } - if (string.Equals(UserName, GitHubUserName) && body.Contains("Sequence contains no elements")) { + if (string.Equals(UserName, gitHubUserName) && body.Contains("Sequence contains no elements")) { State = "SequenceError"; } - if (string.Equals(UserName, GitHubUserName) && body.Contains("This manifest has the highest version number for this package")) { + if (string.Equals(UserName, gitHubUserName) && body.Contains("This manifest has the highest version number for this package")) { State = "HighestVersionRemoval"; } - if (string.Equals(UserName, GitHubUserName) && body.Contains("SQL error or missing database")) { + if (string.Equals(UserName, gitHubUserName) && body.Contains("SQL error or missing database")) { State = "SQLMissingError"; } if (string.Equals(UserName, FabricBot) && body.Contains("The package manager bot determined changes have been requested to your PR")) { @@ -2298,10 +2300,10 @@ public DataTable PRStateFromComments(int PR){ if (string.Equals(UserName, FabricBot) && body.Contains("I am sorry to report that the Sha256 Hash does not match the installer")) { State = "HashMismatch"; } - if (string.Equals(UserName, GitHubUserName) && body.Contains("Automatic Validation ended with:")) { + if (string.Equals(UserName, gitHubUserName) && body.Contains("Automatic Validation ended with:")) { State = "AutoValEnd"; } - if (string.Equals(UserName, GitHubUserName) && body.Contains("Manual Validation ended with:")) { + if (string.Equals(UserName, gitHubUserName) && body.Contains("Manual Validation ended with:")) { State = "ManValEnd"; } if (string.Equals(UserName, AzurePipelines) && body.Contains("Pull request contains merge conflicts")) { @@ -3759,8 +3761,8 @@ public void GitHubRateLimit(){ //Response["rate"] | select @{n="source";e={"Logged"}}, limit, used, remaining, @{n="reset";e={([System.DateTimeOffset]::FromUnixTimeSeconds(_.reset)).DateTime.AddHours(-8)}} } - public dynamic GetValidationData(string PackageIdentifier, string Property,bool ToDepreciate = false){ - dynamic Records = FromCsv(GetContent(StatusFile)); + public dynamic GetFileData(string Filename, string PackageIdentifier, string Property){ + dynamic Records = FromCsv(GetContent(Filename));//StatusFile string string_out = ""; for (int r = 1; r < Records.Length -1; r++){ var row = Records[r]; @@ -3771,7 +3773,7 @@ public dynamic GetValidationData(string PackageIdentifier, string Property,bool return string_out; } - public void AddValidationData(string PackageIdentifier,string GitHubUserName = "",string authStrictness = "",string authUpdateType = "",string autoWaiverLabel = "",string versionParamOverrideUserName = "",int versionParamOverridePR = 0,string code200OverrideUserName = "",int code200OverridePR = 0,int AgreementOverridePR = 0 ,string AgreementURL = "",string reviewText = ""){ + public void AddValidationData(string PackageIdentifier,string gitHubUserName = "",string authStrictness = "",string authUpdateType = "",string autoWaiverLabel = "",string versionParamOverrideUserName = "",int versionParamOverridePR = 0,string code200OverrideUserName = "",int code200OverridePR = 0,int AgreementOverridePR = 0 ,string AgreementURL = "",string reviewText = ""){ //[ValidateSet("should","must")] //[ValidateSet("auto","manual")] @@ -3781,7 +3783,7 @@ public void AddValidationData(string PackageIdentifier,string GitHubUserName = " var row = data[r]; if (row["PackageIdentifier"] == PackageIdentifier) { - row["GitHubUserName"] = GitHubUserName; + row["gitHubUserName"] = gitHubUserName; row["authStrictness"] = authStrictness; row["authUpdateType"] = authUpdateType; row["autoWaiverLabel"] = autoWaiverLabel; @@ -3797,7 +3799,7 @@ public void AddValidationData(string PackageIdentifier,string GitHubUserName = " /* if (null == string_out) {0 - string_out = ( "" | Select-Object "PackageIdentifier","GitHubUserName","authStrictness","authUpdateType","autoWaiverLabel","versionParamOverrideUserName","versionParamOverridePR","code200OverrideUserName","code200OverridePR","AgreementOverridePR","AgreementURL","reviewText") + string_out = ( "" | Select-Object "PackageIdentifier","gitHubUserName","authStrictness","authUpdateType","autoWaiverLabel","versionParamOverrideUserName","versionParamOverridePR","code200OverrideUserName","code200OverridePR","AgreementOverridePR","AgreementURL","reviewText") string_out.PackageIdentifier = PackageIdentifier } @@ -4422,28 +4424,29 @@ public void Validate_By_Configure_Action(object sender, EventArgs e) { public void Validate_By_ID_Action(object sender, EventArgs e) { string PackageIdentifier = inputBox_User.Text; + ValidateManifest(0,PackageIdentifier,"",0,"","","","","",false,false,"","",false, "--id "+PackageIdentifier); }// end Validate_By_ID_Action public void Validate_By_Arch_Action(object sender, EventArgs e) { ValidateManifest(0,"","",0,"x64"); - Thread.Sleep(2); + Thread.Sleep(HyperVRateLimitDelay); ValidateManifest(0,"","",0,"x86"); }// end Validate_By_ID_Action public void Validate_By_Scope_Action(object sender, EventArgs e) { ValidateManifest(0,"","",0,"","Machine"); - Thread.Sleep(2); + Thread.Sleep(HyperVRateLimitDelay); ValidateManifest(0,"","",0,"","User"); }// end Validate_By_ID_Action public void Validate_By_Arch_And_Scope_Action(object sender, EventArgs e) { ValidateManifest(0,"","",0,"x64","Machine"); - Thread.Sleep(2); + Thread.Sleep(HyperVRateLimitDelay); ValidateManifest(0,"","",0,"x86","Machine"); - Thread.Sleep(2); + Thread.Sleep(HyperVRateLimitDelay); ValidateManifest(0,"","",0,"x64","User"); - Thread.Sleep(2); + Thread.Sleep(HyperVRateLimitDelay); ValidateManifest(0,"","",0,"x86","User"); }// end Validate_By_ID_Action //Generate manifest for selected VM @@ -4741,7 +4744,7 @@ public void All_Resources_Action(object sender, EventArgs e) { SearchGitHub("Approval",1,0, false,false,true);//Approval search SearchGitHub("ToWork",1,0, false,false,true);//ToWork search System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/pulls?q=is%3Aopen+is%3Apr+draft%3Afalse+-label%3ABlocking-Issue++label%3AValidation-Executable-Error+label%3AAzure-Pipeline-Passed+-label%3AValidation-Completed+-label%3AInternal-Error-Dynamic-Scan+-label%3AValidation-Defender-Error+-label%3AChanges-Requested+-label%3ADependencies+-label%3AHardware+-label%3AInternal-Error-Manifest+-label%3AInternal-Error-NoSupportedArchitectures+-label%3ALicense-Blocks-Install+-label%3ANeeds-CLA+-label%3ANetwork-Blocker+-label%3ANo-Recent-Activity+-label%3Aportable-jar+-label%3AReboot+-label%3AScripted-Application+-label%3AWindowsFeatures+-label%3Azip-binary");//APP-VEE - System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/issues?q=is%3Aopen+assignee%3A"+GitHubUserName+"+-label%3AValidation-Completed+-label%3AValidation-Defender-Error+-label%3AError-Hash-Mismatch");//Assigned to user + System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/issues?q=is%3Aopen+assignee%3A"+gitHubUserName+"+-label%3AValidation-Completed+-label%3AValidation-Defender-Error+-label%3AError-Hash-Mismatch");//Assigned to user System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/pulls?q=is%3Apr+is%3Aopen+draft%3Afalse+label%3AValidation-Complete+label%3AModerator-Approved");//Squash-Ready System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/labels/Internal-Error-Dynamic-Scan");//IEDS System.Diagnostics.Process.Start("https://github.com/microsoft/winget-pkgs/pulls?page=1&q=is%3Apr+is%3Aopen+draft%3Afalse+label%3AValidation-Completed+label%3ANeeds-Attention+-label%3ALast-Version-Remaining+-label%3AScripted-Application+-label%3Ahardware");//VCNA @@ -4824,7 +4827,6 @@ public void VCDependency_Click_Action (object sender, EventArgs e) { public void Testing_Action(object sender, EventArgs e) { // string string_out = (PRStateFromComments(PR).ToString()); - // dynamic string_out = GetValidationData("PackageIdentifier", UserInput); // dynamic string_out = FromCsv(GetContent(DataFileName)).Where(n => n[Property] != null).Where(n => (string)n[Property].Contains(Match); string UserInput = inputBox_User.Text; dynamic line = FromCsv(GetContent(DataFileName)).Where(n => (string)n["PackageIdentifier"] == (UserInput)); @@ -4832,9 +4834,6 @@ public void Testing_Action(object sender, EventArgs e) { }// end Testing_Action public void Testing2_Action(object sender, EventArgs e) { - // string string_out = (PRStateFromComments(PR).ToString()); - // dynamic string_out = GetValidationData("PackageIdentifier", UserInput); - // dynamic string_out = FromCsv(GetContent(DataFileName)).Where(n => n[Property] != null).Where(n => (string)n[Property].Contains(Match); string UserInput = inputBox_User.Text; int versions = FindWinGetTotalVersions(UserInput); // dynamic line = FromCsv(GetContent(DataFileName)).Where(n => (string)n["PackageIdentifier"] == (UserInput)); diff --git a/Tools/ManualValidationPipeline.csv b/Tools/ManualValidationPipeline.csv index ea1464c0e9aa3..1c8566c6cc963 100644 --- a/Tools/ManualValidationPipeline.csv +++ b/Tools/ManualValidationPipeline.csv @@ -161,15 +161,16 @@ "Microsoft.SQLServerManagementStudio","(Microsoft)","must","manual","","","","","","","", "Microsoft.VisualStudio","(Microsoft)/edwardskrod","must","manual","","","","","","","", "Microsoft.VisualStudioCode","(Microsoft)/lszomoru","must","manual","","","","","","","", -"Microsoft.VisualStudioCode.CLI","","","","Validation-Executable-Error","","","","","","", -"Microsoft.VisualStudioCode.Insiders","","","","Validation-Executable-Error","","","","","","", +"Microsoft.VisualStudioCode.CLI","(Microsoft)/lszomoru","must","manual","","","","","","","", +"Microsoft.VisualStudioCode.Insiders","(Microsoft)/lszomoru","must","manual","","","","","","","", +"Microsoft.VisualStudioCode.Insiders.CLI","(Microsoft)/lszomoru","must","manual","","","","","","","", "Microsoft.WindowsTerminal","(Microsoft)/consvc/DHowett","must","manual","","","","","","","", "Momento.cli","momento-github-actions-machine-user","should","auto","","","","","","","", "Mozilla.Firefox","","","","","krystofkrticka","","","","","", "mpv.net","","","","Validation-Installation-Error","","","","","","", "nektos.act","nektos-ci","should","auto","","","","","","","", "NelsonNumericalSoftware.Nelson","Nelson-numerical-software","should","auto","","","","","","","", -"Neovim.Neovim.Nightly","nvim-winget","must","manual","","","","","","","", +"Neovim.Neovim.Nightly","nvim-winget","should","auto","","","","","","","", "Nervatura.Nervatura","nervatura","should","auto","","","","","","","", "NewTek.NDI5Runtime","","","","Validation-No-Executables","","0","","0","0","", "nginxinc.nginx-prometheus-exporter","nginx-bot","should","auto","","","","","","","", diff --git a/Tools/ManualValidationPipeline.ps1 b/Tools/ManualValidationPipeline.ps1 index 6f4f6e2b312a4..668d04ce3365b 100644 --- a/Tools/ManualValidationPipeline.ps1 +++ b/Tools/ManualValidationPipeline.ps1 @@ -1757,7 +1757,7 @@ Function Get-WorkSearch { $PR = $FullPR.number Get-TrackerProgress -PR $PR $MyInvocation.MyCommand $line $PRs.length $line++ - if ($MagicLabels[33] -notin $FullPR.labels) { + if ($MagicLabels[33] -notin $FullPR.labels.name) { if (($FullPR.title -match "Remove") -OR ($FullPR.title -match "Delete") -OR ($FullPR.title -match "Automatic deletion")){