Commit Graph

10314 Commits

Author SHA1 Message Date
Jefftree
c597cc1f30 Allow OpenAPI verification to pass both with and without strict alpha
handling
2025-03-05 21:31:40 +00:00
Joe Betz
3210f46b5b Add validation-gen to codegen scripts
Add validation-gen to repository wide codegen scripts and introduce
`./hack/update-codegen.sh validation` as a quick way to run validation-gen.
2025-03-03 09:49:50 -05:00
David Ashpole
29c219dceb update go.opentelemetry.io dependencies to v1.33.0/v0.58.0 2025-03-01 19:18:34 +00:00
Patrick Ohly
650db7fab9 golangci-lint: temporarily suppress known issues in the code base
These suppressions are necessary to make golangci-lint 1.64 pass with the
current code base. This change is meant to be backported to release
branches. On master, we may want to revert some of it together with fixing the
findings.
2025-02-26 16:09:28 +01:00
Jordan Liggitt
43509b63d7 Bump hack/tools to github.com/golangci/golangci-lint 1.64.5 for go 1.24 2025-02-26 11:27:14 +01:00
cpanato
88300c406b bump go.mod to set min go1.24
Signed-off-by: cpanato <ctadeu@gmail.com>
2025-02-26 11:27:07 +01:00
cpanato
597b54720e Bump images, dependencies and versions to go 1.24.0
Signed-off-by: cpanato <ctadeu@gmail.com>
2025-02-26 11:26:54 +01:00
Kubernetes Prow Robot
06d81cfc7a Merge pull request #130359 from my-git9/assertion1
fix wrong assertion on tests
2025-02-24 05:18:34 -08:00
Kubernetes Prow Robot
7bd0477a95 Merge pull request #130337 from pohly/hack-jenkins-split
hack: split up test-dockerized.sh
2025-02-24 00:26:27 -08:00
xin.li
d92c70b826 enable go-required check
Signed-off-by: xin.li <xin.li@daocloud.io>
2025-02-24 10:38:44 +08:00
Lionel Jouin
e9c47f8601 Add codegen::register to hack/update-codegen.sh
Co-authored-by: Joe Betz <jpbetz@google.com>
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2025-02-23 19:51:12 +01:00
Patrick Ohly
a20a959b2c hack: split up test-dockerized.sh
This enables testing command and integration tests separately in CI jobs. The
goal is to reduce pull-kubernetes-integration to testing really just the Go
test/integration tests and to add a pull-kubernetes-cmd job for command tests.

hack/jenkins/test-dockerized.sh does the same as before because some jobs will
probably continue to use it.
2025-02-22 09:39:54 +01:00
Jefftree
4cc32f817a Remove cloud-provider arg for kube-apiserver in local-up-cluster.sh 2025-02-19 22:09:16 +00:00
Kubernetes Prow Robot
d93583654c Merge pull request #130176 from liggitt/go-tools
Honor KUBE_HACK_TOOLS_GOTOOLCHAIN
2025-02-14 12:22:21 -08:00
Jordan Liggitt
0ce48b5636 Honor KUBE_HACK_TOOLS_GOTOOLCHAIN 2025-02-14 13:01:59 -05:00
Sascha Grunert
36c6c7778b Use sudo for dmesg in hack/local-up-cluster.sh
Kernels may have `kernel.dmesg_restrict = 1` set which requires root
access to see dmesg. We're now using `sudo` to mitigate that.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-02-13 16:38:51 +01:00
Kubernetes Prow Robot
ea50baedcd Merge pull request #129875 from pohly/golangci-lint-strict-removal
golangci-lint: remove "strict" checking
2025-02-12 20:26:20 -08:00
Jefftree
819bf72b0c Remove feature disablement ConsistentListFromCache in update openapi script 2025-02-10 16:34:49 +00:00
Patrick Ohly
949385731f golangci-lint: remove "strict" checking
The corresponding "pull-kubernetes-verify-lint" job was already removed
earlier. Manual strict checking was still possible, but doesn't really make
sense for the same reasons why the job was removed (e.g. the decisions which
checks should be "strict" were too arbitrary).

