Skip to content

Commit a044234

Browse files
committed
e2e: klog: Warningf -> Infof
we can do now this trivial conversion. Preparation to later transition to `InfoS` *NOT* AI-assisted: trivial search/replace is just more effective. Signed-off-by: Francesco Romani <[email protected]>
1 parent c5eb933 commit a044234

File tree

13 files changed

+41
-41
lines changed

13 files changed

+41
-41
lines changed

test/e2e/install/install_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ var _ = Describe("[Install] continuousIntegration", Serial, func() {
9393

9494
cond := status.FindCondition(updatedNROObj.Status.Conditions, status.ConditionAvailable)
9595
if cond == nil {
96-
klog.Warningf("missing conditions in %v", updatedNROObj)
96+
klog.Infof("missing conditions in %v", updatedNROObj)
9797
return false, err
9898
}
9999

@@ -122,7 +122,7 @@ var _ = Describe("[Install] continuousIntegration", Serial, func() {
122122
}
123123

124124
if ds.Status.NumberMisscheduled != 0 {
125-
klog.Warningf(" Misscheduled: There are %d nodes that should not be running Daemon pod but are", ds.Status.NumberMisscheduled)
125+
klog.Infof(" Misscheduled: There are %d nodes that should not be running Daemon pod but are", ds.Status.NumberMisscheduled)
126126
return false
127127
}
128128

@@ -182,7 +182,7 @@ var _ = Describe("[Install] durability", Serial, func() {
182182

183183
cond := status.FindCondition(updatedNROObj.Status.Conditions, status.ConditionDegraded)
184184
if cond == nil {
185-
klog.Warningf("missing conditions in %v", updatedNROObj)
185+
klog.Infof("missing conditions in %v", updatedNROObj)
186186
return false
187187
}
188188

@@ -219,7 +219,7 @@ var _ = Describe("[Install] durability", Serial, func() {
219219
return false, err
220220
}
221221
if len(nroObj.Status.DaemonSets) != 1 {
222-
klog.Warningf("unsupported daemonsets (/MCP) count: %d", len(nroObj.Status.DaemonSets))
222+
klog.Infof("unsupported daemonsets (/MCP) count: %d", len(nroObj.Status.DaemonSets))
223223
return false, nil
224224
}
225225
return true, nil
@@ -258,7 +258,7 @@ var _ = Describe("[Install] durability", Serial, func() {
258258
}
259259

260260
if !nrowait.AreDaemonSetPodsReady(&updatedDs.Status) {
261-
klog.Warningf("daemonset %s desired %d scheduled %d ready %d",
261+
klog.Infof("daemonset %s desired %d scheduled %d ready %d",
262262
dsKey.String(),
263263
updatedDs.Status.DesiredNumberScheduled,
264264
updatedDs.Status.CurrentNumberScheduled,
@@ -268,7 +268,7 @@ var _ = Describe("[Install] durability", Serial, func() {
268268

269269
klog.Infof("daemonset %s ready", dsKey.String())
270270

271-
klog.Warningf("daemonset Generation observed %v current %v", updatedDs.Status.ObservedGeneration, ds.Generation)
271+
klog.Infof("daemonset Generation observed %v current %v", updatedDs.Status.ObservedGeneration, ds.Generation)
272272
isUpdated := updatedDs.Status.ObservedGeneration > ds.Generation
273273
if !isUpdated {
274274
return false
@@ -315,7 +315,7 @@ var _ = Describe("[Install] durability", Serial, func() {
315315
key := client.ObjectKeyFromObject(obj)
316316
if err := e2eclient.Client.Get(context.TODO(), key, obj); !errors.IsNotFound(err) {
317317
if err == nil {
318-
klog.Warningf("obj %s still exists", key.String())
318+
klog.Infof("obj %s still exists", key.String())
319319
} else {
320320
klog.ErrorS(err, "obj return with error", "key", key.String())
321321
}
@@ -369,7 +369,7 @@ var _ = Describe("[Install] durability", Serial, func() {
369369
Expect(err).ToNot(HaveOccurred())
370370

371371
if len(updatedConfigMaps.Items) != 1 {
372-
klog.Warningf("expected exactly 1 RTE configmap, got: %d", len(updatedConfigMaps.Items))
372+
klog.Infof("expected exactly 1 RTE configmap, got: %d", len(updatedConfigMaps.Items))
373373
return false
374374
}
375375
rteConfigMap = &updatedConfigMaps.Items[0]
@@ -451,7 +451,7 @@ func getDaemonSetByOwnerReference(uid types.UID) (*appsv1.DaemonSet, error) {
451451
func logRTEPodsLogs(cli client.Client, k8sCli *kubernetes.Clientset, ctx context.Context, nroObj *nropv1.NUMAResourcesOperator, reason string) {
452452
dss, err := objects.GetDaemonSetsOwnedBy(cli, nroObj.ObjectMeta)
453453
if err != nil {
454-
klog.Warningf("no DaemonSets for %s (%s)", nroObj.Name, nroObj.GetUID())
454+
klog.Infof("no DaemonSets for %s (%s)", nroObj.Name, nroObj.GetUID())
455455
return
456456
}
457457

test/e2e/rte/rte_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var _ = ginkgo.Describe("with a running cluster with all the components", func()
7575
return false
7676
}
7777
if len(rteDss) == 0 {
78-
klog.Warningf("expect the numaresourcesoperator to own at least one DaemonSet")
78+
klog.Infof("expect the numaresourcesoperator to own at least one DaemonSet")
7979
return false
8080
}
8181

@@ -85,11 +85,11 @@ var _ = ginkgo.Describe("with a running cluster with all the components", func()
8585

8686
found, match := matchLogLevelToKlog(rteCnt, nropObj.Spec.LogLevel)
8787
if !found {
88-
klog.Warningf("-v flag doesn't exist in container %q args managed by DaemonSet: %q", rteCnt.Name, ds.Name)
88+
klog.Infof("-v flag doesn't exist in container %q args managed by DaemonSet: %q", rteCnt.Name, ds.Name)
8989
return false
9090
}
9191
if !match {
92-
klog.Warningf("LogLevel %s doesn't match the existing -v flag in container: %q under DaemonSet: %q", nropObj.Spec.LogLevel, rteCnt.Name, ds.Name)
92+
klog.Infof("LogLevel %s doesn't match the existing -v flag in container: %q under DaemonSet: %q", nropObj.Spec.LogLevel, rteCnt.Name, ds.Name)
9393
return false
9494
}
9595
}
@@ -114,7 +114,7 @@ var _ = ginkgo.Describe("with a running cluster with all the components", func()
114114
return false
115115
}
116116
if len(rteDss) == 0 {
117-
klog.Warningf("expect the numaresourcesoperator to own at least one DaemonSet")
117+
klog.Infof("expect the numaresourcesoperator to own at least one DaemonSet")
118118
return false
119119
}
120120

@@ -124,12 +124,12 @@ var _ = ginkgo.Describe("with a running cluster with all the components", func()
124124

125125
found, match := matchLogLevelToKlog(rteCnt, nropObj.Spec.LogLevel)
126126
if !found {
127-
klog.Warningf("-v flag doesn't exist in container %q args under DaemonSet: %q", rteCnt.Name, ds.Name)
127+
klog.Infof("-v flag doesn't exist in container %q args under DaemonSet: %q", rteCnt.Name, ds.Name)
128128
return false
129129
}
130130

131131
if !match {
132-
klog.Warningf("LogLevel %s doesn't match the existing -v flag in container: %q managed by DaemonSet: %q", nropObj.Spec.LogLevel, rteCnt.Name, ds.Name)
132+
klog.Infof("LogLevel %s doesn't match the existing -v flag in container: %q managed by DaemonSet: %q", nropObj.Spec.LogLevel, rteCnt.Name, ds.Name)
133133
return false
134134
}
135135
}
@@ -242,7 +242,7 @@ var _ = ginkgo.Describe("with a running cluster with all the components", func()
242242
gomega.Expect(err).ToNot(gomega.HaveOccurred())
243243

244244
if !reflect.DeepEqual(cm.Data, desiredMapState) {
245-
klog.Warningf("ConfigMap %q data is not in it's desired state, waiting for controller to update it", cm.Name)
245+
klog.Infof("ConfigMap %q data is not in it's desired state, waiting for controller to update it", cm.Name)
246246
return false
247247
}
248248
return true

test/e2e/sched/install/install_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ var _ = Describe("[Scheduler] install", func() {
6767

6868
cond := status.FindCondition(updatedNROObj.Status.Conditions, status.ConditionAvailable)
6969
if cond == nil {
70-
klog.Warningf("missing conditions in %v", updatedNROObj)
70+
klog.Infof("missing conditions in %v", updatedNROObj)
7171
return false
7272
}
7373

@@ -90,7 +90,7 @@ var _ = Describe("[Scheduler] install", func() {
9090
}
9191

9292
if deployment.Status.ReadyReplicas != *deployment.Spec.Replicas {
93-
klog.Warningf("Invalid number of ready replicas: desired: %d, actual: %d", *deployment.Spec.Replicas, deployment.Status.ReadyReplicas)
93+
klog.Infof("Invalid number of ready replicas: desired: %d, actual: %d", *deployment.Spec.Replicas, deployment.Status.ReadyReplicas)
9494
return false
9595
}
9696
return true

test/e2e/sched/sched_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ var _ = Describe("[Scheduler] imageReplacement", func() {
159159
}
160160
}
161161
if nroCM == nil {
162-
klog.Warningf("cannot match ConfigMap")
162+
klog.Infof("cannot match ConfigMap")
163163
return false
164164
}
165165

@@ -183,7 +183,7 @@ var _ = Describe("[Scheduler] imageReplacement", func() {
183183
}
184184

185185
if diff := cmp.Diff(nroCM.Data, initialCM.Data); diff != "" {
186-
klog.Warningf("updated ConfigMap data is not equal to the expected: %v", diff)
186+
klog.Infof("updated ConfigMap data is not equal to the expected: %v", diff)
187187
return false
188188
}
189189
return true
@@ -216,7 +216,7 @@ var _ = Describe("[Scheduler] imageReplacement", func() {
216216
}
217217

218218
if diff := cmp.Diff(dp.Spec.Template.Spec, initialDP.Spec.Template.Spec); diff != "" {
219-
klog.Warningf("updated Deployment is not equal to the expected: %v", diff)
219+
klog.Infof("updated Deployment is not equal to the expected: %v", diff)
220220
return false
221221
}
222222
return true

test/e2e/sched/uninstall/uninstall_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ var _ = Describe("[Scheduler] uninstall", func() {
6666
key := client.ObjectKeyFromObject(obj)
6767
if err := e2eclient.Client.Get(context.TODO(), key, obj); !errors.IsNotFound(err) {
6868
if err == nil {
69-
klog.Warningf("obj %s still exists", key.String())
69+
klog.Infof("obj %s still exists", key.String())
7070
} else {
7171
klog.ErrorS(err, "obj return with error", "key", key.String())
7272
}

test/e2e/serial/tests/configuration.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ var _ = Describe("[serial][disruptive] numaresources configuration management",
783783
Expect(err).ToNot(HaveOccurred())
784784

785785
if len(updatedConfigMaps.Items) == 0 {
786-
klog.Warningf("expected at least 1 RTE configmap, got: %d", len(updatedConfigMaps.Items))
786+
klog.Infof("expected at least 1 RTE configmap, got: %d", len(updatedConfigMaps.Items))
787787
return false
788788
}
789789
// choose the first one arbitrary
@@ -813,7 +813,7 @@ var _ = Describe("[serial][disruptive] numaresources configuration management",
813813

814814
matchingErr := configuration.CheckTopologyManagerConfigMatching(updatedNrtObj, &cfg)
815815
if matchingErr != "" {
816-
klog.Warningf("NRT %q doesn't match topologyManager configuration: %s", updatedNrtObj.Name, matchingErr)
816+
klog.Infof("NRT %q doesn't match topologyManager configuration: %s", updatedNrtObj.Name, matchingErr)
817817
return false
818818
}
819819
return true
@@ -932,7 +932,7 @@ var _ = Describe("[serial][disruptive] numaresources configuration management",
932932
err := e2eclient.Client.Get(ctx, client.ObjectKey{Namespace: ns, Name: dsName}, updatedConfigMap)
933933
if err != nil {
934934
if errors.IsNotFound(err) {
935-
klog.Warningf("expected RTE ConfigMap map to be found %q", key)
935+
klog.Infof("expected RTE ConfigMap map to be found %q", key)
936936
return false
937937
}
938938
Expect(err).ToNot(HaveOccurred())
@@ -960,14 +960,14 @@ var _ = Describe("[serial][disruptive] numaresources configuration management",
960960
updatedNrtObj := &nrtv1alpha2.NodeResourceTopology{}
961961
if err := e2eclient.Client.Get(ctx, client.ObjectKey{Name: node.Name}, updatedNrtObj); err != nil {
962962
if errors.IsNotFound(err) {
963-
klog.Warningf("NRT %q was not found, waiting for its creation", updatedNrtObj.Name)
963+
klog.Infof("NRT %q was not found, waiting for its creation", updatedNrtObj.Name)
964964
return false
965965
}
966966
Expect(err).ToNot(HaveOccurred())
967967
}
968968
matchingErr := configuration.CheckTopologyManagerConfigMatching(updatedNrtObj, &cfg)
969969
if matchingErr != "" {
970-
klog.Warningf("NRT %q doesn't match topologyManager configuration: %s", updatedNrtObj.Name, matchingErr)
970+
klog.Infof("NRT %q doesn't match topologyManager configuration: %s", updatedNrtObj.Name, matchingErr)
971971
return false
972972
}
973973
return true

test/e2e/serial/tests/non_regression.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ var _ = Describe("[serial][disruptive][scheduler] numaresources workload placeme
505505
Expect(err).ToNot(HaveOccurred())
506506
if !schedOK {
507507
errorPods += 1
508-
klog.Warningf("pod %s/%s was NOT scheduled with %q", pod.Namespace, pod.Name, schedulerName)
508+
klog.Infof("pod %s/%s was NOT scheduled with %q", pod.Namespace, pod.Name, schedulerName)
509509
continue
510510
}
511511
}

test/e2e/serial/tests/resource_accounting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ func checkNRTConsumedResources(fxt *e2efixture.Fixture, targetNrtInitial nrtv1al
776776
match, err := e2enrt.CheckZoneConsumedResourcesAtLeast(targetNrtInitial, targetNrtCurrent, requiredRes, corev1qos.GetPodQOS(updatedPod))
777777
Expect(err).ToNot(HaveOccurred())
778778
if match == "" {
779-
klog.Warningf("inconsistent accounting: no resources consumed by the running pod,\nNRT before: %s \nNRT after: %s \npod resources: %v", intnrt.ToString(targetNrtInitial), intnrt.ToString(targetNrtCurrent), e2ereslist.ToString(requiredRes))
779+
klog.Infof("inconsistent accounting: no resources consumed by the running pod,\nNRT before: %s \nNRT after: %s \npod resources: %v", intnrt.ToString(targetNrtInitial), intnrt.ToString(targetNrtCurrent), e2ereslist.ToString(requiredRes))
780780
}
781781
return targetNrtCurrent, match
782782
}

test/e2e/serial/tests/scheduler_cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,11 +691,11 @@ func filterAnyZoneProvidingResourcesAtMost(nrts []nrtv1alpha2.NodeResourceTopolo
691691
matches++
692692
}
693693
if matches == 0 {
694-
klog.Warningf("SKIP: node %q does NOT provide %q at all!", nrt.Name, resourceName)
694+
klog.Infof("SKIP: node %q does NOT provide %q at all!", nrt.Name, resourceName)
695695
continue
696696
}
697697
if matches > maxZones {
698-
klog.Warningf("SKIP: node %q provides %q on %d zones (looking max=%d)", nrt.Name, resourceName, matches, maxZones)
698+
klog.Infof("SKIP: node %q provides %q on %d zones (looking max=%d)", nrt.Name, resourceName, matches, maxZones)
699699
continue
700700
}
701701
klog.Infof(" ADD: node %q provides %q on %d/%d zones", nrt.Name, resourceName, matches, len(nrt.Zones))

test/e2e/serial/tests/workload_placement.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ var _ = Describe("[serial][disruptive][scheduler] numaresources workload placeme
297297
return false
298298
}
299299
if len(pods) != 1 {
300-
klog.Warningf("%d pods are exists under deployment %q", len(pods), namespacedDpName)
300+
klog.Infof("%d pods are exists under deployment %q", len(pods), namespacedDpName)
301301
return false
302302
}
303303
return true
@@ -406,7 +406,7 @@ var _ = Describe("[serial][disruptive][scheduler] numaresources workload placeme
406406
return false
407407
}
408408
if len(pods) != 1 {
409-
klog.Warningf("%d pods are exists under deployment %q", len(pods), namespacedDpName)
409+
klog.Infof("%d pods are exists under deployment %q", len(pods), namespacedDpName)
410410
return false
411411
}
412412
return true
@@ -668,7 +668,7 @@ var _ = Describe("[serial][disruptive][scheduler] numaresources workload placeme
668668
return false
669669
}
670670
if len(pods) != 2 {
671-
klog.Warningf("%d pods are exists under deployment %q", len(pods), namespacedDpName)
671+
klog.Infof("%d pods are exists under deployment %q", len(pods), namespacedDpName)
672672
return false
673673
}
674674
return true
@@ -842,7 +842,7 @@ var _ = Describe("[serial][disruptive][scheduler] numaresources workload placeme
842842
return false
843843
}
844844
if len(pods) != int(replicaNumber) {
845-
klog.Warningf("%d pods are exists under replicaset %q", len(pods), namespacedRsName.String())
845+
klog.Infof("%d pods are exists under replicaset %q", len(pods), namespacedRsName.String())
846846
return false
847847
}
848848
return true
@@ -940,7 +940,7 @@ var _ = Describe("[serial][disruptive][scheduler] numaresources workload placeme
940940
return false
941941
}
942942
if len(pods) != int(replicaNumber) {
943-
klog.Warningf("%d pods are exists under replicaset %q", len(pods), namespacedRsName.String())
943+
klog.Infof("%d pods are exists under replicaset %q", len(pods), namespacedRsName.String())
944944
return false
945945
}
946946
return true

0 commit comments

Comments
 (0)