Commit Graph

5641 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
ef4add4509 Merge pull request #133356 from mayuka-c/issue-133175
Replace usage of deprecated ErrWaitTimeout with recommended method across all Pkgs
2025-09-05 06:43:34 -07:00
Kubernetes Prow Robot
76ab726b8e Merge pull request #133875 from pohly/apimachinery-apply-flake
apply integration test: fix ordering test flake
2025-09-03 14:03:23 -07:00
Patrick Ohly
7e9b228ff0 apply integration test: fix ordering test flake
Most of the time the managed fields were returned in the order as expected,
but not always. Semantically the order is irrelevant, so the comparison gets
relaxed to ignore it by normalizing first.
2025-09-03 16:50:42 +02:00
Patrick Ohly
07faaec2c4 scheduler-perf: fix data race in createPodsSteadily
A mutex lock around decrementing runningPods was missing, leading to a data
race report in ci-kubernetes-integration-race-master:

WARNING: DATA RACE
Read at 0x00c001bd20a8 by goroutine 95696:
  k8s.io/kubernetes/test/integration/scheduler_perf.createPodsSteadily.func7()
      /home/prow/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_perf.go:2133 +0x238
  ...

Previous write at 0x00c001bd20a8 by goroutine 101407:
  k8s.io/kubernetes/test/integration/scheduler_perf.createPodsSteadily.func5()
      /home/prow/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_perf.go:2064 +0x1a4
  ...
2025-09-03 10:34:38 +02:00
Kubernetes Prow Robot
a6693542b7 Merge pull request #133781 from pohly/test-apiserver-flag-registration
test/integration/apiserver: fix several data races
2025-09-02 13:09:17 -07:00
Patrick Ohly
fa1f9d444c apiserver: avoid default toleration seconds data race for all tests
This reverts commit 2e756e7412,
which addressed the data race only for test/integration/apiserver/oidc.
It also occurs for test/integration/controlplane/transformation:

    WARNING: DATA RACE
    Read at 0x000008b9de38 by goroutine 104616:
      k8s.io/kubernetes/plugin/pkg/admission/defaulttolerationseconds.RegisterFlags()
          /home/prow/go/src/k8s.io/kubernetes/plugin/pkg/admission/defaulttolerationseconds/admission.go:42 +0x30
      k8s.io/kubernetes/pkg/kubeapiserver/options.registerAllAdmissionPluginFlags()
          /home/prow/go/src/k8s.io/kubernetes/pkg/kubeapiserver/options/plugins.go:115 +0x64
      k8s.io/kubernetes/pkg/kubeapiserver/options.(*AdmissionOptions).AddFlags()
          /home/prow/go/src/k8s.io/kubernetes/pkg/kubeapiserver/options/admission.go:73 +0x55
      k8s.io/kubernetes/pkg/controlplane/apiserver/options.(*Options).AddFlags()
          /home/prow/go/src/k8s.io/kubernetes/pkg/controlplane/apiserver/options/options.go:154 +0x388
      k8s.io/kubernetes/cmd/kube-apiserver/app/options.(*ServerRunOptions).Flags()
          /home/prow/go/src/k8s.io/kubernetes/cmd/kube-apiserver/app/options/options.go:101 +0x73
      k8s.io/kubernetes/cmd/kube-apiserver/app/testing.StartTestServer()
          /home/prow/go/src/k8s.io/kubernetes/cmd/kube-apiserver/app/testing/testserver.go:219 +0xb77
      k8s.io/kubernetes/test/integration/controlplane/transformation.newTransformTest()
          /home/prow/go/src/k8s.io/kubernetes/test/integration/controlplane/transformation/transformation_test.go:131 +0x6d0
      k8s.io/kubernetes/test/integration/controlplane/transformation.TestKMSv2Healthz()
          /home/prow/go/src/k8s.io/kubernetes/test/integration/controlplane/transformation/kmsv2_transformation_test.go:874 +0x1c8
      testing.tRunner()
          /usr/local/go/src/testing/testing.go:1792 +0x225
      testing.(*T).Run.gowrap1()
          /usr/local/go/src/testing/testing.go:1851 +0x44

    Previous write at 0x000008b9de38 by goroutine 111926:
      github.com/spf13/pflag.newInt64Value()
          /home/prow/go/src/k8s.io/kubernetes/vendor/github.com/spf13/pflag/int64.go:9 +0x49
      github.com/spf13/pflag.(*FlagSet).Int64Var()
          /home/prow/go/src/k8s.io/kubernetes/vendor/github.com/spf13/pflag/int64.go:41 +0x3d
      k8s.io/kubernetes/plugin/pkg/admission/defaulttolerationseconds.RegisterFlags()
          /home/prow/go/src/k8s.io/kubernetes/plugin/pkg/admission/defaulttolerationseconds/admission.go:42 +0x25
      k8s.io/kubernetes/pkg/kubeapiserver/options.registerAllAdmissionPluginFlags()
          /home/prow/go/src/k8s.io/kubernetes/pkg/kubeapiserver/options/plugins.go:115 +0x64
      k8s.io/kubernetes/pkg/kubeapiserver/options.(*AdmissionOptions).AddFlags()
          /home/prow/go/src/k8s.io/kubernetes/pkg/kubeapiserver/options/admission.go:73 +0x55
      k8s.io/kubernetes/pkg/controlplane/apiserver/options.(*Options).AddFlags()
          /home/prow/go/src/k8s.io/kubernetes/pkg/controlplane/apiserver/options/options.go:154 +0x388
      k8s.io/kubernetes/cmd/kube-apiserver/app/options.(*ServerRunOptions).Flags()
          /home/prow/go/src/k8s.io/kubernetes/cmd/kube-apiserver/app/options/options.go:101 +0x73
      k8s.io/kubernetes/cmd/kube-apiserver/app/testing.StartTestServer()
          /home/prow/go/src/k8s.io/kubernetes/cmd/kube-apiserver/app/testing/testserver.go:219 +0xb77
      k8s.io/kubernetes/test/integration/controlplane/transformation.newTransformTest()
          /home/prow/go/src/k8s.io/kubernetes/test/integration/controlplane/transformation/transformation_test.go:131 +0x6d0
      k8s.io/kubernetes/test/integration/controlplane/transformation.TestKMSv2FeatureFlag()
          /home/prow/go/src/k8s.io/kubernetes/test/integration/controlplane/transformation/kmsv2_transformation_test.go:1009 +0x117
      testing.tRunner()
          /usr/local/go/src/testing/testing.go:1792 +0x225
      testing.(*T).Run.gowrap1()
          /usr/local/go/src/testing/testing.go:1851 +0x44

