fix(agentrun): split image build container proxy

This commit is contained in:
Codex
2026-06-27 16:45:02 +00:00
parent 3a4e295d68
commit 30bc296255
3 changed files with 74 additions and 5 deletions
+14
View File
@@ -179,6 +179,11 @@ export interface AgentRunImageBuildSpec {
readonly httpProxy: string | null;
readonly httpsProxy: string | null;
readonly noProxy: readonly string[];
readonly buildContainerProxy: {
readonly httpProxy: string | null;
readonly httpsProxy: string | null;
readonly noProxy: readonly string[];
};
readonly envIdentityFiles: readonly string[];
readonly timeoutSeconds: number;
readonly pollSeconds: number;
@@ -314,6 +319,9 @@ export function agentRunLaneSummary(spec: AgentRunLaneSpec): Record<string, unkn
buildArgNames: Object.keys(spec.deployment.manager.imageBuild.buildArgs).sort(),
proxyConfigured: spec.deployment.manager.imageBuild.httpProxy !== null || spec.deployment.manager.imageBuild.httpsProxy !== null,
noProxyCount: spec.deployment.manager.imageBuild.noProxy.length,
buildContainerProxyConfigured:
spec.deployment.manager.imageBuild.buildContainerProxy.httpProxy !== null || spec.deployment.manager.imageBuild.buildContainerProxy.httpsProxy !== null,
buildContainerNoProxyCount: spec.deployment.manager.imageBuild.buildContainerProxy.noProxy.length,
envIdentityFileCount: spec.deployment.manager.imageBuild.envIdentityFiles.length,
timeoutSeconds: spec.deployment.manager.imageBuild.timeoutSeconds,
pollSeconds: spec.deployment.manager.imageBuild.pollSeconds,
@@ -679,6 +687,7 @@ function parseContainerResources(input: Record<string, unknown>, path: string):
}
function parseImageBuild(input: Record<string, unknown>, path: string): AgentRunImageBuildSpec {
const buildContainerProxy = recordField(input, "buildContainerProxy", path);
return {
context: relativePathField(input, "context", path),
containerfile: relativePathField(input, "containerfile", path),
@@ -688,6 +697,11 @@ function parseImageBuild(input: Record<string, unknown>, path: string): AgentRun
httpProxy: optionalStringField(input, "httpProxy", path) ?? null,
httpsProxy: optionalStringField(input, "httpsProxy", path) ?? null,
noProxy: stringArrayField(input, "noProxy", path),
buildContainerProxy: {
httpProxy: optionalStringField(buildContainerProxy, "httpProxy", `${path}.buildContainerProxy`) ?? null,
httpsProxy: optionalStringField(buildContainerProxy, "httpsProxy", `${path}.buildContainerProxy`) ?? null,
noProxy: stringArrayField(buildContainerProxy, "noProxy", `${path}.buildContainerProxy`),
},
envIdentityFiles: stringArrayField(input, "envIdentityFiles", path).map((item, index) => {
if (item.startsWith("/") || item.includes("..")) throw new Error(`${path}.envIdentityFiles[${index}] must be a relative path without ..`);
return item;