kubernetes-sigs / cluster-api

Home for Cluster API, a subproject of sig-cluster-lifecycle
https://cluster-api.sigs.k8s.io
Apache License 2.0
3.44k stars 1.26k forks source link

Provider E2E Tests Using capie2e.ClusterClassRolloutSpec Fail Due to Extra Provider-Specific Labels #10714

Open zhanggbj opened 3 weeks ago

zhanggbj commented 3 weeks ago

What steps did you take and what happened?

  1. Using capie2e.ClusterClassRolloutSpec to run E2E Tests for CAPV
  2. As CAPV will add extra labels like "node.cluster.x-k8s.io/esxi-host": "10.2.32.5" by code here, the E2E Tests failed with error below
      <map[string]string | len:5>: {
          "topology.cluster.x-k8s.io/owned": "",
          "cluster.x-k8s.io/cluster-name": "clusterclass-rollout-gnfvcg",
          "cluster.x-k8s.io/control-plane": "",
          "cluster.x-k8s.io/control-plane-name": "clusterclass-rollout-gnfvcg-cp-vngr8",
          "node.cluster.x-k8s.io/esxi-host": "10.2.32.5",
      }
    to be equivalent to
      <e2e.unionMap | len:4>: {
          "topology.cluster.x-k8s.io/owned": "",
          "cluster.x-k8s.io/cluster-name": "clusterclass-rollout-gnfvcg",
          "cluster.x-k8s.io/control-plane": "",
          "cluster.x-k8s.io/control-plane-name": "clusterclass-rollout-gnfvcg-cp-vngr8",
      }
    In [It
  3. The failing test is due to here as it checks if they are equal.
  4. Here is a test failure in CAPV https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/pull/3023

What did you expect to happen?

Test passes.

Cluster API version

v1.7.1

Kubernetes version

No response

Anything else you would like to add?

Same situation for annotation check

Label(s) to be applied

/kind bug /area testing One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.

sbueringer commented 3 weeks ago

/triage accepted