diff --git a/.github/workflows/systemtest.yml b/.github/workflows/systemtest.yml index 46739f35..520c62d9 100644 --- a/.github/workflows/systemtest.yml +++ b/.github/workflows/systemtest.yml @@ -14,7 +14,9 @@ # the platform and org the credential ids below live in) # hetzner secrets SYSTEMTEST_SSH_KEY_CREDENTIAL_ID + SYSTEMTEST_HETZNER_CREDENTIAL_ID # ovh secrets SYSTEMTEST_SSH_KEY_CREDENTIAL_ID + SYSTEMTEST_OVH_CREDENTIAL_ID -# upcloud secrets SYSTEMTEST_SSH_KEY_CREDENTIAL_ID + SYSTEMTEST_UPCLOUD_CREDENTIAL_ID +# upcloud (opt-in) secrets SYSTEMTEST_SSH_KEY_CREDENTIAL_ID + SYSTEMTEST_UPCLOUD_CREDENTIAL_ID +# (never scheduled: UpCloud is too costly to test on routinely, so +# only a dispatch naming upcloud or uks runs either lane) # digitalocean secrets SYSTEMTEST_SSH_KEY_CREDENTIAL_ID + SYSTEMTEST_DIGITALOCEAN_CREDENTIAL_ID # aws (opt-in) see below # doks / uks / ovh_mks secret SYSTEMTEST_DIGITALOCEAN / _UPCLOUD / _OVH_CREDENTIAL_ID @@ -81,13 +83,13 @@ on: workflow_dispatch: inputs: providers: - description: 'Space-separated Ankra-managed providers to exercise (hetzner ovh upcloud digitalocean aws). Use "none" to skip the family. aws needs the SYSTEMTEST_AWS_* secrets and joins the scheduled default only when they exist.' + description: 'Space-separated Ankra-managed providers to exercise (hetzner ovh digitalocean upcloud aws). Use "none" to skip the family. upcloud is opt-in (never in the default: UpCloud is too costly to test on routinely). aws needs the SYSTEMTEST_AWS_* secrets and joins the scheduled default only when they exist.' required: false - default: 'hetzner ovh upcloud digitalocean' + default: 'hetzner ovh digitalocean' managed_providers: - description: 'Space-separated cloud-managed providers to exercise (doks uks gke ovh_mks aks eks). Use "none" to skip the family.' + description: 'Space-separated cloud-managed providers to exercise (doks gke ovh_mks aks eks uks). Use "none" to skip the family. uks is opt-in (never in the default: UpCloud is too costly to test on routinely).' required: false - default: 'doks uks gke ovh_mks aks eks' + default: 'doks gke ovh_mks aks eks' parallel: description: 'Run the selected targets concurrently (1) or one at a time (0).' required: false @@ -113,8 +115,8 @@ jobs: timeout-minutes: 240 env: ANKRA_SYSTEMTEST_CONFIRM: 'yes' - ANKRA_SYSTEMTEST_PROVIDERS: ${{ github.event.inputs.providers || 'hetzner ovh upcloud digitalocean' }} - ANKRA_SYSTEMTEST_MANAGED_PROVIDERS: ${{ github.event.inputs.managed_providers || 'doks uks gke ovh_mks aks eks' }} + ANKRA_SYSTEMTEST_PROVIDERS: ${{ github.event.inputs.providers || 'hetzner ovh digitalocean' }} + ANKRA_SYSTEMTEST_MANAGED_PROVIDERS: ${{ github.event.inputs.managed_providers || 'doks gke ovh_mks aks eks' }} ANKRA_SYSTEMTEST_PARALLEL: ${{ github.event.inputs.parallel || '1' }} # Opt-in autoscaling step (see the header comment). Only a manual # dispatch can turn it on: the schedule has no inputs, so it always diff --git a/systemtest/README.md b/systemtest/README.md index 25eb7155..d8c9a998 100644 --- a/systemtest/README.md +++ b/systemtest/README.md @@ -230,8 +230,8 @@ Common optional (defaults in parentheses): | Variable | Default | |---|---| -| `ANKRA_SYSTEMTEST_PROVIDERS` | `hetzner ovh upcloud digitalocean` (set to `""` to skip the Ankra-managed family; add `aws` for the opt-in AWS lane) | -| `ANKRA_SYSTEMTEST_MANAGED_PROVIDERS` | `doks uks gke ovh_mks aks eks` (set to `""` to skip the cloud-managed family) | +| `ANKRA_SYSTEMTEST_PROVIDERS` | `hetzner ovh digitalocean` (set to `""` to skip the Ankra-managed family; `upcloud` is opt-in only, as UpCloud is too costly to test on routinely; add `aws` for the opt-in AWS lane) | +| `ANKRA_SYSTEMTEST_MANAGED_PROVIDERS` | `doks gke ovh_mks aks eks` (set to `""` to skip the cloud-managed family; `uks` is opt-in only, for the same cost reason as `upcloud`) | | `ANKRA_SYSTEMTEST_DISTRIBUTIONS` | `k3s` (Ankra-managed only; set `"k3s kubeadm"` to matrix-test both) | | `ANKRA_SYSTEMTEST_PARALLEL` | `1` (run selected targets concurrently; set `0` for one-at-a-time) | | `ANKRA_SYSTEMTEST_PLAN_ONLY` | `0` (`1`: print which lanes would run and what each skipped lane is missing, then stop; under GitHub Actions also writes the job summary and the `requested_lanes`/`skipped_lanes`/`runnable_lanes` step outputs) | diff --git a/systemtest/lifecycle_systemtest.sh b/systemtest/lifecycle_systemtest.sh index 5846ee77..ff08920e 100755 --- a/systemtest/lifecycle_systemtest.sh +++ b/systemtest/lifecycle_systemtest.sh @@ -132,11 +132,13 @@ if [ ! -x "$ANKRA_BIN" ]; then fi # Ankra-managed (self-managed VMs) providers. Set to "" to skip the family. -ANKRA_SYSTEMTEST_PROVIDERS="${ANKRA_SYSTEMTEST_PROVIDERS-hetzner ovh upcloud digitalocean}" +# upcloud and uks are opt-in only: UpCloud is too costly to test on routinely, +# so neither runs unless a caller names it. +ANKRA_SYSTEMTEST_PROVIDERS="${ANKRA_SYSTEMTEST_PROVIDERS-hetzner ovh digitalocean}" # Cloud-managed (provider-native managed Kubernetes) providers, driven through # `ankra cluster managed`. Set to "" to skip the family. -ANKRA_SYSTEMTEST_MANAGED_PROVIDERS="${ANKRA_SYSTEMTEST_MANAGED_PROVIDERS-doks uks gke ovh_mks aks eks}" +ANKRA_SYSTEMTEST_MANAGED_PROVIDERS="${ANKRA_SYSTEMTEST_MANAGED_PROVIDERS-doks gke ovh_mks aks eks}" # Kubernetes distributions to exercise per Ankra-managed provider. Each # (provider, distribution) pair becomes its own cluster with the distribution diff --git a/systemtest/lifecycle_systemtest_test.go b/systemtest/lifecycle_systemtest_test.go index 97fe0c11..82aff7f4 100644 --- a/systemtest/lifecycle_systemtest_test.go +++ b/systemtest/lifecycle_systemtest_test.go @@ -117,7 +117,11 @@ func TestLanePlan(t *testing.T) { { // The job summary CI shows: configured lanes run, the rest are // counted and named by the repository secret they need. - name: "configured lanes run and the summary counts the skipped ones", + // The UpCloud credential is configured on purpose: UpCloud is + // too costly to test on routinely, so neither of its lanes is in + // the default set and a configured credential must not pull them + // back in. + name: "configured lanes run, the summary counts the skipped ones, and upcloud stays out of the default", env: map[string]string{ "ANKRA_API_TOKEN": "token", "SSH_KEY_CREDENTIAL_ID": "ssh", @@ -130,15 +134,29 @@ func TestLanePlan(t *testing.T) { wantOutput: []string{ "SKIP: ovh lane: missing SYSTEMTEST_OVH_CREDENTIAL_ID", "SKIP: managed/doks lane: missing SYSTEMTEST_DIGITALOCEAN_CREDENTIAL_ID", - "::warning title=Lifecycle lanes skipped::7 of 10 provider lanes skipped", - "runnable: hetzner upcloud / managed: uks", + "::warning title=Lifecycle lanes skipped::7 of 8 provider lanes skipped", + "runnable: hetzner / managed: none", }, + rejectOutput: []string{"upcloud", "uks"}, wantSummary: []string{ - "**7 of 10 provider lanes skipped: missing SYSTEMTEST_OVH_CREDENTIAL_ID, SYSTEMTEST_DIGITALOCEAN_CREDENTIAL_ID, SYSTEMTEST_GKE_CREDENTIAL_ID, SYSTEMTEST_AKS_CREDENTIAL_ID, SYSTEMTEST_EKS_CREDENTIAL_ID**", + "**7 of 8 provider lanes skipped: missing SYSTEMTEST_OVH_CREDENTIAL_ID, SYSTEMTEST_DIGITALOCEAN_CREDENTIAL_ID, SYSTEMTEST_GKE_CREDENTIAL_ID, SYSTEMTEST_AKS_CREDENTIAL_ID, SYSTEMTEST_EKS_CREDENTIAL_ID**", "| `hetzner` | Ankra-managed | runs | |", "| `managed/gke` | cloud-managed | **skipped** | SYSTEMTEST_GKE_CREDENTIAL_ID |", }, - wantOutputs: []string{"requested_lanes=10", "skipped_lanes=7", "runnable_lanes=3"}, + wantOutputs: []string{"requested_lanes=8", "skipped_lanes=7", "runnable_lanes=1"}, + }, + { + name: "the upcloud lanes still run when a caller names them", + env: map[string]string{ + "ANKRA_API_TOKEN": "token", + "SSH_KEY_CREDENTIAL_ID": "ssh", + "UPCLOUD_CREDENTIAL_ID": "upcloud-id", + "ANKRA_SYSTEMTEST_PROVIDERS": "upcloud", + "ANKRA_SYSTEMTEST_MANAGED_PROVIDERS": "uks", + }, + wantExit: 0, + wantOutput: []string{"runnable: upcloud / managed: uks"}, + rejectOutput: []string{"SKIP"}, }, { name: "without an API token or a saved login every lane is skipped",