private void ReportResult( OperationContext operationContext, Pip pip, ExecutionResult executionResult, PipExecutionStep step) { var pipId = pip.PipId; m_workerPipStateManager.Transition(pipId, WorkerPipState.Recording); if (executionResult.Result == PipResultStatus.Failed) { m_hasFailures = true; } bool found = m_pendingPipCompletions.TryRemove(pipId, out var pipCompletion); Contract.Assert(found, "Could not find corresponding build completion data for executed pip on worker"); pipCompletion.ExecutionResult = executionResult; if (step == PipExecutionStep.MaterializeOutputs && m_config.FireForgetMaterializeOutput) { // We do not report 'MaterializeOutput' step results back to master. Logger.Log.DistributionWorkerFinishedPipRequest(m_appLoggingContext, pipCompletion.SemiStableHash, step.ToString()); } else { m_buildResults.Add(pipCompletion); } }
private void ReportResult( Pip pip, ExecutionResult executionResult, PipExecutionStep step) { var pipId = pip.PipId; m_workerPipStateManager.Transition(pipId, WorkerPipState.Recording); if (executionResult.Result == PipResultStatus.Failed) { m_hasFailures = true; } bool found = m_pendingPipCompletions.TryRemove(pipId, out var pipCompletion); Contract.Assert(found, "Could not find corresponding build completion data for executed pip on worker"); pipCompletion.ExecutionResult = executionResult; // To preserve the path set casing is an option only available for process pips pipCompletion.PreservePathSetCasing = pip.PipType == PipType.Process ? ((Process)pip).PreservePathSetCasing : false; if (step == PipExecutionStep.MaterializeOutputs && m_config.Distribution.FireForgetMaterializeOutput) { // We do not report 'MaterializeOutput' step results back to master. Logger.Log.DistributionWorkerFinishedPipRequest(m_appLoggingContext, pipCompletion.SemiStableHash, step.ToString()); return; } try { m_buildResults.Add(pipCompletion); } catch (InvalidOperationException) { // m_buildResults is already marked as completed due to previously infrastructure errors reported (e.g., materialization errors). // No need to report the other failed results as the build already failed } }