Commit Graph

9772 Commits

Author SHA1 Message Date
Madhav Jivrajani
a422d11c77 prep for go1.21: use -e in go list
For some reason, in go1.21, go list does not allow
importing main packages anymore, even if it is for
the sake of tracking dependencies (which is a valid
use case).

A suggestion to work around this is to use -e flag to
permit processing of erroneous packages. However, this
doesn't seem prudent.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-08-17 17:46:30 +05:30
Kubernetes Prow Robot
f563910656
Merge pull request #119728 from pohly/ssa-forbid-extract-calls
SSA: prevent usage of Extract calls via forbidigo
2023-08-17 03:25:33 -07:00
Kubernetes Prow Robot
aef70da210
Merge pull request #119860 from pohly/golangci-lint-update
golangci-lint update and support for Go 1.21
2023-08-16 11:37:01 -07:00
Kubernetes Prow Robot
63351cce1c
Merge pull request #119977 from liggitt/optional-gomaxprocs
Make gomaxprocs install optional, limit to tests
2023-08-16 08:24:26 -07:00
Jordan Liggitt
bd36be0218
Make gomaxprocs install optional, limit to tests 2023-08-16 09:33:02 -04:00
Patrick Ohly
9742e276b9 update to golangci-lint v1.54.1 + go-ruleguard v0.4.0
That release is the first one with official support for Go 1.21. go-ruleguard
must be >= 0.3.20 because of
https://github.com/quasilyte/go-ruleguard/issues/449 with Go
1.21. golangci-lint itself doesn't depend on a recent enough release yet, so
this was done manually.
2023-08-16 09:07:30 +02:00
Kubernetes Prow Robot
ad15077193
Merge pull request #119742 from liggitt/unwanted-deps
Catch direct references to unwanted dependencies in kubernetes modules
2023-08-15 21:04:27 -07:00
Jeremy Rickard
ae86051ec5
Bump protoc
Signed-off-by: Jeremy Rickard <jeremyrrickard@gmail.com>
2023-08-07 17:26:05 -06:00
Jordan Liggitt
a5fff9a5d0
Catch direct references to unwanted dependencies in kubernetes modules 2023-08-02 15:44:25 -04:00
Patrick Ohly
4bc9434f99 SSA: prevent usage of Extract calls via forbidigo
Client-side extract calls depend on `managedFields`, which might not be
available. Therefore they should not be used in production code.

