Exemplo n.º 1
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var failedTasks = from r in context.Timeline.Records
                              where r.Result == TaskResult.Failed
                              where r.RecordType == "Task"
                              where r.Task != null
                              where r.Task.Name == "Cache"
                              where r.Log != null
                              select r;

            var classificationFound = false;

            foreach (var failedTask in failedTasks)
            {
                foreach (var classifier in failureClassifiers)
                {
                    if (failedTask.Issues.Any(i => classifier.IsFailure(i.Message)))
                    {
                        context.AddFailure(failedTask, classifier.FailureName);
                        classificationFound = true;
                    }
                }

                if (!classificationFound)
                {
                    context.AddFailure(failedTask, "Cache Failure Other");
                }
            }
        }
Exemplo n.º 2
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var jobs = from r in context.Timeline.Records
                       where r.RecordType == "Job"
                       where r.Issues.Any(i => i.Message.Contains("abandoned due to an infrastructure failure"))
                       select r;

            if (jobs.Count() > 0)
            {
                foreach (var job in jobs)
                {
                    context.AddFailure(job, "Azure Pipelines Pool Outage");
                }
            }
        }
Exemplo n.º 3
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var failedTasks = from r in context.Timeline.Records
                              where r.Result == TaskResult.Failed
                              where r.RecordType == "Task"
                              where r.Task != null
                              where r.Task.Name == "Cache"
                              where r.Log != null
                              select r;

            foreach (var failedTask in failedTasks.Where(t => t.Issues.Any(i => IsChunkOrderingError(i.Message))))
            {
                context.AddFailure(failedTask, "Cache Chunk Ordering");
            }
        }
Exemplo n.º 4
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var failedTasks = from r in context.Timeline.Records
                              where r.Name.StartsWith("Deploy test resources")
                              where r.Result == TaskResult.Failed
                              select r;

            if (failedTasks.Count() > 0)
            {
                foreach (var failedTask in failedTasks)
                {
                    context.AddFailure(failedTask, "Test Resource Failure");
                }
            }
        }
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var timedOutTestTasks = from r in context.Timeline.Records
                                    where r.RecordType == "Task"
                                    where r.Result == TaskResult.Canceled
                                    select r;

            if (timedOutTestTasks.Count() > 0)
            {
                foreach (var timedOutTestTask in timedOutTestTasks)
                {
                    context.AddFailure(timedOutTestTask, "Cancelled Task");
                }
            }
        }
Exemplo n.º 6
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var failedTasks = from r in context.Timeline.Records
                              where r.RecordType == "Task"
                              where r.Result == TaskResult.Failed
                              where r.Name.StartsWith("Download secrets")
                              select r;

            if (failedTasks.Count() > 0)
            {
                foreach (var failedTask in failedTasks)
                {
                    context.AddFailure(failedTask, "Secerts Failure");
                }
            }
        }
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var failedTasks = from r in context.Timeline.Records
                              where r.RecordType == "Task"
                              where r.Name == "Start Cosmos DB Emulator"
                              where r.Result == TaskResult.Failed
                              select r;

            if (failedTasks.Count() > 0)
            {
                foreach (var failedTask in failedTasks)
                {
                    context.AddFailure(failedTask, "Cosmos DB Emulator Failure");
                }
            }
        }
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var tasks = from r in context.Timeline.Records
                        where r.RecordType == "Task"
                        where r.Issues.Any(i => i.Message.Contains("Git fetch failed with exit code: 128"))
                        select r;

            if (tasks.Count() > 0)
            {
                foreach (var task in tasks)
                {
                    context.AddFailure(task
                                       , "Git Checkout");
                }
            }
        }
Exemplo n.º 9
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var failedTasks = from r in context.Timeline.Records
                              where r.Result == TaskResult.Failed
                              where r.RecordType == "Task"
                              where r.Name == "Install Azurite"
                              select r;

            if (failedTasks.Count() > 0)
            {
                foreach (var failedTask in failedTasks)
                {
                    context.AddFailure(failedTask, "Azurite Install");
                }
            }
        }
