fix(workbench): bound session summary runtime query (#1952)

This commit is contained in:
Lyon
2026-06-23 05:58:00 +08:00
committed by GitHub
parent 5e1cc8ade5
commit 6e68cacd9b
4 changed files with 71 additions and 22 deletions
+13
View File
@@ -941,6 +941,7 @@ function deployServicesForProfile(deploy, profile) {
runtimeStoreEnvForProfile(deploy, profile, service.serviceId),
workbenchRuntimeClientEnvForProfile(deploy, profile, service.serviceId),
workbenchRuntimeFactsQueryEnvForProfile(deploy, profile, service.serviceId),
workbenchRuntimeSessionsSummaryEnvForProfile(deploy, profile, service.serviceId),
workbenchRuntimePostgresEnvForProfile(deploy, profile, service.serviceId),
workbenchRuntimeRedisEnvForProfile(deploy, profile, service.serviceId)
);
@@ -957,6 +958,7 @@ function deployServicesForProfile(deploy, profile) {
runtimeStoreEnvForProfile(deploy, profile, override.serviceId),
workbenchRuntimeClientEnvForProfile(deploy, profile, override.serviceId),
workbenchRuntimeFactsQueryEnvForProfile(deploy, profile, override.serviceId),
workbenchRuntimeSessionsSummaryEnvForProfile(deploy, profile, override.serviceId),
workbenchRuntimePostgresEnvForProfile(deploy, profile, override.serviceId),
workbenchRuntimeRedisEnvForProfile(deploy, profile, override.serviceId)
)
@@ -1075,6 +1077,17 @@ function workbenchRuntimeFactsQueryEnvForProfile(deploy, profile, serviceId) {
return env;
}
function workbenchRuntimeSessionsSummaryEnvForProfile(deploy, profile, serviceId) {
if (!isRuntimeLane(profile) || serviceId !== "hwlab-workbench-runtime") return {};
const sessionsSummary = runtimeLaneConfig(deploy, profile)?.workbenchRuntime?.sessionsSummary;
if (!sessionsSummary || typeof sessionsSummary !== "object" || Array.isArray(sessionsSummary)) return {};
const env = {};
if (Number.isInteger(sessionsSummary.maxAttempts)) env.HWLAB_WORKBENCH_SESSIONS_SUMMARY_QUERY_MAX_ATTEMPTS = String(sessionsSummary.maxAttempts);
if (Number.isInteger(sessionsSummary.attemptTimeoutMs)) env.HWLAB_WORKBENCH_SESSIONS_SUMMARY_QUERY_ATTEMPT_TIMEOUT_MS = String(sessionsSummary.attemptTimeoutMs);
if (Number.isInteger(sessionsSummary.backoffMs)) env.HWLAB_WORKBENCH_SESSIONS_SUMMARY_QUERY_BACKOFF_MS = String(sessionsSummary.backoffMs);
return env;
}
function workbenchRuntimePostgresEnvForProfile(deploy, profile, serviceId) {
if (!isRuntimeLane(profile) || serviceId !== "hwlab-workbench-runtime") return {};
const postgres = runtimeLaneConfig(deploy, profile)?.workbenchRuntime?.postgres;