This gets uses concurrently as seen by a data race reported when running
integration tests with race detection enabled. All writes would have written
the same value, but it is a race nonetheless.
agnhost was updated to v2.46 in PR 123258, but the image was not
published due to the failue of `post-kubernetes-push-e2e-agnhost-test-images`
(issue 123266).
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Fix issue 123266
> CI: `post-kubernetes-push-e2e-agnhost-test-images` is failing
> (`gcr.io/k8s-staging-e2e-test-images/agnhost:2.46-linux-amd64 is a manifest list`)
To avoid creating a manifest list with the recent version of buildx,
`--provenance=false --sbom=false` has to be specified.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Merge vishh/stress@eab4e3384b into
agnhost.
Old usage: `stress -mem-alloc-size 12Mi -mem-alloc-sleep 10s -mem-total 4Gi`
New usage: `agnhost stress --mem-alloc-size 12Mi --mem-alloc-sleep 10s --mem-total 4Gi`
This is a part of the steps to migrate from legacy Schema 1 images
(issue 123146)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Wrapping errors may or may not be the right thing to do (see
https://go.dev/blog/go1.13-errors#whether-to-wrap and the discussion in
https://github.com/kubernetes/kubernetes/issues/123234). But developers should
at least think about it, so let's emit linter hints for it: the golangci-lint
config by default enables it for go-errorlint, just not the linter itself, so
we just need to add it for the "hints" config.
Direct error comparisons and assertions also get checked. Those are typically
something that should be replaced by errors.Is and errors.As, but as the
existing code often doesn't do that, let's also treat those as just hints.
The code generation tools support verification only with the
--verify-only option, but this now fails because the files are nuked
ahead of time.
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Adding a doc comment for all existing items makes it more obvious that new
items should be documented more carefully. It also has the welcome side effect
that each item gets indented independently from the others.
This commit modifies the following files:
- `staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto`
- `staging/src/k8s.io/cri-api/pkg/errors/errors.go`
Other changes were auto-generated by running `make update`.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
`NodeReachable`, `NodeLive`, `NodeSchedulable`, and `NodeRunnable` are mentioned
as "built-in set of conditions" but some of them do not exist in the current API.
Updated `pkgs/apis/core/types.go` too for consistency.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
With a dynamic client and a rest mapper it is possible to load arbitrary YAML
files and create the object defined by it. This is simpler than adding specific
Go code for each supported type.
Because the version now matters, the incorrect version in the DRA YAMLs were
found and fixed.
ktesting.TContext combines several different interfaces. This makes the code
simpler because less parameters need to be passed around.
An intentional side effect is that the apiextensions client interface becomes
available, which makes it possible to use CRDs. This will be needed for future
DRA tests.
Support for CRDs depends on starting the apiserver via
k8s.io/kubernetes/cmd/kube-apiserver/app/testing because only that enables the
CRD extensions. As discussed on Slack, the long-term goal is to replace the
in-tree StartTestServer with the one in staging, so this is going in the right
direction.
The new TContext interface combines a normal context and the testing interface,
then adds some helper methods. The context gets canceled when the test is done,
but that can also be requested earlier via Cancel.
The intended usage is to pass a single `tCtx ktesting.TContext` parameter
around in all helper functions that get called by a unit or integration test.
Logging is also more useful: Log[f] and Fatal[f] output is prefixed with
"[FATAL] ERROR: " to make it stand out more from regular log output.
If this approach turns out to be useful, it could be extended further (for
example, with a per-test timeout) and might get moved to a staging repository
to enable usage of it in other staging repositories.
To allow other implementations besides testing.T and testing.B, a custom
ktesting.TB interface gets defined with the methods expected from the
actual implementation. One such implementation can be ginkgo.GinkgoT().