The explanations for "hints" no longer end with "In general please prefer to
fix the error, ..." because that was misleading and only really applied to the
checks for existing code. For those checks we prefer to fix errors instead of
suppressing them, but not for hints.
2025-02-02 18:50:27 +01:00
Ed Bartosh
71b9114840 kubelet: Migrate pkg/kubelet/sysctl to contextual logging 2025-01-30 10:31:58 +02:00
Kubernetes Prow Robot
547654a8a1 Merge pull request #129813 from yongruilin/golangci-featuregate-add
feat: add a lint rule to prevent Add unversioned featuregate
2025-01-29 16:41:22 -08:00
Kubernetes Prow Robot
8294abc599 Merge pull request #128998 from bart0sh/PR165-migrate-oom-to-contextual-logging
kubelet: Migrate pkg/kubelet/oom to contextual logging
2025-01-28 13:33:22 -08:00
yongruilin
8a0937c034 feat: add a lint rule to prevent Add unversioned featuregate 2025-01-28 09:37:43 -08:00
Kubernetes Prow Robot
48dce2e9b3 Merge pull request #129776 from saschagrunert/cni-plugins-1.6.2
Update CNI plugins to v1.6.2 and avoid using k8s-artifacts-cni bucket
2025-01-28 07:29:26 -08:00
Sascha Grunert
5742f3deeb Cleanup running dmesg process in local-up-cluster.sh
We have to cleanup the background job after the script otherwise we will
end up having them hanging around.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-01-27 17:44:24 +01:00
Davanum Srinivas
4e05bc20db Linter to ensure go-cmp/cmp is used ONLY in tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-24 20:49:14 -05:00
Sascha Grunert
da999fbc1b Update CNI plugins to v1.6.2 and avoid using k8s-artifacts-cni bucket
Updating the CNI plugins to the latest release and switch over to use
GitHub releases instead of the `k8s-artifacts-cni` bucket.

Follow-up on https://github.com/kubernetes/kubernetes/pull/129095

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-01-23 10:50:58 +01:00
Kubernetes Prow Robot
a444a5bfed Merge pull request #129732 from dims/switch-to-v2.6.3-of-gopkg.in/go-jose/go-jose.v2
Switch to gopkg.in/go-jose/go-jose.v2 @ v2.6.3 and github.com/coreos/go-oidc @ v2.3.0
2025-01-22 13:40:38 -08:00
Davanum Srinivas
faf30b3067 update github.com/coreos/go-oidc to v2.3.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-22 15:27:54 -05:00
Kubernetes Prow Robot
427cd18f72 Merge pull request #127709 from pohly/log-client-go-rest
client-go/rest: finish context support
2025-01-22 11:12:37 -08:00
Patrick Ohly
7821abf2ae client-go/rest: finish conversion to contextual logging
The remaining calls can be converted without API changes.
2025-01-22 07:58:18 +01:00
Kubernetes Prow Robot
5da75638ee Merge pull request #129545 from pohly/test-ginkgo-progress
hack/ginkgo-e2e.sh: forward TERM/INT to Ginkgo
2025-01-17 17:52:48 -08:00
Patrick Ohly
ce9e398641 hack/ginkgo-e2e.sh: forward TERM/INT to Ginkgo
What happens at the moment in e.g. pull-kubernetes-e2e-kind in case of a
timeout is that ginkgo-e2e.sh gets killed with SIGTERM. This is not propagated
to the E2E test suite processes, therefore there is no "Interrupted by User"
report and no JUnit file, depending on timing during the process shutdown.

Running the Ginkgo CLI with job control enabled creates a new process group,
which then can be used to kill the Ginko CLI and the E2E test suite
processes. With these changes, more information is produced. Some of it seems
a bit redundant, but it's better than none:

