From 71158418c84e09d4b87100df22bb0953fd65c4b4 Mon Sep 17 00:00:00 2001 From: Michi Mutsuzaki Date: Thu, 5 Oct 2023 16:27:22 +0000 Subject: [PATCH] connectivity test: Fix detectFeatures() logic f5ac9776fb21 unintentionally changed the detectFeatures logic by calling ExtractFromConfigMap() and ExtractFromNodes() on ct.Features instead of the features variable declared at the beginning of the loop [^1]. Fixes: f5ac9776fb21 ("Refactor extractFeaturesFromConfigMap()") [^1]: https://github.com/cilium/cilium-cli/blob/f5ac9776fb217d883edc9f916cb61cb916576693/connectivity/check/features.go#L518 Signed-off-by: Michi Mutsuzaki --- connectivity/check/features.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connectivity/check/features.go b/connectivity/check/features.go index 678793a03c..2a6b24ebde 100644 --- a/connectivity/check/features.go +++ b/connectivity/check/features.go @@ -278,12 +278,12 @@ func (ct *ConnectivityTest) detectFeatures(ctx context.Context) error { // If unsure from which source to retrieve the information from, // prefer "CiliumStatus" over "ConfigMap" over "RuntimeConfig". // See the corresponding functions for more information. - ct.Features.ExtractFromConfigMap(ct.CiliumVersion, cm) + features.ExtractFromConfigMap(ct.CiliumVersion, cm) err = ct.extractFeaturesFromRuntimeConfig(ctx, ciliumPod, features) if err != nil { return err } - ct.Features.ExtractFromNodes(ct.nodesWithoutCilium) + features.ExtractFromNodes(ct.nodesWithoutCilium) err = ct.extractFeaturesFromCiliumStatus(ctx, ciliumPod, features) if err != nil { return err