Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Agent.Sdk/Knob/AgentKnobs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,14 @@ public class AgentKnobs
new EnvironmentKnobSource("AZP_USE_ENHANCED_LOGGING"),
new BuiltInDefaultKnobSource("false"));

// Docker Diagnostics
public static readonly Knob EnableEnhancedContainerDiagnostics = new Knob(
nameof(EnableEnhancedContainerDiagnostics),
"When enabled, uses ContainerOperationProviderEnhanced with detailed tracing and duration logging for container operations",
new PipelineFeatureSource("EnableEnhancedContainerDiagnostics"),
new EnvironmentKnobSource("AGENT_ENABLE_ENHANCED_CONTAINER_LOGGING"),
new BuiltInDefaultKnobSource("false"));


public static readonly Knob EnableDockerExecDiagnostics = new Knob(
nameof(EnableDockerExecDiagnostics),
"If true, collect and report comprehensive diagnostics when docker exec commands fail, including container state, resource limits, logs, and platform-specific analysis.",
Expand Down
3 changes: 2 additions & 1 deletion src/Agent.Worker/Container/DockerCommandManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public async Task<DockerVersion> DockerVersion(IExecutionContext context)
}

Version clientVersion = null;
var clientVersionMatchResult = verRegex.Match(serverVersionStr);
var clientVersionMatchResult = verRegex.Match(clientVersionStr);
if (clientVersionMatchResult.Success && !string.IsNullOrEmpty(clientVersionMatchResult.Value))
{
if (!Version.TryParse(clientVersionMatchResult.Value, out clientVersion))
Expand Down Expand Up @@ -498,6 +498,7 @@ private static async Task<int> ExecuteDockerCommandAsyncWithRetries(IExecutionCo
retryCount++;
}

context.Output(StringUtil.Loc("DockerCommandFinalExitCode", command, exitCode));
return exitCode;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Agent.Worker/ContainerOperationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1266,4 +1266,4 @@ private void PublishTelemetry(
publishTelemetryCmd.ProcessCommand(executionContext, cmd);
}
}
}
}
Loading
Loading