*** hack/ginkgo-e2e.sh: received termination signal -> asking Ginkgo to stop.
***
*** Beware that a timeout may have been caused by some earlier test,
*** not necessarily the one which gets interrupted now.
*** See the "Spec runtime" for information about how long the
*** interrupted test was running.

  ------------------------------
  Interrupted by User
  First interrupt received; Ginkgo will run any cleanup and reporting nodes but will skip all remaining specs.  Interrupt again to skip cleanup.
  Here's a current progress report:
    [sig-node] DRA [Feature:DynamicResourceAllocation] [FeatureGate:DynamicResourceAllocation] [Beta] ResourceSlice Controller creates slices (Spec Runtime: 9
.065s)
      k8s.io/kubernetes/test/e2e/dra/dra.go:812
      In [It] (Node Runtime: 9.044s)
        k8s.io/kubernetes/test/e2e/dra/dra.go:812
        At [By Step] Creating slices (Step Runtime: 8.884s)
          k8s.io/kubernetes/test/e2e/dra/dra.go:847
...
        Begin Additional Progress Reports >>
          There is no failure as the matcher passed to Consistently has not yet failed
        << End Additional Progress Reports
  ------------------------------
• [INTERRUPTED] [11.955 seconds]
[sig-node] DRA [Feature:DynamicResourceAllocation] [FeatureGate:DynamicResourceAllocation] [Beta] ResourceSlice Controller [It] creates slices [sig-node, Feature:DynamicResourceAllocation, FeatureGate:DynamicResourceAllocation, Feature:Beta]
k8s.io/kubernetes/test/e2e/dra/dra.go:812

  Timeline >>
  STEP: Creating a kubernetes client @ 01/09/25 17:18:59.769
...
  [FAILED] in [It] - k8s.io/kubernetes/test/e2e/dra/dra.go:881 @ 01/09/25 17:19:08.835
  I0109 17:19:11.703212 302727 helper.go:125] Waiting up to 7m0s for all (but 0) nodes to be ready
  STEP: dump namespace information after failure @ 01/09/25 17:19:11.706
  STEP: Collecting events from namespace "dra-7998". @ 01/09/25 17:19:11.706
  STEP: Found 0 events. @ 01/09/25 17:19:11.708
...
  STEP: Destroying namespace "dra-7998" for this suite. @ 01/09/25 17:19:11.72
  << Timeline

  [INTERRUPTED] Interrupted by User
  In [It] at: k8s.io/kubernetes/test/e2e/dra/dra.go:812 @ 01/09/25 17:19:08.833

  This is the Progress Report generated when the interrupt was received:
    [sig-node] DRA [Feature:DynamicResourceAllocation] [FeatureGate:DynamicResourceAllocation] [Beta] ResourceSlice Controller creates slices (Spec Runtime: 9
.065s)
...

  [FAILED] An interrupt occurred and then the following failure was recorded in the interrupted node before it exited:
  Context was cancelled (cause: Interrupted by User) after 0.329s.
  There is no failure as the matcher passed to Consistently has not yet failed
  In [It] at: k8s.io/kubernetes/test/e2e/dra/dra.go:881 @ 01/09/25 17:19:08.835
------------------------------
Checking for custom logdump instances, if any
----------------------------------------------------------------------------------------------------
k/k version of the log-dump.sh script is deprecated!
Please migrate your test job to use test-infra's repo version of log-dump.sh!
Migration steps can be found in the readme file.
----------------------------------------------------------------------------------------------------
Sourcing kube-util.sh
Detecting project
Skeleton Provider: detect-project not implemented
Dumping logs from master locally to '/tmp/test'
Master SSH not supported for local
Dumping logs from nodes locally to '/tmp/test'
Node SSH not supported for local

Summarizing 1 Failure:
  [INTERRUPTED] [sig-node] DRA [Feature:DynamicResourceAllocation] [FeatureGate:DynamicResourceAllocation] [Beta] ResourceSlice Controller [It] creates slices [sig-node, Feature:DynamicResourceAllocation, FeatureGate:DynamicResourceAllocation, Feature:Beta]
  k8s.io/kubernetes/test/e2e/dra/dra.go:812

Ran 1 of 6644 Specs in 12.208 seconds
FAIL! - Interrupted by User -- 0 Passed | 1 Failed | 0 Pending | 6643 Skipped
--- FAIL: TestE2E (12.74s)
FAIL

