Commit Graph
259 Commits
Author SHA1 Message Date
Maksym Pavlenko 0b4ed79573 integration: add e2e test to verify trace context propagation
Send a known trace context with the API call and assert that the
environment of the OCI hook runc executes carries it.

The shim propagates the context only when built with the shim_tracing
tag, so build the Linux integration job with it. The integration target
also has to pass the project build tags to the test compile, like the
other build targets already do.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-08-25 11:21:41 -07:00
Sergey Kanzhelev 7f10e9eb5f do not hide linitng errors
Signed-off-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2026-05-19 17:29:18 -07:00
apurv15andCopilot d8906ac6c6 Update Makefile
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: apurv15 <69455689+apurv15@users.noreply.github.com>
2026-04-11 21:31:21 +05:30
Apurv Barve c41939a4c0 For Exec format error on Windows, compile cri-integration.test binary with .exe suffix
Signed-off-by: Apurv Barve <apurvbarve@microsoft.com>
2026-04-11 15:25:35 +05:30
Maksym Pavlenko 281fb85a9c Fix Makefile
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-04-08 08:29:28 -05:00
Maksym Pavlenko 2005e01f06 Run tests from api
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-04-08 08:29:28 -05:00
Sebastiaan van Stijn d63c1dd1f0 Makefile: use "-C" flag, and evaluate once
go1.20 and up has a `-C` flag to change to a directory before running commands
(see https://go.dev/cl/421436). Documentation is a bit hard to find, and doesn't
mention `go mod` subcommands, but can be found in the `go build` help;

    go help build
    ...
    The build flags are shared by the build, clean, get, install, list, run,
    and test commands:

        -C dir
            Change to dir before running the command.
            Any files named on the command line are interpreted after
            changing directories.
            If used, this flag must be the first one in the command line.

Update the Makefile to use this option where applicable, so that we can
skip some `cd` and sub-shells.

Also switch some assignments to use `:=` to evaluate them once.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-02-18 18:11:05 +01:00
Sebastiaan van Stijn 43cf58a289 Makefile: fix indentation
Fix some mixed tabs/spaces and indentation level.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-02-18 13:12:13 +01:00
Sebastiaan van Stijn 1f0f18f92c Makefile: remove redundant grep for vendor, integration
The `go list` command is vendor-aware, and doesn't include the vendor dir;

    go list ./... | grep 'vendor'
    # (no output)

For the API module, there's no need to grep for `integration` as it does
not have that sub-directory.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-02-18 13:11:38 +01:00
Sebastiaan van Stijn 7ffccac5cc Makefile: remove trailing slash from ROOTDIR
It's more common for directory-paths to not have a trailing slash; strip
it so that we don't have some double slashes.

Before:

    make protos
    ...
    + protos
    (cd api && buf dep update)
    (cd api && PATH="/go/src/github.com/containerd/containerd//bin:$PATH" buf generate)

After:

    make protos
    ...
    + protos
    (cd api && buf dep update)
    (cd api && PATH="/go/src/github.com/containerd/containerd/bin:$PATH" buf generate)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-02-18 12:06:47 +01:00
Maksym Pavlenko 3defa1229b Use buf to format proto files
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-30 18:17:45 -08:00
Derek McGowan 472e0a8e7a Generate next.txtpb to replace next.pb.txt
buf will generate the protobuf text file which can be used for viewing
all protobuf changes in one file and quickly diffing changes.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-01-23 17:17:47 -08:00
Maksym Pavlenko c895e1ed40 Remove check-api-descriptors target
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-15 10:14:55 -08:00
Maksym Pavlenko ce045ca2f5 Fix go mod replace
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-15 10:09:42 -08:00
Maksym Pavlenko f87550d068 Install buf from install-dev-tools
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-08 17:03:28 -08:00
Maksym Pavlenko 57782b7175 Move buf configuration under api/
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-08 16:46:18 -08:00
Maksym Pavlenko 248ee80fab Remove GOPATH workaround from Makefile
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-08 16:42:26 -08:00
Maksym Pavlenko aca62ae10d Install buf on demand via go install
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-08 15:23:01 -08:00
Maksym Pavlenko e63f1d3ab4 Use buf to generate proto code
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-08 15:12:50 -08:00
Rehan Khan 621d661be8 Add coverage support for CRI integration tests
Signed-off-by: Rehan Khan <Rehan.Khan7@ibm.com>
2025-06-27 18:42:51 +05:30
Alfred Wingate ffbe1b5738 Use a order-only-prerequisite for mandir creation
Otherwise its a matter of luck that the man directory is created before man dir
generation.

Bug: https://bugs.gentoo.org/880057
Signed-off-by: Alfred Wingate <parona@protonmail.com>
2025-01-11 02:16:53 +02:00
Sameer 34284c5075 Add tests for CNI v2 loopback options
Signed-off-by: Sameer <sameer.saeed@live.ca>
2024-11-19 18:43:31 -05:00
Brian Goff 6ffdabf725 Makefile: fix shim tags overwritten
Go taks multiple `--tags` as overwriting the previously set ones,
which is not what we want.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-10-02 19:17:56 +00:00
Brian Goff 2123855eeb Add build tag to omit grpc
This is needed so we can build the runc shim without grpc as a
transative dependency.
With this change the runc shim binary went from 14MB to 11MB.
The RSS from an idle shim went from about 17MB to 14MB (back around
where it was in in 1.7).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-10-02 01:50:48 +00:00
Derek McGowan e69efd56d6 Add go mod replace when proto changes happen
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-06 11:03:07 -07:00
Derek McGowan 2ac2b9c909 Make api a Go sub-module
Allow the api to stay at the same v1 go package name and keep using a
1.x version number. This indicates the API is still at 1.x and allows
sharing proto types with containerd 1.6 and 1.7 releases.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 11:03:00 -07:00
Derek McGowan 3e9cace720 Move runtimeoptions to api directory
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:52:02 -07:00
Changqing Li c5ba71d117 Makefile: update default PACKAGE to v2
Signed-off-by: Changqing Li <changqing.li@windriver.com>
2024-04-24 18:02:37 +08:00
kiashok d9cae66d8d Extend string match in make protos
Signed-off-by: kiashok <kiashok@microsoft.com>
2024-02-07 11:30:32 -08:00
Derek McGowan dbc74db6a1 Move runtime to core/runtime
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:58:04 -08:00
Derek McGowan f1d659dc50 Update package name in Makefile
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-01 14:28:24 -07:00
Derek McGowan ddd73ad300 Move protofiles generated into v2 directory
Protobuf will automatically put the files generated for a v2 module into
a v2 directory. Move them to their correct location after running the
protobuild.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-27 15:44:23 -07:00
Derek McGowan 192168038e Temporarily remove integration/client submodule
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-27 11:11:20 -07:00
Fu Wei 8db0d39c68 Merge pull request #9104 from cyyzero/fix-deadlock 2023-10-10 07:36:29 +08:00
Samuel Karp b30e0163ac Merge pull request #8934 from oss-qm/submit/go_build_flags
Makefile: allow overriding GO_BUILD_FLAGS via environment
2023-10-08 00:23:01 -07:00
Wei Fu 11a7751af5 *: add runc-fp as runc wrapper to inject failpoint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-02 17:44:41 +00:00
Akihiro Suda b42bdd125d release: remove cri-containerd-*.tar.gz release bundles
The `cri-containerd-*.tar.gz` release bundles have been deprecated
since containerd v1.6.

These bundles are no longer created in the CI, however, the
corresponding Makefile targets are still kept, as they are still used by
external CIs.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-09-13 23:22:32 +09:00
Enrico Weigelt, metux IT consult f9c35feb30 Makefile: allow overriding GO_BUILD_FLAGS via environment
Allow overriding GO_BUILD_FLAGS via environment, do distros can easily
inject additionally required build flags (eg. -buildvcs=false).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-25 16:26:13 +02:00
Maksym Pavlenko 90b8e6b711 Merge pull request #8915 from oss-qm/submit/bindir
Makefile: allow overriding the binary executable target dir
2023-08-21 11:38:20 -07:00
Enrico Weigelt, metux IT consult 7063ae1f6c Makefile: add rule for installing documentation
Distros usually like to install docs, so add a rule for that, so
dist maintainers don't need to care about the details.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-19 15:32:29 +02:00
Enrico Weigelt, metux IT consult cac8b6f4bd Makefile: allow overriding the binary executable target dir
Distros tend to change this to specific locations (eg. on MVCC installs),
therefore introduce a generic environment variable that's a common practise
since 30+ years and thus already well known and supported by distros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-08 14:11:03 +02:00
Fu Wei 165f8e414e Merge pull request #8928 from oss-qm/submit/makefile-fix-go-command 2023-08-08 05:31:48 +08:00
Enrico Weigelt, metux IT consult 965641dbc1 Makefile: allow REVISION be overwritten by environment
Required for distros that wanna use their local version and
can't have some (possibly failing) git commands being run here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-07 17:23:00 +02:00
Enrico Weigelt, metux IT consult fc32197d43 Makefile: fix overriding go command
There still was one place that's calling the `go` command directly
instead of using the $(GO) variable.

Fixes: 9ea25634bd
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-07 17:21:47 +02:00
Danny Canter f3124d5693 Makefile: Remove hcsshim related TODO
There was a todo for the windows variant of dependency installation that
hinted at making an install-hcsshim.sh script, however Windows today doesn't
rely on a standalone OCI runtime binary that gets invoked by the shim. Rather,
container creation/management is all handled by the shim itself in-proc. Due to
this, `make` or `make binaries` basically fulfills that purpose as it
clones hcsshim and builds the shim along with containerd.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-22 17:53:09 -07:00
Maksym Pavlenko c50a3ef043 Update Makefile and CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-15 09:18:16 -07:00
Akihiro Suda b473c2922f release: Add "cri-containerd.DEPRECATED.txt" in the deprecated cri-containerd-* bundles
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-29 03:32:15 +09:00
Kazuyoshi Kato 52a7480399 Remove github.com/gogo/protobuf again
While we need to support CRI v1alpha2, the implementation doesn't have
to be tied to gogo/protobuf.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-12-15 22:54:15 +00:00
ruiwen-zhao 234bf990dc Copy cri-api v1alpha2 from v0.25.4 to containerd internal directory
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
2022-11-18 21:09:43 +00:00
Akihiro Suda 3fca677c19 Release: add static binaries
Fix issue 7296

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-11-12 03:52:37 +09:00