Commit Graph

10061 Commits

Author SHA1 Message Date
Jiahui Feng
51af569512 rename antlr4 packages. 2024-04-15 14:28:04 -07:00
Kubernetes Prow Robot
d8f8c7fae0 Merge pull request #124288 from pohly/test-e2e-node-debugger
e2e node: debugger support
2024-04-22 08:43:27 -07:00
jwcesign
f0aa62bc96 upgrade: upgrade dependencies github.com/prometheus/common to the newest version
Signed-off-by: jwcesign <jwcesign@gmail.com>
2024-04-20 09:53:16 +08:00
Kubernetes Prow Robot
bad0f06520 Merge pull request #124156 from bells17/support-mac-os-verify-file-size
[hack/verify-file-sizes.sh] Support Mac OS X
2024-04-19 15:31:04 -07:00
bells17
70499e375e Changed to use "wc -c" to ensure the command works on both Linux and Mac OS X with a single implementation 2024-04-20 04:39:50 +09:00
Kubernetes Prow Robot
f5f8db0faf Merge pull request #124195 from bart0sh/PR139-use-downloaded-go-to-place-binaries
hacks: build main target without go in the PATH
2024-04-18 03:24:21 -07:00
Kubernetes Prow Robot
527590ed09 Merge pull request #123902 from Jefftree/agg-discovery-fixture
Update aggregated discovery fixture to v2
2024-04-18 01:04:48 -07:00
Kubernetes Prow Robot
0c55f74aed Merge pull request #123894 from saschagrunert/cni-plugins
Update cni-plugins to v1.4.1
2024-04-18 01:04:39 -07:00
Kubernetes Prow Robot
d35ba3635b Merge pull request #121970 from pohly/log-apimachinery-runtime
apimachinery runtime: support contextual logging
2024-04-17 23:59:47 -07:00
Kubernetes Prow Robot
528cff12f6 Merge pull request #120969 from skitt/uber-go-mock
Switch from golang/mock to uber-go/mock
2024-04-17 23:59:24 -07:00
Patrick Ohly
d97b67d97a e2e node: support running the test binary under a debugger
Single-stepping interactively through a test can be useful to understand what's
happening and to investigate the state at each step.

Similar support was added early to hack/ginkgo-e2e.sh, so the same env variable
is used again.
2024-04-16 11:46:28 +02:00
Tim Hockin
ca1d4c1bc9 build_binaries: use return as it's not in a subshell anymore 2024-04-06 00:23:42 +03:00
Tim Hockin
29d6922df2 kube::golang::place_bins: more verbose output 2024-04-06 00:20:51 +03:00
Ed Bartosh
91099aca72 hacks: build main target without go in the PATH
`make` is able to build project binaries, but fails with
error `hack/lib/golang.sh: line 455: go: command not found`
trying to place them if go binary is not in the PATH.
This happens because kube::golang::place_bins uses different
environment than kube::golang::build_binaries.

Setting up an one environment for both `kube::golang::place_bins`
and `kube::golang::build_binaries` should solve this issue and allow
default make target to fully work without go binary in the PATH.
2024-04-05 17:36:57 +03:00
bells17
c16dc72d0b [hack/verify-file-sizes.sh] Support Mac OS X 2024-04-03 03:53:56 +09:00
Patrick Ohly
5a130d2b71 apimachinery runtime: support contextual logging
In contrast to the original HandleError and HandleCrash, the new
HandleErrorWithContext and HandleCrashWithContext functions properly do contextual
logging, so if a problem occurs while e.g. dealing with a certain request and
WithValues was used for that request, then the error log entry will also
contain information about it.

The output changes from unstructured to structured, which might be a breaking
change for users who grep for panics. Care was taken to format panics
as similar as possible to the original output.

For errors, a message string gets added. There was none before, which made it
impossible to find all error output coming from HandleError.

Keeping HandleError and HandleCrash around without deprecating while changing
the signature of callbacks is a compromise between not breaking existing code
and not adding too many special cases that need to be supported. There is some
code which uses PanicHandlers or ErrorHandlers, but less than code that uses
the Handle* calls.

In Kubernetes, we want to replace the calls. logcheck warns about them in code
which is supposed to be contextual. The steps towards that are:
- add TODO remarks as reminder (this commit)
- locally remove " TODO(pohly): " to enable the check with `//logcheck:context`,
  merge fixes for linter warnings
