Commit Graph

9503 Commits

Author SHA1 Message Date
Jordan Liggitt
cafc791aab
Fix verify-licenses script 2023-01-04 15:45:41 -05:00
Stephen Kitt
f146b4287f
Licensing: skip modules with fewer subdirs than mods
This came up when updating go-oidc. After updating go-oidc (with its
dependency tree), cloud.google.com/go was no longer used as a package
import, but still listed in the module dependency graph; as a result,
"go mod vendor" no longer pulled in cloud.google.com/go itself, but
update-vendor-licenses.sh still wanted a license file for it since it
appeared in the list of modules.

This scenario is already supposed to be handled: when a module doesn't
contain any *files* as first-level content, if the number of
subdirectories it contains *equals* the number of submodules it
contains (excluding itself), the module is skipped. This fails for
cloud.google.com/go because several submodules are included in the
module dependency graph but aren't actually used, and therefore not
vendored.

Updating the test to check that the number of subdirectories is less
than or equal to the number of expected submodules fixes this.

The correct fix would be to process the submodules first, keeping a
note of which ones really have content, then check that the top-level
module only contains subdirectories corresponding to those modules;
but it's not clear to me that this is worth the effort (especially in
a shell script).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-01-03 16:48:35 +01:00
Kubernetes Prow Robot
7eb9a75bf9
Merge pull request #114710 from thockin/document_group-version-to-pkg-path
simplify group-version-to-pkg-path()
2022-12-27 13:41:28 -08:00
Kubernetes Prow Robot
24490fdd65
Merge pull request #114704 from thockin/codegen_safer_xargs
codegen: safer use of 'sort' and 'xargs'
2022-12-27 10:45:28 -08:00
Tim Hockin
77e41786a2
simplify group-version-to-pkg-path() 2022-12-27 10:34:44 -08:00
Kubernetes Prow Robot
e54e97294f
Merge pull request #114708 from thockin/verify_swagger_git_subtree
Make verify-generated-swagger-docs use worktree
2022-12-27 05:57:38 -08:00
Kubernetes Prow Robot
33e284fcd8
Merge pull request #114707 from thockin/verify_yamlfmt_git_subtree
Make verify-yamlfmt.sh use git worktree
2022-12-27 05:57:27 -08:00
Kubernetes Prow Robot
5e969c3568
Merge pull request #114706 from thockin/verify_mocks_git_subtree
Make verify-mocks.sh use git worktree
2022-12-26 22:01:27 -08:00
Tim Hockin
b5c5913db0
Make verify-generated-swagger-docs use worktree
Also move a function into these files that was only used in the one
place.
2022-12-26 17:17:33 -08:00
Tim Hockin
90e290e495
Make verify-yamlfmt.sh use git worktree 2022-12-26 17:14:58 -08:00
Tim Hockin
ff7ba89b1c
Make verify-mocks.sh use git worktree 2022-12-26 17:14:14 -08:00
Tim Hockin
db1f27896f
make update: Use a shell array instead of string 2022-12-26 16:24:16 -08:00
Tim Hockin
709dadb899
codegen: safer use of 'sort' and 'xargs'
`LC_ALL=C` is consistent regardless of locale

`xargs -0` is safe when filenames may have spaces
2022-12-26 16:08:59 -08:00
Patrick Ohly
1c66b708ec ginkgo-e2e.sh: remove deprecated --slow-spec-threshold
From the warning message that ginkgo now emits:

  --slow-spec-threshold is deprecated --slow-spec-threshold has been deprecated
  and will be removed in a future version of Ginkgo.  This feature has proved
  to be more noisy than useful.  You can use --poll-progress-after, instead, to
  get more actionable feedback about potentially slow specs and understand
  where they might be getting stuck.

We already use --poll-progress-after.
2022-12-21 07:55:07 +01:00
Patrick Ohly
6db4b741dd e2e: dump full report information
The Ginkgo CLI output no longer has the full output. We need the reports
generated by Ginkgo for that.
2022-12-21 07:55:07 +01:00
Patrick Ohly
460f796bb7 e2e: fix ginkgo parameter setup
This is a fix for 104aab81a4: because
the default was not set for E2E_TEST_DEBUG_TOOL, all parameters were always
also passed to the E2E suite.