Ginkgo ran 1 suite in 13.379078611s
2025-01-17 16:28:41 +01:00
Kubernetes Prow Robot
ab54e442c6 Merge pull request #128773 from bzsuni/bz/etcd/update/3.5.17
Update etcd from v3.5.16 to v3.5.17
2025-01-16 21:22:34 -08:00
Davanum Srinivas
43d86c2a3e Drop github.com/asaskevich/govalidator
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-14 15:53:49 -05:00
Davanum Srinivas
0d8a8fe306 Update to latest kustomize/v5.6.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-14 13:12:48 -05:00
bzsuni
df503e54c8 Update etcd from v3.5.16 to v3.5.17
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2025-01-02 10:20:42 +00:00
elieser pereira
35f584187a accept GINKGO_FLAGS for test-e2e-node.sh (#129215)
* accept GINKGO_FLAGS for test-e2e-node.sh

* Update Makefile to document LABEL_FILTER

* --label-filter part of ginkgoflags

* Update Makefile

* if label-filter then avoid skip and focus defaults

* LABEL_FILTER can be empty

* Update build/root/Makefile

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>

* skip defaults only if label-filter not set

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>

* focus and label_fiter can live together

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>

* skip and label_filter can live together

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>

---------

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2024-12-24 02:48:10 +01:00
Kubernetes Prow Robot
e305c33988 Merge pull request #126387 from pohly/log-client-go-tools-cache-apis
client-go/tools/cache: add APIs with context parameter
2024-12-18 20:00:09 +01:00
Patrick Ohly
4638ba9716 client-go/tools/cache: add APIs with context parameter
The context is used for cancellation and to support contextual logging.

In most cases, alternative *WithContext APIs get added, except for
NewIntegerResourceVersionMutationCache where code searches indicate that the
API is not used downstream.

An API break around SharedInformer couldn't be avoided because the
alternative (keeping the interface unchanged and adding a second one with
the new method) would have been worse. controller-runtime needs to be updated
because it implements that interface in a test package. Downstream consumers of
controller-runtime will work unless they use those test package.

Converting Kubernetes to use the other new alternatives will follow. In the
meantime, usage of the new alternatives cannot be enforced via logcheck
yet (see https://github.com/kubernetes/kubernetes/issues/126379 for the
process).

Passing context through and checking it for cancellation is tricky for event
handlers. A better approach is to map the context cancellation to the normal
removal of an event handler via a helper goroutine. Thanks to the new
HandleErrorWithLogr and HandleCrashWithLogr, remembering the logger is
sufficient for handling problems at runtime.
2024-12-18 18:45:02 +01:00
yongruilin
e1ef9e40f5 chore: Update apidiff.sh script description 2024-12-16 13:44:48 -08:00
Sascha Grunert
c3a3a54822 Add github.com/golang/protobuf to unwanted dependencies
Follow-up on https://github.com/kubernetes/kubernetes/pull/128659 to
avoid reintroducing the dependency again.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-12-16 09:57:18 +01:00
Benjamin Elder
8fce9b0db6 apidiff: default from prowjob env if available, default before doing anything else 2024-12-12 09:34:49 -08:00
Kubernetes Prow Robot
e8615e2712 Merge pull request #129054 from pohly/remove-import-name
remove import doc comments
2024-12-12 09:58:35 +01:00
Kubernetes Prow Robot
410dd2969c Merge pull request #129107 from rphillips/wait_for_coredns
local-up-cluster: only wait for coredns if enabled
2024-12-12 06:40:39 +00:00
Kubernetes Prow Robot
5dd4e64dd9 Merge pull request #129021 from aojea/apidiff_generator
apidiff support internal go modules
2024-12-12 05:28:45 +00:00
Kubernetes Prow Robot
b9f3b2ae21 Merge pull request #128992 from BenTheElder/find-kubeadm
make test-cmd: use kube::util::find-binary to get kubeadm binary
2024-12-12 05:28:31 +00:00
Kubernetes Prow Robot
477d01588b Merge pull request #128915 from liggitt/modern-go
Add modern-go libraries to unwanted dependencies
2024-12-12 04:13:38 +00:00
Kubernetes Prow Robot
0f6bfaf21a Merge pull request #128887 from aojea/patch-4
Don't allow to tolerate flakes
2024-12-12 04:13:01 +00:00
Ryan Phillips
d1cc270f13 local-up-cluster: only wait for coredns if enabled 2024-12-06 09:13:34 -06:00