From 77372cf3cf16124acf882df0ae113cf632fd3311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Skocze=C5=84?= Date: Fri, 26 Jul 2024 08:53:26 +0000 Subject: [PATCH] Label short workloads in scheduler_perf tests --- test/integration/scheduler_perf/README.md | 18 ++++++++++++++---- .../config/performance-config.yaml | 18 +++++++++--------- .../scheduler_perf/scheduler_test.go | 4 +--- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/test/integration/scheduler_perf/README.md b/test/integration/scheduler_perf/README.md index 0b2c07f2b26..287ed486244 100644 --- a/test/integration/scheduler_perf/README.md +++ b/test/integration/scheduler_perf/README.md @@ -111,11 +111,21 @@ make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_ARGS=-use Integration testing uses the same `config/performance-config.yaml` as benchmarking. By default, workloads labeled as `integration-test` -are executed as part of integration testing. `-test-scheduling-label-filter` can be used to -change that. +are executed as part of integration testing (in ci-kubernetes-integration-master job). +`-test-scheduling-label-filter` can be used to change that. +All test cases should have at least one workload labeled as `integration-test`. -Running the integration tests as above will only execute the workloads labeled as `short`. - `SHORT=--short=false` variable added to the command can be used to disable this filtering. +Running the integration tests with command above will only execute the workloads labeled as `short`. +`SHORT=--short=false` variable added to the command can be used to disable this filtering. We should make each test case with `short` label very small, so that all tests with the label should take less than 5 min to complete. +The test cases labeled as `short` are executed in pull-kubernetes-integration job. + +### Labels used by CI jobs + +| CI Job | Labels | +|----------------------------------|------------------------| +| ci-kubernetes-integration-master | integration-test | +| pull-kubernetes-integration | integration-test,short | +| ci-benchmark-scheduler-perf | performance | diff --git a/test/integration/scheduler_perf/config/performance-config.yaml b/test/integration/scheduler_perf/config/performance-config.yaml index ad5ba14dde3..f41ebe34461 100644 --- a/test/integration/scheduler_perf/config/performance-config.yaml +++ b/test/integration/scheduler_perf/config/performance-config.yaml @@ -29,7 +29,7 @@ collectMetrics: true workloads: - name: 5Nodes - labels: [integration-test, fast] + labels: [integration-test, fast, short] params: initNodes: 5 initPods: 5 @@ -70,7 +70,7 @@ namespace: sched-1 workloads: - name: 5Nodes - labels: [integration-test, fast] + labels: [integration-test, fast, short] params: initNodes: 5 initPods: 1 @@ -106,7 +106,7 @@ collectMetrics: true workloads: - name: 5Nodes - labels: [integration-test, fast] + labels: [integration-test, fast, short] params: initNodes: 5 initPods: 5 @@ -239,7 +239,7 @@ collectMetrics: true workloads: - name: 5Nodes - labels: [integration-test, fast] + labels: [integration-test, fast, short] params: initNodes: 5 initPods: 5 @@ -438,7 +438,7 @@ collectMetrics: true workloads: - name: 5Nodes - labels: [integration-test, fast] + labels: [integration-test, fast, short] params: initNodes: 5 initPods: 5 @@ -479,7 +479,7 @@ collectMetrics: true workloads: - name: 5Nodes - labels: [integration-test, fast] + labels: [integration-test, fast, short] params: initNodes: 5 initPods: 10 @@ -617,7 +617,7 @@ collectMetrics: true workloads: - name: 5Nodes - labels: [integration-test, fast] + labels: [integration-test, fast, short] params: initNodes: 5 initPods: 20 @@ -686,7 +686,7 @@ collectMetrics: true workloads: - name: 5Nodes/2InitPods - labels: [integration-test, fast] + labels: [integration-test, fast, short] params: initNodes: 5 initPods: 2 @@ -1181,7 +1181,7 @@ collectMetrics: true workloads: - name: fast - labels: [integration-test, fast] + labels: [integration-test, fast, short] params: # This testcase runs through all code paths without # taking too long overall. diff --git a/test/integration/scheduler_perf/scheduler_test.go b/test/integration/scheduler_perf/scheduler_test.go index 6ec8cb6212d..fc1dd5cb89e 100644 --- a/test/integration/scheduler_perf/scheduler_test.go +++ b/test/integration/scheduler_perf/scheduler_test.go @@ -18,8 +18,6 @@ package benchmark import ( "testing" - - "k8s.io/utils/ptr" ) func TestScheduling(t *testing.T) { @@ -32,7 +30,7 @@ func TestScheduling(t *testing.T) { } if testing.Short() { - testSchedulingLabelFilter = ptr.To(*testSchedulingLabelFilter + ",+short") + *testSchedulingLabelFilter += ",+short" } for _, tc := range testCases {