That wasn't wrong for the parameters so far, but breaks when using something
like --output-dir which is only understood by the CLI.
2022-12-20 07:56:27 +01:00
Patrick Ohly
b39e56b475 e2e: fix ginkgo-e2e.sh with no arguments
If the script was called with no arguments, it passed "${@:-}" to the suite,
which expands to one empty argument. That's not right, "${@}" should be used
instead because it expands to nothing when empty.
2022-12-20 07:56:27 +01:00
Kubernetes Prow Robot
c6b75dac5b
Merge pull request #114204 from pacoxu/order-unwanted-deps
add github.com/mindprince/gonvml to unwanted dependencies
2022-12-12 11:43:56 -08:00
Kubernetes Prow Robot
92ec97149c
Merge pull request #114408 from liggitt/gorilla
Mark github.com/gorilla dependencies to avoid increasing use
2022-12-11 09:07:25 -08:00
Jordan Liggitt
cdebf3a64c
Mark github.com/gorilla dependencies to avoid increasing use 2022-12-10 23:54:13 -05:00
Patrick Ohly
df5d84ae81 e2e: accept context from Ginkgo
Every ginkgo callback should return immediately when a timeout occurs or the
test run manually gets aborted with CTRL-C. To do that, they must take a ctx
parameter and pass it through to all code which might block.

This is a first automated step towards that: the additional parameter got added
with

    sed -i 's/\(framework.ConformanceIt\|ginkgo.It\)\(.*\)func() {$/\1\2func(ctx context.Context) {/' \
        $(git grep -l -e framework.ConformanceIt -e ginkgo.It )
    $GOPATH/bin/goimports -w $(git status | grep modified: | sed -e 's/.* //')

log_test.go was left unchanged.
2022-12-10 19:50:18 +01:00
Kubernetes Prow Robot
73849a8d28
Merge pull request #114228 from saschagrunert/kubectl-convert-static
Link `kubectl-convert` binary statically
2022-12-10 07:54:52 -08:00
Kubernetes Prow Robot
9d02dda241
Merge pull request #114194 from dims/add-more-validation-for-copy-paste-errors
Add more validation to rules.yaml
2022-12-10 07:54:10 -08:00
Kubernetes Prow Robot
01e6efcc37
Merge pull request #114180 from saschagrunert/tracing-local-up-cluster
Tracing: sample always in `hack/local-up-cluster.sh`
2022-12-10 07:53:48 -08:00
Kubernetes Prow Robot
565667f403
Merge pull request #113978 from liggitt/check-canonical
Guard against merging non-canonical replace directives
2022-12-10 00:47:39 -08:00
Sascha Grunert
8a96ed0d20
Link kubectl-convert binary statically
The kubectl-convert binary itself only depends on the following runtime
libraries when linking dynamically:

```
> ldd _output/bin/kubectl-convert
        linux-vdso.so.1 (0x00007ffef0786000)
        libpthread.so.0 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libpthread.so.0 (0x00007f5f4ac25000)
        libdl.so.2 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libdl.so.2 (0x00007f5f4ac20000)
        libc.so.6 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libc.so.6 (0x00007f5f4aa00000)
        /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/ld-linux-x86-64.so.2 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib64/ld-linux-x86-64.so.2 (0x00007f5f4ac2c000)
```

We now move kubectl-convert to become a static binary as well to achieve
maximum portability.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-12-01 11:23:26 +01:00
Paco Xu
a782bd62bd add github.com/mindprince/gonvml to unwanted dependencies for license reason 2022-11-30 15:12:04 +08:00
Paco Xu
7e9dfad2b6 sort unwanted dependencies in order 2022-11-30 14:37:53 +08:00
Davanum Srinivas
ffef2d1f1a
add more validation to rules.yaml
We need to better catch problems like the one we fixed in:
7b6a3d6a33

Essentially a copy-paste error where had a branch pointing to staging/src/k8s.io/code-generator instead of staging/src/k8s.io/apimachinery

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-11-29 15:07:34 -05:00
Sascha Grunert
f04bb71878
Tracing: sample always in hack/local-up-cluster.sh
If the feature gate `KubeletTracing` is enabled, then we should default
to a sample rate of 1 million per million, which will sample everything:

https://github.com/open-telemetry/opentelemetry-go/blob/aa868d5/sdk/trace/sampling.go#L107-L110

This helps to easier spin-up a cluster with tracing enabled by exporting
`FEATURE_GATES="KubeletTracing=true"`.