They are okay in test files (because the API has to be tested), in the
generated code (because the various type specific APIs still need to be
provided) and in unstructured.go (same reason).
2023-08-02 10:57:51 +02:00
upodroid
1c99f9591b add node-env and instance-type flags to node-e2e tests 2023-07-21 21:46:37 +00:00
Itamar Holder
f37aec6c57 Add LIMITED_SWAP env var to enable limited swap
Signed-off-by: Itamar Holder <iholder@redhat.com>
2023-07-14 14:52:27 +03:00
Patrick Ohly
7d064812bb kube-controller-manager: finish conversion to contextual logging
This removes all exceptions and fixes the remaining unconverted log calls.
2023-07-12 14:57:29 +02:00
Mengjiao Liu
19869478c1 Migrate /pkg/controller/disruption to structured and contextual logging 2023-07-12 11:30:45 +08:00
Naman
09849b09cf migrated pkg/controller/endpointslice to contextual logging
Signed-off-by: Naman <namanlakhwani@gmail.com>
2023-07-11 01:28:22 +05:30
Kubernetes Prow Robot
10a12165de
Merge pull request #116755 from my-git9/feat/endpoint/logging
Migrated `pkg/controller/endpoint` to contextual logging
2023-07-10 05:37:05 -07:00
Maciej Szulik
3f07fc3acc
Remove long/golang version information making short the default 2023-07-07 18:46:34 +02:00
Ziqi Zhao
dfc1838379 Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-07-06 07:39:52 +08:00
Kubernetes Prow Robot
91698fe900
Merge pull request #114061 from Octopusjust/k8s-pr15
testutil: use contextual logging
2023-07-05 08:38:57 -07:00
Kubernetes Prow Robot
0235a5a206
Merge pull request #118707 from pacoxu/unwanted-status-order
update the unwanted-dependencies order
2023-07-04 12:20:54 -07:00
Kubernetes Prow Robot
8d4479a58f
Merge pull request #118767 from gxglls/master
fix(script): handle wait_for_success failed condition
2023-06-29 19:43:45 -07:00
Madhav Jivrajani
6fd830a075 hack/tools: bump golangci-lint and consequently staticcheck
This bump is done since the latest version of staticcheck includes
a fix for a false positive reported by us, discovered while bumping
to go1.20

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-06-27 14:20:41 +02:00
Patrick Ohly
1af5425696 hack: disable gomega.Consistently/Eventually check due to false positives
For example, this is a false positive that currently exists in the code base:

    test/e2e_node/dra_test.go:129:4: ginkgo-linter: use a function call in Consistently. This actually checks nothing, because Consistently receives the function returned value, instead of function itself, and this value is never changed; consider using `gomega.Consistently(ctx, e2epod.Get).WithArguments(f.ClientSet, pod).WithTimeout(podInPendingStateTimeout).Should(e2epod.BeInPhase(v1.PodPending),
    	"Pod should be in Pending state as resource preparation time outed")` instead (ginkgolinter)
    			gomega.Consistently(ctx, e2epod.Get(f.ClientSet, pod)).WithTimeout(podInPendingStateTimeout).Should(e2epod.BeInPhase(v1.PodPending),
    			^

It's a false positive because e2epod.Get returns the function that Consistently
is meant to call.

This could be worked around by assigning e2epod.Get(f.ClientSet, pod) to a
variable and then use that variable, but that is less readable.
2023-06-27 14:20:41 +02:00
Kubernetes Prow Robot
28296ba59e
Merge pull request #113994 from mengjiao-liu/contextual-logging-controller-certificates
certificate controller: use contextual logging
2023-06-21 09:03:42 -07:00
ziyin.lu
687ca0e0bb fix(script): handle wait_for_success failed condition
In the wait_node_ready function, two steps are performed:
  1.Check if the node exists
  2.Wait for the node to enter the ready state
If one step fails, the second step should not continue, wasting 300 seconds.
2023-06-20 08:22:26 -04:00
Davanum Srinivas
564c236ce2
Do NOT prepull images for e2e-node jobs
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-06-19 22:01:12 -04:00
Paco Xu
8cd65e9cee reorder hack/unwanted-dependencies.json map keys and arrays
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-06-18 14:09:57 +08:00
Paco Xu
f44029705f exit 1 if status are not as expected(order)
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-06-18 14:09:50 +08:00
Davanum Srinivas
89adbc6e5b
check for AWS environment before running sudo
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-06-14 14:03:44 -04:00
Ziqi Zhao
7bc449d7e0 add contextual logging to job-controller
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-06-14 13:40:02 +08:00
Kubernetes Prow Robot
cdbdb17934
Merge pull request #118567 from chendave/node_arm_ci
Pass the mandatory parameters to build arm64 binaries
2023-06-13 08:22:11 -07:00
Kubernetes Prow Robot
ecf54b8bd5
Merge pull request #118320 from bart0sh/PR115-cleanup-boilerplate.py
Cleanup boilerpate.py
2023-06-12 09:35:49 -07:00
xin.li
325205efb7 Migrated pkg/controller/endpoint to contextual logging
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-06-11 20:12:07 +08:00
Dave Chen
54cae70678 Pass the mandatory parameters to support testing on ARM64
The parameters are needed to build the test binaries, e.g. `e2e_node.test`
`ginkgo` etc.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-06-08 17:33:37 +08:00
Kubernetes Prow Robot
c831a08c8e
Merge pull request #118253 from saschagrunert/streaming-cri-api
Move `cri/streaming` to `k8s.io/kubelet` staging repository
2023-06-06 14:14:12 -07:00
Kubernetes Prow Robot
f812ac5445
Merge pull request #118349 from bart0sh/PR116-fix-ginkgo-deprecation-warning
Fix ginkgo deprecation warning
2023-06-06 06:59:01 -07:00
Kubernetes Prow Robot
bba9833c39
Merge pull request #118404 from pohly/verify-failures
better JUnit failure messages for golangci-lint and verify in general
2023-06-05 08:31:26 -07:00
Sascha Grunert
db9fcfeed2
Move cri/streaming to k8s.io/kubelet staging repository
Container runtimes like CRI-O and containerd reuse the code by copying
it from Kubernetes. To have a single source of truth for the streaming
server we now move the already isolated implementation to the
k8s.io/kubelet staging repository. This way runtimes can re-use the code
without copying the parts.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-06-05 08:08:18 +02:00
Patrick Ohly
f4d326a1fc verify: produce JUnit file also for pull-kubernetes-verify-strict-lint
Because this doesn't get invoked through verify.sh, we have to call
logJu ourselves to get a JUnit file. errexit must not be set when
calling logJu, otherwise it does no post-processing.
2023-06-02 17:38:14 +02:00
Jefftree
322968e9b3 Update unwanted dependencies per CI instructions 2023-06-02 14:34:26 +00:00
Patrick Ohly
dbbb21469f verify: pick relevant lines from verify-golangci-lint.sh as failure message
When sh2ju.sh was called to generate the junit_verify.xml, it used to include
the entire output of a failed script twice: once as failure message, once as
log output.

This output can be large and often the actual failure isn't near the top, but
rather at the end or (in the case of the different golangci-lint invocations)
embedded in the log. This makes them hard to see at a glance when looking at
the Prow result page for a job.

Now a verify script can prefix relevant lines with "ERROR: " and then only
those lines are used as failure message in JUnit, without that prefix.

That string was chosen because Prow itself also then picks up those lines when
viewing the entire build log and it is unlikely that some script prints such
lines when they are not meant to be part of the failure.

If some script outputs no such lines, "see stderr for details" is used as
failure message. This is better than before because it avoids the redundancy.
2023-06-02 15:37:50 +02:00
Joe Betz
5c0b59891d Bump cel-go to v0.16.0 2023-05-31 18:36:43 -04:00
Ed Bartosh
c48c4c679a Fix ginkgo deprecation warning
Fixed ginkgo warning
   You're using deprecated Ginkgo functionality:
   =============================================
   --untilItFails is deprecated, use --until-it-fails instead

Used consistent approach with this flag in e2e_node and e2e scripts.
2023-05-31 12:53:11 +03:00
ZhangYu
f9ae3e774d testutil: use contextual logging 2023-05-30 10:07:04 +08:00
Ed Bartosh
534f5edb53 Cleanup boilerpate.py
- reformatted with https://github.com/psf/black
- fixed some of the https://github.com/pylint-dev/pylint warnings
2023-05-30 00:58:32 +03:00
Kubernetes Prow Robot
d05b79c836
Merge pull request #118269 from liggitt/genproto
Update google.golang.org/genproto
2023-05-26 14:43:25 -07:00
Jordan Liggitt
a045fedd02
Update google.golang.org/genproto 2023-05-26 13:20:33 -04:00
Kubernetes Prow Robot
a874f587b4
Merge pull request #118071 from kerthcet/cleanup/use-contextual-logging-in-statefulset
Chore: Apply to use contextual logging for all loggers in statefulSet
2023-05-26 07:56:53 -07:00
Kubernetes Prow Robot
74bd0ecdf4
Merge pull request #118223 from pohly/test-integration-vmodule-removal
integration: remove special verbosity for garbagecollector and graph_builder
2023-05-24 05:24:50 -07:00
Keita Mochizuki
0813904404
Fix: Restricted profile comply with PSS (#117543)
* restricted profile comply with PSA v1.27

* add test case

* Reflect review comments

* Reflect review comments 2

* Reflect review comments 3
2023-05-24 04:16:49 -07:00