- once there are none, remove the TODO to enable the check permanently
2024-03-26 17:28:45 +01:00
Jefftree
c771c6b526 Update aggregated discovery to v2 fixture 2024-03-12 13:29:14 -04:00
Kubernetes Prow Robot
30422d5f22 Merge pull request #123866 from aojea/flake_openapi
don´t run openapi spec with ConsistentListFromCache feature gate enabled
2024-03-12 06:53:31 -07:00
Sascha Grunert
a35b75ee57 Update cni-plugins to v1.4.1
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-03-12 12:06:52 +01:00
Antonio Ojea
727d127e6f don´t run openapi spec with ConsistentListFromCache feature gate enabled
Change-Id: I959a5df6259a358db2232733b386afc274b021bd
2024-03-11 21:45:02 +00:00
Kubernetes Prow Robot
1f22594c9a Merge pull request #123742 from thockin/cleanup_underscore_tmp
Cleanup _tmp usage
2024-03-10 17:53:44 -07:00
carlory
56da06b6dd Fix the dirname command in macOS does not have a -z option 2024-03-10 23:44:10 +08:00
Nilekh Chaudhari
91a7708cdc feat: implements Storage Version Migration API in-tree
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>
2024-03-08 04:18:56 +00:00
Patrick Ohly
39bbcedbca dra api: add structured parameters
NodeResourceSlice will be used by kubelet to publish resource information on
behalf of DRA drivers on the node. NodeName and DriverName in
NodeResourceSlice must be immutable. This simplifies tracking the different
objects because what they are for cannot change after creation.

The new field in ResourceClass tells scheduler and autoscaler that they are
expected to handle allocation.

ResourceClaimParameters and ResourceClassParameters are new types for telling
in-tree components how to handle claims.
2024-03-07 16:15:31 +01:00
Kubernetes Prow Robot
a31a465405 Merge pull request #123735 from thockin/master
Don't embed plural exceptions in tools
2024-03-07 02:08:27 -08:00
Stephen Kitt
6bf667af06 Switch from golang/mock to uber-go/mock
See https://github.com/golang/mock#gomock: golang/mock is no longer
maintained, and should be replaced by go.uber.org/mock.