A more general solution is to lock while registering the variables (= write)
and while reading the variables once in InspectFeatureGates.
2025-09-02 21:01:04 +02:00
Patrick Ohly
ad9ae3ab9d test: fix data race in test/integration/controlplane/transformation
TestKMSv2ProviderKeyIDStaleness runs two tests which both modify
kmsv2.NowFunc temporarily. Those two cannot run in parallel. They can be run in
parallel with other tests because nothing else changes kmsv2.NowFunc.

Found during local testing.
2025-09-02 21:01:04 +02:00
Kubernetes Prow Robot
cb163eb55b Merge pull request #133782 from aojea/lockDisableAllocatorDualWrite
lock DisableAllocatorDualWrite
2025-09-01 22:43:40 -07:00
Kubernetes Prow Robot
5fb3296920 Merge pull request #132451 from macsko/fix_race_in_scheduler_integration_tests
Fix race in scheduler integration tests
2025-08-31 05:03:09 -07:00
Antonio Ojea
8a6f173652 lock DisableAllocatorDualWrite 2025-08-29 19:50:56 +00:00
Kubernetes Prow Robot
6b33567f9b Merge pull request #133684 from soltysh/drop_StatefulSetAutoDeletePVC
Drop StatefulSetAutoDeletePVC after the feature GA-ed in 1.32
2025-08-28 10:49:15 -07:00
Maciej Szulik
09e357d31f Drop StatefulSetAutoDeletePVC after the feature GA-ed in 1.32
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-08-28 13:35:16 +02:00
Stephen Kitt
c35d5473dd Remove the otel semantics override
With the bump to otelhttp 0.61, this is no longer necessary.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-08-28 09:23:06 +02:00
Kubernetes Prow Robot
f0ee0ddc55 Merge pull request #133703 from macsko/fix_flaking_readyz_check_integration
Fix flaking readyz check in scheduler TestEndpointHandlers
2025-08-27 20:24:35 -07:00
Kubernetes Prow Robot
e162622b5c Merge pull request #133621 from pohly/scheduler-perf-klog-race
scheduler_perf: fix data race warning around klog flush
2025-08-27 20:23:51 -07:00
Kubernetes Prow Robot
63013fca52 Merge pull request #133585 from KobayashiD27/dra-fix-bindingcond-integration-flake
DRA: Fix flake in dra BindingConditions integration test
2025-08-27 20:23:23 -07:00
Kubernetes Prow Robot
993d286230 Merge pull request #133398 from macsko/split_preemption_integration_tests_to_mitigate_timeout
Split preemption integration tests to mitigate the timeout
2025-08-27 17:18:26 -07:00
Kubernetes Prow Robot
dd7ae1fc4f Merge pull request #133319 from dashpole/test_new_semconv
Migrate tracing tests to use the new otelhttp semantic conventions
2025-08-27 17:17:20 -07:00
Kubernetes Prow Robot
36a1587dbf Merge pull request #133080 from togettoyou/cleanup-scheduler_perf_TODO
scheduler_perf: remove outdated TODO comments
2025-08-27 16:05:27 -07:00
Maciej Skoczeń
1c336e3fc6 Fix flaking readyz check in scheduler integration tests 2025-08-26 10:28:47 +00:00
Patrick Ohly
f6b3f916b1 scheduler_perf: fix data race warning around klog flush
Explicitly shutting down background flushing addresses the following data race:

    WARNING: DATA RACE
    Write at 0x0000091173b8 by goroutine 166:
      k8s.io/component-base/logs/api/v1.apply.FlushLogger.func2()
          /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/contextual.go:95 +0x35
      k8s.io/klog/v2.SetLoggerWithOptions()
          /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/contextual.go:75 +0xb4
      k8s.io/component-base/logs/api/v1.apply()
          /nvme/gopath/src/k8s.io/kubernetes/staging/src/k8s.io/component-base/logs/api/v1/options.go:277 +0x10fb
      k8s.io/component-base/logs/api/v1.validateAndApply()
          /nvme/gopath/src/k8s.io/kubernetes/staging/src/k8s.io/component-base/logs/api/v1/options.go:132 +0x90
      k8s.io/component-base/logs/api/v1.ValidateAndApply()
          /nvme/gopath/src/k8s.io/kubernetes/staging/src/k8s.io/component-base/logs/api/v1/options.go:94 +0xd4
      k8s.io/component-base/logs/api/v1.ResetForTest()
          /nvme/gopath/src/k8s.io/kubernetes/staging/src/k8s.io/component-base/logs/api/v1/options.go:314 +0xd5
      k8s.io/kubernetes/test/integration/scheduler_perf.setupTestCase.func1()
          /nvme/gopath/src/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_perf.go:1062 +0x95
      testing.(*common).Cleanup.func1()
          /nvme/gopath/go-1.24.0/src/testing/testing.go:1211 +0x16f
      testing.(*common).runCleanup()
          /nvme/gopath/go-1.24.0/src/testing/testing.go:1445 +0x2b3
      testing.(*common).runCleanup()
          /nvme/gopath/go-1.24.0/src/testing/testing.go:1445 +0x2b3
      testing.tRunner.func2()
          /nvme/gopath/go-1.24.0/src/testing/testing.go:1786 +0x4c
      runtime.deferreturn()
          /nvme/gopath/go-1.24.0/src/runtime/panic.go:605 +0x5d
      k8s.io/apiserver/pkg/endpoints.(*APIInstaller).Install()
          /nvme/gopath/src/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go:208 +0x3ad

    ...

    Previous read at 0x0000091173b8 by goroutine 169:
      k8s.io/klog/v2.(*loggingT).flushAll()
          /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/klog.go:1215 +0x166
      k8s.io/klog/v2.(*loggingT).lockAndFlushAll()
          /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/klog.go:1193 +0x58
      k8s.io/klog/v2.(*loggingT).lockAndFlushAll-fm()
          <autogenerated>:1 +0x33
      k8s.io/klog/v2.(*flushDaemon).run.func1()
          /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/klog.go:1143 +0x179

