From dc753f4e756b8a02002bc8077cb6a3f6278988dd Mon Sep 17 00:00:00 2001 From: Utku Ozdemir Date: Mon, 28 Apr 2025 15:51:48 +0200 Subject: [PATCH] test: bump Talos version used in integration tests to `v1.10` Test 1.10 before release. Signed-off-by: Utku Ozdemir --- client/pkg/constants/constants.go | 2 +- cmd/integration-test/pkg/tests/auth.go | 6 +-- cmd/integration-test/pkg/tests/template.go | 8 ++-- cmd/integration-test/pkg/tests/tests.go | 2 +- frontend/src/api/resources.ts | 2 +- hack/test/integration.sh | 51 ++++++++++------------ internal/pkg/constants/versions.go | 7 ++- 7 files changed, 35 insertions(+), 43 deletions(-) diff --git a/client/pkg/constants/constants.go b/client/pkg/constants/constants.go index 68779e0f..95080138 100644 --- a/client/pkg/constants/constants.go +++ b/client/pkg/constants/constants.go @@ -14,7 +14,7 @@ const SecureBoot = "secureboot" // DefaultTalosVersion is pre-selected in the UI, default image and used in the integration tests. // // tsgen:DefaultTalosVersion -const DefaultTalosVersion = "1.9.5" +const DefaultTalosVersion = "1.10.1" const ( // TalosRegistry is the default Talos repository URL. diff --git a/cmd/integration-test/pkg/tests/auth.go b/cmd/integration-test/pkg/tests/auth.go index f60163e1..1a67a80b 100644 --- a/cmd/integration-test/pkg/tests/auth.go +++ b/cmd/integration-test/pkg/tests/auth.go @@ -455,7 +455,7 @@ func AssertAPIAuthz(rootCtx context.Context, rootCli *client.Client, clientConfi }, { namePrefix: "talos-etcd-status", - requiredRole: role.Operator, + requiredRole: role.Reader, assertSuccess: assertSuccess, assertFailure: func(t *testing.T, err error) { assert.Truef(t, status.Code(err) == codes.PermissionDenied, "unexpected error: %v", err) @@ -1243,7 +1243,7 @@ func AssertResourceAuthzWithACL(ctx context.Context, rootCli *client.Client, cli clusterUnauthorized := omni.NewCluster(resources.DefaultNamespace, "unauthorized-"+testID) clusterUnauthorized.TypedSpec().Value.TalosVersion = constants.DefaultTalosVersion - clusterUnauthorized.TypedSpec().Value.KubernetesVersion = "1.27.3" + clusterUnauthorized.TypedSpec().Value.KubernetesVersion = "1.28.3" userState := userCli.Omni().State() @@ -1259,7 +1259,7 @@ func AssertResourceAuthzWithACL(ctx context.Context, rootCli *client.Client, cli // create a cluster that is authorized to the user by the ACL clusterAuthorized := omni.NewCluster(resources.DefaultNamespace, clusterAuthorizedID) clusterAuthorized.TypedSpec().Value.TalosVersion = constants.DefaultTalosVersion - clusterAuthorized.TypedSpec().Value.KubernetesVersion = "1.27.3" + clusterAuthorized.TypedSpec().Value.KubernetesVersion = "1.28.3" err = userState.Create(ctx, clusterAuthorized) require.NoError(t, err) diff --git a/cmd/integration-test/pkg/tests/template.go b/cmd/integration-test/pkg/tests/template.go index 8b4dd073..dcc6bb9a 100644 --- a/cmd/integration-test/pkg/tests/template.go +++ b/cmd/integration-test/pkg/tests/template.go @@ -21,10 +21,8 @@ import ( "github.com/stretchr/testify/require" "github.com/siderolabs/omni/client/api/omni/specs" - clientconsts "github.com/siderolabs/omni/client/pkg/constants" "github.com/siderolabs/omni/client/pkg/omni/resources/omni" "github.com/siderolabs/omni/client/pkg/template/operations" - "github.com/siderolabs/omni/internal/pkg/constants" ) //go:embed testdata/cluster-1.tmpl.yaml @@ -50,7 +48,7 @@ func renderTemplate(t *testing.T, tmpl []byte, opts tmplOptions) []byte { } // AssertClusterTemplateFlow verifies cluster template operations. -func AssertClusterTemplateFlow(testCtx context.Context, st state.State) TestFunc { +func AssertClusterTemplateFlow(testCtx context.Context, st state.State, options MachineOptions) TestFunc { return func(t *testing.T) { ctx, cancel := context.WithTimeout(testCtx, 20*time.Minute) defer cancel() @@ -72,8 +70,8 @@ func AssertClusterTemplateFlow(testCtx context.Context, st state.State) TestFunc machineIDs = mIDs opts = tmplOptions{ - KubernetesVersion: "v" + constants.DefaultKubernetesVersion, - TalosVersion: "v" + clientconsts.DefaultTalosVersion, + KubernetesVersion: "v" + options.KubernetesVersion, + TalosVersion: "v" + options.TalosVersion, CP: machineIDs[:3], W: machineIDs[3:], diff --git a/cmd/integration-test/pkg/tests/tests.go b/cmd/integration-test/pkg/tests/tests.go index 9c216e4b..def537d7 100644 --- a/cmd/integration-test/pkg/tests/tests.go +++ b/cmd/integration-test/pkg/tests/tests.go @@ -1330,7 +1330,7 @@ Test flow of cluster creation and scaling using cluster templates.`, Subtests: []subTest{ { "TestClusterTemplateFlow", - AssertClusterTemplateFlow(ctx, rootClient.Omni().State()), + AssertClusterTemplateFlow(ctx, rootClient.Omni().State(), options.MachineOptions), }, }, Finalizer: DestroyCluster(ctx, rootClient.Omni().State(), "tmpl-cluster"), diff --git a/frontend/src/api/resources.ts b/frontend/src/api/resources.ts index 6bc4caa7..85692f4d 100644 --- a/frontend/src/api/resources.ts +++ b/frontend/src/api/resources.ts @@ -32,7 +32,7 @@ export const ServicePrefixAnnotationKey = "omni-kube-service-exposer.sidero.dev/ export const installDiskMinSize = 5e+09; export const authPublicKeyIDQueryParam = "public-key-id"; export const SecureBoot = "secureboot"; -export const DefaultTalosVersion = "1.9.5"; +export const DefaultTalosVersion = "1.10.1"; export const PatchWeightInstallDisk = 0; export const PatchBaseWeightCluster = 200; export const PatchBaseWeightMachineSet = 400; diff --git a/hack/test/integration.sh b/hack/test/integration.sh index 07409132..8b156100 100755 --- a/hack/test/integration.sh +++ b/hack/test/integration.sh @@ -20,7 +20,9 @@ echo "127.0.0.1 my-instance.localhost" | tee -a /etc/hosts # Settings. -TALOS_VERSION=1.9.5 +TALOS_VERSION=1.10.1 +ENABLE_TALOS_PRERELEASE_VERSIONS=false + ARTIFACTS=_out JOIN_TOKEN=testonly RUN_DIR=$(pwd) @@ -38,13 +40,24 @@ mkdir -p ${ARTIFACTS} [ -f ${ARTIFACTS}/talosctl ] || (crane export ghcr.io/siderolabs/talosctl:latest | tar x -C ${ARTIFACTS}) -# Your image schematic ID is: cf9b7aab9ed7c365d5384509b4d31c02fdaa06d2b3ac6cc0bc806f28130eff1f -# -# customization: -# systemExtensions: -# officialExtensions: -# - siderolabs/hello-world-service -SCHEMATIC_ID="cf9b7aab9ed7c365d5384509b4d31c02fdaa06d2b3ac6cc0bc806f28130eff1f" +# Determine the local IP SideroLink API will listen on +LOCAL_IP=$(ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p') + +# Prepare schematic with kernel args +SCHEMATIC=$( + cat <