test(e2e): install openshell CLI via console-recommended command - #219
test(e2e): install openshell CLI via console-recommended command#219JuanmaBM wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Instead of pinning the openshell CLI version in the CI workflow, the e2e test now derives it from the reconciled gateway_version API field and installs the CLI with the exact command the console recommends to users (buildOpenShellInstallCommand). This keeps CI exercising the shipped install path and guards it against breakage for downstream gateway images whose reported version carries a "-rh…" build suffix. - lib.sh: add openshell_installer_version() mirroring the UI derivation rule (trim, drop first "-"+suffix, ensure leading "v"), plus E2E_OPENSHELL_INSTALL / OPENSHELL_INSTALL_SCRIPT_URL / E2E_GATEWAY_VERSION_TIMEOUT defaults. - e2e-openshell.sh: poll the API for gateway_version, install via the recommended command, and assert the installed version matches. - e2e.yml: drop the hardcoded pinned install step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3758d21 to
10db013
Compare
CI status
No action needed on the e2e failures before #210 merges. |
|
Update: the No change needed here: this stays red until #210 merges into |
Note
Depends on #210 — this is a stacked, draft PR based on
feature/gateway-version-install. GitHub will auto-retarget it tomainonce #210 merges; at that point it can be marked ready for review.Summary
The e2e test used to install the
openshellCLI from a version pinned by hand in the CI workflow (v0.0.110), independent of the gateway image under test. This makes the e2e test install the CLI the same way the console recommends to users — by deriving the version from the reconciledgateway_versionAPI field (added in #210) and running the exactinstall.sh | OPENSHELL_VERSION=… shcommand the UI builds.This matters because we're about to run downstream
openshell-gatewayimages: their reported version carries a-rh…build suffix, and we need the recommended install command to keep working for them.Changes
tests/e2e/lib.sh— addopenshell_installer_version(), a pure helper mirroringbuildOpenShellInstallCommandinpackages/gateway-management-ui/src/gateways/gateway-connections.ts(trim → drop the first-and everything after → ensure a leadingv). New env defaults:E2E_OPENSHELL_INSTALL(auto/always/never),OPENSHELL_INSTALL_SCRIPT_URL,E2E_GATEWAY_VERSION_TIMEOUT.tests/e2e/e2e-openshell.sh— step 5 polls the API forgateway_version, installs the CLI with the console-recommended command, and asserts the installedopenshell --versionmatches the derived version. The early presence check is relaxed (the CLI is installed after provisioning);E2E_OPENSHELL_INSTALL=neverkeeps the strict pre-installed behavior..github/workflows/e2e.yml— drop the hardcoded pinned install step.Guardrail
Because
install.shpinsOPENSHELL_VERSIONexactly, a version that doesn't resolve to a real upstream release (e.g. a mis-trimmed downstream suffix) fails the test at the version-match assertion instead of silently installing the wrong CLI.Note on keeping in lockstep
The version-derivation rule is intentionally duplicated in bash.
lib.shdocumentsbuildOpenShellInstallCommandas the canonical source; the two must stay in sync.Validation
bash -non both scripts; workflow YAML parses.openshell_installer_versionacross cases including the downstream suffix (v0.0.109-rh9a8f8 → v0.0.109) and the empty/--prefixed cases the UI treats as undefined.🤖 Generated with Claude Code