That the cleanup code is shown as being called by runtime/panic.go and
k8s.io/apiserver/pkg/endpoints/installer.go seems to be an oddity of `go test
-race`. Under a debugger it gets called normally, without a panic, and the test
finishes normally either way.

It's debatable whether StopFlushDaemon should be called by the caller of
ResetForTest or by ResetForTest itself. It's explicitly called out as "not
thread safe", so making the caller responsible seems appropriate.
2025-08-20 12:01:56 +02:00
Kobayashi,Daisuke
97a146d47d Refactor error handling: reuse err inside closures and avoid re-shadowing 2025-08-18 22:33:14 +00:00
Kobayashi,Daisuke
38da6d767d DRA: Fixed ResourceClaim UpdateStatus to wrap with RetryOnConflict to automatically retry in the event of a conflict. 2025-08-18 00:46:51 +00:00
Junhao Zou
a405844e66 scheduler_perf(fix): correct typos, clarify comments, and minor tweaks 2025-08-15 16:34:38 +08:00
Jefftree
3fc91586a7 Fix metrics test 2025-08-07 13:59:19 +00:00
Maciej Skoczeń
dc0343c2f7 Split preemption integration tests to mitigate the timeout 2025-08-06 08:59:15 +00:00
Maciej Skoczeń
aa59f930b3 Add lock to TestAsyncPreemption to prevent races 2025-08-05 09:43:12 +00:00
Mayuka Channankaiah
6c56d2fd1b Replace usage of deprecated ErrWaitTimeout with recommended method across all Pkgs 2025-08-01 14:18:06 +05:30
Maciej Skoczeń
0fbc8cd44c Remove integration-test labels from long running scheduler_perf workloads 2025-08-01 07:18:26 +00:00
yliao
65fda6dd34 fixed exended resource scheduling performance test, added more nodes for scheduling the init pods 2025-07-31 18:15:55 +00:00
Kubernetes Prow Robot
9e2a0c7453 Merge pull request #133293 from utam0k/kep-5278--fg-alpha
Demote KEP-5278 feature gates ClearingNominatedNodeNameAfterBinding and NominatedNodeNameForExpectation to Alpha
2025-07-31 02:37:16 -07:00
David Ashpole
78c9672deb migrate tracing tests to use the new otelhttp semantic conventions 2025-07-30 17:12:26 +00:00
Kubernetes Prow Robot
29e66a698f Merge pull request #133299 from macsko/split_dra_scheduler_perf
Split DRA scheduler_perf tests into multiple packages
2025-07-30 06:38:26 -07:00
Maciej Skoczeń
c7db6362fe Move NominatedNodeName preemption-related integration tests to a new package 2025-07-30 10:47:38 +00:00
Maciej Skoczeń
07c71097d3 Split DRA scheduler_perf tests into multiple packages 2025-07-30 09:06:34 +00:00
utam0k
988c9b03fd Demote KEP-5278 feature gates ClearingNominatedNodeNameAfterBinding and NominatedNodeNameForExpectation to Alpha
Signed-off-by: utam0k <k0ma@utam0k.jp>
2025-07-30 15:48:26 +09:00
Sunyanan Choochotkaew
7f052afaef KEP 5075: implement scheduler
Signed-off-by: Sunyanan Choochotkaew <sunyanan.choochotkaew1@ibm.com>
2025-07-30 09:52:49 +09:00
Kubernetes Prow Robot
1b273b385e Merge pull request #130653 from yliaog/master
kubelet and scheduler for extended resource backed by DRA
2025-07-29 13:04:27 -07:00
yliao
23d6f73e72 extended resource backed by DRA: test 2025-07-29 18:55:28 +00:00
Kubernetes Prow Robot
74f7a44966 Merge pull request #133276 from macsko/stop_clearing_nnn_in_all_cases
KEP-5278 Stop clearing NominatedNodeName in all cases
2025-07-29 11:24:40 -07:00
Kubernetes Prow Robot
f142852b07 Merge pull request #133270 from aramase/aramase/i/deflake_issue_133249
test: fix TestStructuredAuthenticationConfigReload flake by handling expected network errors
2025-07-29 10:12:42 -07:00
Kubernetes Prow Robot
fd3c879a5b Merge pull request #132443 from utam0k/clearn-nnn-bind-api
Clear pod.Status.NominatedNodeName when pod is bound
2025-07-29 10:12:26 -07:00
utam0k
60fa65db88 Clear pod.Status.NominatedNodeName when pod is bound
Signed-off-by: utam0k <k0ma@utam0k.jp>
2025-07-29 23:48:11 +09:00
Kubernetes Prow Robot
e2ab840708 Merge pull request #130160 from KobayashiD27/dra-device-binding-conditions
Implement DRA Device Binding Conditions (KEP-5007)
2025-07-29 07:34:26 -07:00
Maciej Skoczeń
aea0a3cca2 Run all relevant test cases with the feature gate enabled and disabled 2025-07-29 12:21:03 +00:00
utam0k
856e7d2383 scheduler: Stop clearing NominatedNodeName on all cases
Signed-off-by: utam0k <k0ma@utam0k.jp>
2025-07-29 12:21:03 +00:00
Kobayashi,Daisuke
6653ef652b KEP-5007 DRA Device Binding Conditions: Add dra integration test 2025-07-29 11:36:07 +00:00
Kensei Nakada
ac9fad6030 feat: trigger PreFilterPreBind in the binding cycle 2025-07-29 19:01:02 +09:00
Anish Ramasekar
48eef9ce9a test: fix TestStructuredAuthenticationConfigReload flake by handling expected network errors
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-07-29 08:06:39 +00:00
Kensei Nakada
f3466f8adc fix: flake integration test 2025-07-28 23:12:58 +09:00