Exemplo n.º 10
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var failedTasks = from r in context.Timeline.Records
                              where r.Result == TaskResult.Failed
                              where r.RecordType == "Task"
                              where r.Log != null
                              select r;

            foreach (var failedTask in failedTasks)
            {
                var lines = await buildLogProvider.GetLogLinesAsync(context.Build, failedTask.Log.Id);

                if (lines.Any(line => IsDnsResolutionFailure(line)))
                {
                    context.AddFailure(failedTask, "DNS Resolution Failure");
                }
            }
        }
Exemplo n.º 11
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var failedTasks = from r in context.Timeline.Records
                              where r.Result == TaskResult.Failed
                              where r.RecordType == "Task"
                              where r.Task != null
                              where r.Task.Name == "EsrpCodeSigning"
                              where r.Log != null
                              select r;

            if (failedTasks.Count() > 0)
            {
                foreach (var failedTask in failedTasks)
                {
                    context.AddFailure(failedTask, "Code Signing");
                }
            }
        }
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            if (context.Build.Definition.Name.StartsWith("js -"))
            {
                var failedTasks = from r in context.Timeline.Records
                                  where r.Name == "Execute Samples"
                                  where r.Result == TaskResult.Failed
                                  select r;

                if (failedTasks.Count() > 0)
                {
                    foreach (var failedTask in failedTasks)
                    {
                        context.AddFailure(failedTask, "Sample Execution");
                    }
                }
            }
        }
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            if (context.Build.Definition.Name.EndsWith("- tests"))
            {
                var failedTasks = from r in context.Timeline.Records
                                  where r.Result == TaskResult.Failed
                                  where r.RecordType == "Task"
                                  where r.Name == "Install Azure PowerShell module"
                                  select r;

                if (failedTasks.Count() > 0)
                {
                    foreach (var failedTask in failedTasks)
                    {
                        context.AddFailure(failedTask, "Azure PS Module");
                    }
                }
            }
        }
Exemplo n.º 14
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            if (context.Build.Definition.Name.StartsWith("js -"))
            {
                var failedJobs = from r in context.Timeline.Records
                                 where r.Name == "Publish packages to daily feed"
                                 where r.RecordType == "Job"
                                 where r.Result == TaskResult.Failed
                                 select r;

                if (failedJobs.Count() > 0)
                {
                    foreach (var failedJob in failedJobs)
                    {
                        context.AddFailure(failedJob, "Publish Failure");
                    }
                }
            }
        }
Exemplo n.º 15
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            if (context.Build.Definition.Name.StartsWith("java - "))
            {
                var failedTasks = from r in context.Timeline.Records
                                  where r.Result == TaskResult.Failed
                                  where r.RecordType == "Task"
                                  where r.Name.StartsWith("Run tests")
                                  select r;

                if (failedTasks.Count() > 0)
                {
                    foreach (var failedTask in failedTasks)
                    {
                        context.AddFailure(failedTask, "Test Failure");
                    }
                }
            }
        }
Exemplo n.º 16
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var failedTasks = from r in context.Timeline.Records
                              where r.Result == TaskResult.Failed
                              where r.RecordType == "Task"
                              where r.Task != null
                              where r.Task.Name == "Maven"
                              where r.Log != null
                              select r;

            foreach (var failedTask in failedTasks)
            {
                var lines = await buildLogProvider.GetLogLinesAsync(context.Build, failedTask.Log.Id);

                if (lines.Any(line => line.Contains("Connection reset") || line.Contains("Connection timed out") || line.Contains("504 Gateway Timeout")))
                {
                    context.AddFailure(failedTask, "Maven Broken Pipe");
                }
            }
        }
Exemplo n.º 17
0
        public async Task ClassifyAsync(FailureAnalyzerContext context)
        {
            var failedTasks = from r in context.Timeline.Records
                              where r.Result == TaskResult.Failed
                              where r.RecordType == "Task"
                              where r.Task != null
                              where r.Name == "Publish to Java Dev Feed"
                              where r.Log != null
                              select r;

            foreach (var failedTask in failedTasks)
            {
                var lines = await this.buildLogProvider.GetLogLinesAsync(context.Build, failedTask.Log.Id);

                if (lines.Any(line => line.Contains("Transfer failed for https://pkgs.dev.azure.com") && line.Contains("503 Service Unavailable")))
                {
                    context.AddFailure(failedTask, "Azure Artifacts Service Unavailable");
                }
            }
        }