Related docs: https://k8s.io/docs/concepts/cluster-administration/system-traces/#kubelet-traces

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-11-29 13:12:19 +01:00
Paco Xu
75f89875f8 use etcd 3.5.6-0 after promotion 2022-11-24 09:45:56 +08:00
Jordan Liggitt
9cb283796f
Guard against merging non-canonical replace directives 2022-11-17 13:00:12 -05:00
Mark Rossetti
534f052a8d
Updating pause image refernces to 3.9
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-11-14 10:24:54 -08:00
Jordan Liggitt
d0e965dc0d
Add gogo libraries to unwanted dependencies 2022-11-12 14:35:16 -05:00
Kubernetes Prow Robot
29ddedae1d
Merge pull request #113541 from oscr/update-shellcheck-0.8.0
Update shellcheck version (0.7.2 -> 0.8.0) and fix findings
2022-11-12 02:23:57 -08:00
Kubernetes Prow Robot
bd878fe5b3
Merge pull request #113818 from liggitt/deps
Update unwanted dependencies list
2022-11-11 18:49:55 -08:00
Patrick Ohly
7b6e911502 dependencies: forbid problematic dependencies of CDI + runtime-tools
github.com/container-orchestrated-devices/container-device-interface and
github.com/opencontainers/runtime-tools depend on some problematic packages in
code that isn't used by Kubernetes. Explicitly listing those dependencies
ensures that they do not get pulled in accidentally.
2022-11-12 00:17:17 +01:00
Ed Bartosh
ae0f38437c kubelet: add support for dynamic resource allocation
Dependencies need to be updated to use
github.com/container-orchestrated-devices/container-device-interface.

It's not decided yet whether we will implement Topology support
for DRA or not. Not having any toppology-related code
will help to avoid wrong impression that DRA is used as a hint
provider for the Topology Manager.
2022-11-11 21:58:03 +01:00
Patrick Ohly
c34185b2e5 logcheck.conf: ensure that dra uses contextual logging
It's new code, so we should follow the latest recommendations for logging.
2022-11-10 20:23:50 +01:00
Patrick Ohly
5cca60f0b8 api: dynamic resource allocation API
This adds a new resource.k8s.io API group with v1alpha1 as version. It contains
four new types: resource.ResourceClaim, resource.ResourceClass, resource.ResourceClaimTemplate, and
resource.PodScheduling.
2022-11-10 20:08:24 +01:00
Jordan Liggitt
3678584c02
Update unwanted dependencies list 2022-11-10 08:22:54 -05:00
Kubernetes Prow Robot
c9d87a9f7c
Merge pull request #113635 from andrewsykim/remove-ignore-cloud-provider-taint-envvar
cluster: remove KUBE_TEST_IGNORE_CLOUDPROVIDER_TAINT which is no longer needed
2022-11-09 08:30:37 -08:00
Oscar Utbult
61cd37b806 Update shellcheck version (0.7.2 -> 0.8.0) and fix findings 2022-11-08 11:53:57 +01:00
Kubernetes Prow Robot
595ea32411
Merge pull request #113314 from cici37/celIntegration
CEL validation in Admission chain
2022-11-07 17:08:33 -08:00
Cici Huang
0486e06261 Adding new api version of admissionregistration.k8s.io v1alpha1 for CEL in Admission Control 2022-11-07 20:51:51 +00:00
Andrew Sy Kim
ae1e93bfbe remove TEST_IGNORE_CLOUDPROVIDER_TAINT from hack/ginkgo-e2e.sh
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-11-05 22:04:37 -04:00
Kubernetes Prow Robot
63a62defda
Merge pull request #113604 from moshe010/cni-arch
fix local-up-cluster.sh to run on other arch than amd64
2022-11-04 09:36:47 -07:00
Moshe Levi
c337d7b6f9 fix local-up-cluster.sh to run on other arch than amd64
tested on arm64

Signed-off-by: Moshe Levi <moshele@nvidia.com>
2022-11-03 21:39:09 +02:00
Sascha Grunert
f9707064cf
Remove CRI v1alpha2
After the removal of dockershim we can finally also drop support for CRI
v1alpha2.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-11-03 09:13:43 +01:00
Oscar Utbult
421f142ffc Update shellcheck version (0.7.1 -> 0.7.2) and fix findings 2022-11-01 23:10:44 +01:00