mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-24 06:34:33 +08:00
Supervisors poll the gateway for configuration every 10 seconds. This PR adds an opt-in push mode (config_delivery_mode = "push"): supervisors still start by polling, and once their ConnectSupervisor session is accepted, the gateway delivers every later change over it and supervisors apply it and report the result. poll stays the default, and older supervisors and gateways keep polling. --------- Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> Signed-off-by: divesh <dgude@nvidia.com> Co-authored-by: divesh <dgude@nvidia.com>
58 lines
2.1 KiB
Bash
Executable File
58 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Run conformance suites, and optionally a focused Rust e2e test,
|
|
# against a gateway using the bundled Docker compute driver. Set
|
|
# OPENSHELL_GATEWAY_ENDPOINT=http://host:port to reuse an existing plaintext
|
|
# gateway instead of starting an ephemeral one.
|
|
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
E2E_TEST="${OPENSHELL_E2E_DOCKER_TEST:-}"
|
|
# Unset or empty selects Rust defaults; e2e-conformance-only skips Rust tests.
|
|
E2E_FEATURES="${OPENSHELL_E2E_DOCKER_FEATURES:-e2e-docker}"
|
|
DEFAULT_WORKLOAD_MANIFEST="${ROOT}/e2e/gpu/images/.build/workloads.yaml"
|
|
RUN_WITH_GATEWAY_COMMAND="__openshell_run_docker_e2e"
|
|
# shellcheck source=e2e/support/conformance.sh
|
|
source "${ROOT}/e2e/support/conformance.sh"
|
|
|
|
run_e2e() {
|
|
e2e_run_openshell_conformance "Docker"
|
|
|
|
if [ "${E2E_FEATURES}" = "e2e-conformance-only" ]; then
|
|
echo "::notice::Skipping Rust e2e tests (e2e-conformance-only)"
|
|
return 0
|
|
fi
|
|
|
|
local cargo_args=(
|
|
cargo test --manifest-path "${ROOT}/e2e/rust/Cargo.toml"
|
|
--features "${E2E_FEATURES}"
|
|
)
|
|
# OPENSHELL_E2E_DOCKER_TEST may name several space-separated test targets.
|
|
local test_names test_name
|
|
read -ra test_names <<<"${E2E_TEST}"
|
|
for test_name in "${test_names[@]}"; do
|
|
cargo_args+=(--test "${test_name}")
|
|
done
|
|
cargo_args+=(-- --nocapture)
|
|
"${cargo_args[@]}"
|
|
}
|
|
|
|
if [ "${E2E_TEST}" = "gpu" ] && [ -z "${OPENSHELL_E2E_WORKLOAD_MANIFEST:-}" ] && [ ! -f "${DEFAULT_WORKLOAD_MANIFEST}" ]; then
|
|
echo "note: running GPU e2e without a workload manifest; workload validation will log an explicit skip. Build one with 'mise run e2e:workloads:build' or set OPENSHELL_E2E_WORKLOAD_MANIFEST."
|
|
fi
|
|
|
|
if [ "${1:-}" = "${RUN_WITH_GATEWAY_COMMAND}" ]; then
|
|
run_e2e
|
|
exit 0
|
|
fi
|
|
|
|
if [ "${E2E_FEATURES}" != "e2e-conformance-only" ]; then
|
|
CONTAINER_ENGINE=docker bash "${ROOT}/tasks/scripts/e2e-build-workload.sh"
|
|
fi
|
|
|
|
exec "${ROOT}/e2e/with-docker-gateway.sh" \
|
|
bash "${BASH_SOURCE[0]}" "${RUN_WITH_GATEWAY_COMMAND}"
|