Merge pull request #268 from pikasTech/fix/runner-secretref-startup-validation
Pipelines as Code CI / agentrun-nc01-v02-ci-2bd321255c0307b375ea809ae6ef061cb46d20b1 Success

fix: 启动时校验 runner 调度配置
This commit is contained in:
Lyon
2026-07-10 14:26:16 +08:00
committed by GitHub
+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);