fix: validate runner runtime for manual dispatch

This commit is contained in:
root
2026-07-10 08:25:30 +02:00
parent 02adb14d56
commit 3ba1d08c2d
+2 -3
View File
@@ -73,8 +73,7 @@ function runnerJobDefaultsForRequest(defaults: ManagerServerOptions["runnerJobDe
};
}
function assertRunnerDispatcherRuntimeConfigured(enabled: boolean, defaults: ManagerServerOptions["runnerJobDefaults"]): void {
if (!enabled) return;
function assertRunnerRuntimeConfigured(defaults: ManagerServerOptions["runnerJobDefaults"]): void {
const required = [
["AGENTRUN_RUNTIME_NAMESPACE", defaults?.namespace ?? process.env.AGENTRUN_RUNTIME_NAMESPACE],
["AGENTRUN_INTERNAL_MGR_URL", defaults?.managerUrl ?? process.env.AGENTRUN_INTERNAL_MGR_URL],
@@ -220,7 +219,7 @@ export async function startManagerServer(options: ManagerServerOptions = {}): Pr
const runnerDispatcherOptions = runnerDispatcherOptionsForRuntime(options.runnerDispatcherOptions);
const kafkaOutboxRelayOptions = kafkaOutboxRelayOptionsForRuntime(options.kafkaOutboxRelayOptions);
const resolvedRunnerJobDefaults = runnerJobDefaultsForRequest(runnerJobDefaults, sourceCommit);
assertRunnerDispatcherRuntimeConfigured(runnerDispatcherOptions.enabled, runnerJobDefaults);
assertRunnerRuntimeConfigured(runnerJobDefaults);
const aipodSpecDir = options.aipodSpecDir ?? process.env.AGENTRUN_AIPOD_SPEC_DIR;
const auth = options.auth ?? managerServerAuthConfigFromEnv();
const authSummary = managerAuthSummary(auth);