Skip to content

Commit 5e62c35

Browse files
committed
Prevents downloading of crash log in retry loop
1 parent 1f21c50 commit 5e62c35

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Framework/KubernetesWorkflow/ContainerCrashWatcher.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class ContainerCrashWatcher
1414
private CancellationTokenSource cts;
1515
private Task? worker;
1616
private Exception? workerException;
17+
private bool hasCrashed = false;
1718

1819
public ContainerCrashWatcher(ILog log, KubernetesClientConfiguration config, string containerName, string podName, string recipeName, string k8sNamespace)
1920
{
@@ -47,10 +48,7 @@ public void Stop()
4748

4849
public bool HasCrashed()
4950
{
50-
using var client = new Kubernetes(config);
51-
var result = HasContainerBeenRestarted(client);
52-
if (result) DownloadCrashedContainerLogs(client);
53-
return result;
51+
return hasCrashed;
5452
}
5553

5654
private void Worker()
@@ -72,6 +70,9 @@ private void MonitorContainer(CancellationToken token)
7270
{
7371
if (HasContainerBeenRestarted(client))
7472
{
73+
hasCrashed = true;
74+
cts.Cancel();
75+
7576
DownloadCrashedContainerLogs(client);
7677
return;
7778
}

ProjectPlugins/CodexPlugin/ApiChecker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace CodexPlugin
1010
public class ApiChecker
1111
{
1212
// <INSERT-OPENAPI-YAML-HASH>
13-
private const string OpenApiYamlHash = "06-B9-41-E8-C8-6C-DE-01-86-83-F3-9A-E4-AC-E7-30-D9-E6-64-60-E0-21-81-9E-4E-C5-93-77-2C-71-79-14";
13+
private const string OpenApiYamlHash = "FD-C8-0F-19-5E-14-09-C9-05-93-17-4A-97-50-1D-7E-37-50-B2-30-B2-E6-66-37-23-FA-35-F5-AB-A0-C6-BD";
1414
private const string OpenApiFilePath = "/codex/openapi.yaml";
1515
private const string DisableEnvironmentVariable = "CODEXPLUGIN_DISABLE_APICHECK";
1616

0 commit comments

Comments
 (0)