Another runner code cleanup round (#197)

* Remove remaining non-SDK references of capabilities/demands
* Remove unused Runner.Common constants
* Remove more variables
* Clean up RU link, and named-pipe support
* Remove NotificationSocketAddress
* Re-add legacy OnPremises JobDispatcher code (commented out)
* More misc cleanup
This commit is contained in:
Julio Barba
2019-12-04 10:18:37 -05:00
committed by GitHub
parent f8829feb63
commit cd2cec8282
12 changed files with 49 additions and 355 deletions

View File

@@ -874,33 +874,6 @@ namespace GitHub.Runner.Worker
{
this.Warning(string.Format("The job is currently being throttled by the server. You may experience delays in console line output, job status reporting, and action log uploads."));
if (!String.IsNullOrEmpty(this.Variables.System_TFCollectionUrl))
{
// Construct a URL to the resource utilization page, to aid the user debug throttling issues
UriBuilder uriBuilder = new UriBuilder(Variables.System_TFCollectionUrl);
NameValueCollection query = HttpUtility.ParseQueryString(uriBuilder.Query);
DateTime endTime = DateTime.UtcNow;
string queryDate = endTime.AddHours(-1).ToString("s") + "," + endTime.ToString("s");
uriBuilder.Path += (Variables.System_TFCollectionUrl.EndsWith("/") ? "" : "/") + "_usersSettings/usage";
query["tab"] = "pipelines";
query["queryDate"] = queryDate;
// Global RU link
uriBuilder.Query = query.ToString();
string global = $"Link to resource utilization page (global 1-hour view): {uriBuilder.ToString()}.";
if (!String.IsNullOrEmpty(this.Variables.Build_DefinitionName))
{
query["keywords"] = this.Variables.Build_Number;
query["definition"] = this.Variables.Build_DefinitionName;
}
// RU link scoped for the build/release
uriBuilder.Query = query.ToString();
this.Warning($"{global}\nLink to resource utilization page (1-hour view by pipeline): {uriBuilder.ToString()}.");
}
_throttlingReported = true;
}
}