This allows golang/mock to be dropped from the status and vendored
fields in unwanted-dependencies.json.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-03-07 09:12:16 +01:00
Tim Hockin
df7f5fca27 Don't embed plural exceptions in tools 2024-03-06 14:57:46 -08:00
Jordan Liggitt
6f2842c08c Avoid clearing go version in go.work update script 2024-03-06 10:04:49 -05:00
Tim Hockin
be7ee821b9 Make verify-vendor use verify::generated 2024-03-05 21:44:45 -08:00
Tim Hockin
778644154f Remove _tmp from verify-openapi-docs-urls 2024-03-05 21:44:44 -08:00
Tim Hockin
4d6f56d398 Make vendor-licenses use verify::generated 2024-03-05 21:44:43 -08:00
Tim Hockin
8a3a299c65 Remove _tmp from pin-dependency 2024-03-05 21:44:43 -08:00
Tim Hockin
813787489b Make verify-openapi-spec use verify::generated
Tested by injecting an API change, generating openapi, then watching
this fail.
2024-03-05 21:44:41 -08:00
Kubernetes Prow Robot
19df52c41a Merge pull request #123647 from thockin/use_go_-C_instead_of_pushd_popd
Change `pushd $d; go ...; popd` to `go -C $d ...`
2024-03-02 16:41:56 -08:00
Tim Hockin
a0215badb8 Change pushd $d; go ...; popd to go -C $d ...
Just an annoyance in reading these scripts.
2024-03-02 14:40:10 -08:00
Tim Hockin
90e6546c68 Use go.work to auto-find internal modules 2024-03-02 14:38:25 -08:00
Kubernetes Prow Robot
0364c6cc3d Merge pull request #123623 from pohly/hack-protoc-search-path
hack: re-enable protobindings which use k8s.io/api
2024-03-02 10:26:20 -08:00
Tim Hockin
e2b96b2566 Add a header to go.work 2024-03-01 16:23:21 -08:00
Patrick Ohly
f34782bb92 hack: re-enable protobindings which use k8s.io/api
Before the workspace changes, it was possible to include proto files via the
vendor path and the symlinks there. Now those symlinks are gone, so the search
path for them must be given separately.
2024-03-01 21:53:13 +01:00
Kubernetes Prow Robot
df366107d1 Merge pull request #123529 from thockin/go-workspaces
Go workspaces for k/k and k/staging/*
2024-03-01 08:43:03 -08:00
Sotiris Salloumis
ce8bd8584e Configure cpumanager policy options in local-up-cluster
CPU Manager policy options cannot be configured with
KUBELET_FLAGS. They need to be included in kubelet
configuration instead.

This commit allows the configuration with the use
of three enviroment variables, following same approach
as done for enabling feature gates.
2024-03-01 11:38:02 +01:00
Tim Hockin
00e09374b6 Make update-codegen avoid sub-workspaces 2024-02-29 22:10:39 -08:00
Tim Hockin
70d803c1ff Make make fail better with bad inputs
Ultimately, we're hitting places where bash is just hard to get right.

Instead of:

```
$ make WHAT=nonexist
stat /home/thockin/src/kubernetes/nonexist: directory not found
!!! [0228 12:07:12] Call tree:
!!! [0228 12:07:12]  1: /home/thockin/src/kubernetes/hack/lib/golang.sh:930 kube::golang::normalize_go_targets(...)
!!! [0228 12:07:12]  2: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
+++ [0228 12:07:12] Building go targets for linux/amd64
     (non-static)
no Go files in /home/thockin/src/kubernetes
!!! [0228 12:07:12] Call tree:
!!! [0228 12:07:12]  1: /home/thockin/src/kubernetes/hack/lib/golang.sh:820 kube::golang::build_some_binaries(...)
!!! [0228 12:07:12]  2: /home/thockin/src/kubernetes/hack/lib/golang.sh:974 kube::golang::build_binaries_for_platform(...)
!!! [0228 12:07:12]  3: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0228 12:07:12] Call tree:
!!! [0228 12:07:12]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0228 12:07:12] Call tree:
!!! [0228 12:07:12]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
make: *** [Makefile:95: all] Error 1
```

We now get:

```
$ make WHAT=nonexist
+++ [0228 12:33:49] Building go targets for linux/amd64
    ./nonexist (non-static)
stat /home/thockin/src/kubernetes/nonexist: directory not found
!!! [0228 12:33:49] Call tree:
!!! [0228 12:33:49]  1: /home/thockin/src/kubernetes/hack/lib/golang.sh:823 kube::golang::build_some_binaries(...)
!!! [0228 12:33:49]  2: /home/thockin/src/kubernetes/hack/lib/golang.sh:976 kube::golang::build_binaries_for_platform(...)
!!! [0228 12:33:49]  3: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0228 12:33:49] Call tree:
!!! [0228 12:33:49]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0228 12:33:49] Call tree:
!!! [0228 12:33:49]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
make: *** [Makefile:95: all] Error 1

$ make test WHAT=nonexist
+++ [0228 12:33:53] Set GOMAXPROCS automatically to 6
+++ [0228 12:33:53] Running tests without code coverage and with -race
stat /home/thockin/src/kubernetes/nonexist: directory not found
make: *** [Makefile:190: test] Error 1
```
2024-02-29 22:07:43 -08:00
Tim Hockin
81ba0f3b44 Make golang::setup-env turn on workspaces
Both GO111MODULE and GOWORK default to on, so this just unsets them.  We
could set them to explicit values but this seems equivalent and cleaner.
2024-02-29 22:07:42 -08:00
Tim Hockin
1a4450f6ff Get rid of code-generator/cmd/openapi-gen
It's an exact duplicate of k8s.io/kube-openapi/cmd/openapi-gen.
2024-02-29 22:07:37 -08:00
Tim Hockin
067a328284 Move import-boss: k/code-generator/cmd -> k/k/cmd 2024-02-29 22:07:36 -08:00
Tim Hockin
14321ef959 Move doc-generation funcs into only caller 2024-02-29 22:07:33 -08:00
Tim Hockin
8288c06b2b Make hack scripts use go install and assume PATH
Now that they all call setup_env, we don't need find-binary (I think).
That was originally meant to hide the diff between docker and local
builds but all these tools do local builds anyway.
2024-02-29 22:07:32 -08:00
Tim Hockin
ea3696dbcf Remove legacy references to './output' 2024-02-29 22:07:31 -08:00
Tim Hockin
b68340e5b6 Get rid of gengo InputDirs flag 2024-02-29 22:07:23 -08:00