Skip to content

Commit 3abea8a

Browse files
authored
fix: remove spurious warning for optional secrets (#146)
1 parent ec512f3 commit 3abea8a

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • src/commands/benchmark-job

src/commands/benchmark-job/run.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ async function ensureAgentSecrets(
122122
): Promise<Record<string, string>> {
123123
const agentConfig = SUPPORTED_AGENTS[agent];
124124
const secrets: Record<string, string> = {};
125+
const missing: string[] = [];
125126

126127
for (const varName of agentConfig.automaticEnvVars) {
127128
const secretName = `${SECRET_PREFIX}${varName}`;
@@ -141,7 +142,14 @@ async function ensureAgentSecrets(
141142
await createSecret(secretName, envValue);
142143
secrets[varName] = secretName;
143144
} else {
144-
// No secret and no env var - skip (will be validated later if required)
145+
missing.push(varName);
146+
}
147+
}
148+
149+
// Only warn about missing vars when none were resolved at all
150+
if (missing.length > 0 && Object.keys(secrets).length === 0) {
151+
for (const varName of missing) {
152+
const secretName = `${SECRET_PREFIX}${varName}`;
145153
console.log(
146154
chalk.yellow(
147155
`Secret ${secretName} not found and ${varName} not set in environment`,

0 commit comments

Comments
 (0)