Commit Graph

10302 Commits

Author SHA1 Message Date
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
Patrick Ohly
0a02c74ca6 update-vanity-imports.sh: remove script
With the "// import ..." statements removed form all files, we no
longer need the update script which would add them back.
2024-12-02 17:00:41 +01:00
Antonio Ojea
e5ebbdc3c7 Ignore internal packages messages 2024-11-29 07:29:46 +00:00
Antonio Ojea
f92bde1894 parallalize the apidiff dump 2024-11-28 18:20:07 +00:00
Antonio Ojea
affafd906d improve report on failures summarizing the modules with incompatible changes 2024-11-28 18:20:04 +00:00
Antonio Ojea
7de94d43ca handle the case when modules are added or removed
don't compare modules that didn't or doesn't exist
2024-11-28 18:19:18 +00:00
Antonio Ojea
52386915a8 use relative paths and modules that are not visible to golagn workspaces 2024-11-28 18:19:12 +00:00
Ed Bartosh
f622be0333 kubelet: Migrate pkg/kubelet/oom to contextual logging 2024-11-28 17:47:02 +02:00
Antonio Ojea
e6fccc36d8 apidiff support internal go modules
The kubernetes repository contains some internal golang modules that are
not part of the golang global workspace. Because apidiff is currently
run from the root of the repository, it does not work against this
internal modules.

Instead of executing apidiff from the root we can just cd into the
passed path of the module to avoid this limitation.
2024-11-28 15:43:09 +00:00
Benjamin Elder
a43b00b429 make test-cmd: use kube::util::find-binary to get kubeadm binary
fixes finding the binary when dockerized builds vs host builds
2024-11-26 17:33:44 -08:00
Jordan Liggitt
3baa6f08c0 Add modern-go libraries to unwanted dependencies 2024-11-21 11:25:44 -05:00
Kubernetes Prow Robot
40f222b620 Merge pull request #128834 from pohly/scheduler-perf-pass-workaround
scheduler_perf: fix and enhance reporting
2024-11-21 16:08:55 +00:00
Antonio Ojea
7280d58f85 Don't allow to tolerate flakes
We have zero flake policy for a long time now (> 1 year) https://github.com/kubernetes/community/pull/7538, however , there are some places that are still tolerating flakes and retrying 

Flakes does not help,  to the point that when we have to take a hard decision it creates more iuncertainty.

It does not matter how, we should be always able to deal with flakes:
- if the software or algorithm is racy, we need to work to make deterministic
- if is deterministic, the test must be deterministic
- if the test is determinist but it depends on the environment, then we work on making the environment deterministci
2024-11-20 16:40:03 +01:00