Skip to content

Commit 18e17c1

Browse files
committed
fix(config): update remaining schema v2 consumers
Signed-off-by: Jesse Jaggars <[email protected]>
1 parent 6e8b2b4 commit 18e17c1

4 files changed

Lines changed: 37 additions & 29 deletions

File tree

‎.github/workflows/branch-checks.yml‎

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ jobs:
231231
- name: Test
232232
run: mise run test:python
233233

234+
- name: Test local gateway configuration helpers
235+
run: |
236+
bash tasks/scripts/test-gateway-pull-policy.sh
237+
bash tasks/scripts/test-gateway-config.sh
238+
234239
go:
235240
name: Go SDK
236241
needs: pr_metadata
@@ -300,24 +305,3 @@ jobs:
300305
run: |
301306
OPENSHELL_NPM_VERSION="$(uv run python tasks/scripts/release.py get-version --npm)" \
302307
mise run sdk:ts:publish
303-
304-
gateway-config:
305-
name: Gateway configuration fixtures
306-
needs: pr_metadata
307-
if: needs.pr_metadata.outputs.should_run == 'true'
308-
runs-on: linux-amd64-cpu8
309-
container:
310-
image: ghcr.io/nvidia/openshell/ci:latest
311-
credentials:
312-
username: ${{ github.actor }}
313-
password: ${{ secrets.GITHUB_TOKEN }}
314-
steps:
315-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
316-
317-
- name: Install tools
318-
run: mise install --locked
319-
320-
- name: Test local gateway configuration helpers
321-
run: |
322-
bash tasks/scripts/test-gateway-pull-policy.sh
323-
bash tasks/scripts/test-gateway-config.sh

‎nix/test-guest/provisioners/roles/gateway-rootless-podman/tasks/development-gateway.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
mode: "0600"
2727
content: |
2828
[openshell]
29-
version = 1
29+
version = 2
3030
3131
[openshell.gateway]
3232
bind_address = "127.0.0.1:8080"
3333
log_level = "info"
34-
compute_drivers = ["podman"]
34+
compute_driver = "podman"
3535
disable_tls = true
3636
3737
[openshell.gateway.auth]
@@ -42,7 +42,6 @@
4242
public_key_path = "{{ openshell_gateway_state_root }}/pki/jwt/public.pem"
4343
kid_path = "{{ openshell_gateway_state_root }}/pki/jwt/kid"
4444
gateway_id = "openshell-test-guest"
45-
ttl_secs = 0
4645
4746
[openshell.drivers.podman]
4847
default_image = "ghcr.io/nvidia/openshell-community/sandboxes/base:latest"

‎python/openshell/gateway_config_fixture_test.py‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@
99
from pathlib import Path
1010

1111
import pytest
12+
import yaml
1213

1314
REPO_ROOT = Path(__file__).resolve().parents[2]
1415
FIXTURE_DIR = REPO_ROOT / "e2e/configs/gateway"
16+
TEST_GUEST_ROLE_PATH = (
17+
REPO_ROOT
18+
/ "nix/test-guest/provisioners/roles/gateway-rootless-podman/tasks/development-gateway.yml"
19+
)
1520

1621

1722
@pytest.mark.parametrize(
@@ -30,6 +35,24 @@ def test_e2e_gateway_fixtures_use_schema_v2_scalar_driver(
3035
assert "sandbox_namespace" not in gateway
3136

3237

38+
def test_rootless_podman_test_guest_producer_uses_schema_v2() -> None:
39+
tasks = yaml.safe_load(TEST_GUEST_ROLE_PATH.read_text(encoding="utf-8"))
40+
producer = next(
41+
task
42+
for task in tasks
43+
if task.get("name") == "Write rootless Podman gateway configuration"
44+
)
45+
content = producer["ansible.builtin.copy"]["content"]
46+
config = tomllib.loads(content)
47+
gateway = config["openshell"]["gateway"]
48+
49+
assert config["openshell"]["version"] == 2
50+
assert gateway["compute_driver"] == "podman"
51+
assert "compute_drivers" not in gateway
52+
assert "ttl_secs" not in gateway["gateway_jwt"]
53+
assert "podman" in config["openshell"]["drivers"]
54+
55+
3356
def test_docker_e2e_gateway_fixture_uses_canonical_policy_and_label() -> None:
3457
config = tomllib.loads((FIXTURE_DIR / "docker.toml").read_text(encoding="utf-8"))
3558
docker = config["openshell"]["drivers"]["docker"]

‎skills/debug-openshell-cluster/SKILL.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@ journalctl -u openshell-gateway --no-pager --lines=200
9292

9393
Gateway configuration requires `[openshell] version = 2`, a singular
9494
`compute_driver` selector, and driver-owned settings under
95-
`[openshell.drivers.<name>]`. The gateway rejects legacy `compute_drivers`,
96-
`--drivers`, and `OPENSHELL_DRIVERS` selectors rather than silently migrating
97-
them. Homebrew and RPM package startup migrates only exact package-generated v1
98-
defaults. If an upgraded package still reports an unsupported version, inspect
99-
the active prefix or `~/.config/openshell/gateway.toml`; an edited v1 file must
95+
`[openshell.drivers.<name>]`. The gateway rejects legacy `compute_drivers` and
96+
`--drivers` selectors rather than silently migrating them. One valid, nonempty
97+
`OPENSHELL_DRIVERS` value remains a deprecated environment-only alias when the
98+
canonical selector is absent; the gateway selects that driver with a warning.
99+
Empty, invalid, comma-delimited, or conflicting values fail startup. Homebrew
100+
and RPM package startup migrates only exact package-generated v1 defaults. If
101+
an upgraded package still reports an unsupported version, inspect the active prefix or `~/.config/openshell/gateway.toml`; an edited v1 file must
100102
follow the published schema-v2 migration steps and must not be overwritten.
101103
Guest TLS CA, certificate, and key paths are the exception to driver ownership:
102104
configure the complete bundle under `[openshell.gateway]`, and the gateway

0 commit comments

Comments
 (0)