Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go.mod update to containerd v2 #3173

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ RUN curl -o nydus-static.tgz -fsSL --proto '=https' --tlsv1.2 "https://github.co
mv nydus-static/nydus-image nydus-static/nydusd nydus-static/nydusify /usr/bin/ && \
rm nydus-static.tgz
CMD ["gotestsum", "--format=testname", "--rerun-fails=2", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \
"--", "-timeout=30m", "-args", "-test.kill-daemon"]
"--", "-timeout=60m", "-args", "-test.kill-daemon"]
apostasie marked this conversation as resolved.
Show resolved Hide resolved

FROM test-integration AS test-integration-rootless
# Install SSH for creating systemd user session.
Expand All @@ -345,7 +345,7 @@ COPY ./Dockerfile.d/test-integration-rootless.sh /
CMD ["/test-integration-rootless.sh", \
"gotestsum", "--format=testname", "--rerun-fails=2", "--raw-command", \
"--", "/usr/local/go/bin/go", "tool", "test2json", "-t", "-p", "github.com/containerd/nerdctl/v2/cmd/nerdctl", \
"/usr/local/bin/nerdctl.test", "-test.v", "-test.timeout=30m", "-test.kill-daemon"]
"/usr/local/bin/nerdctl.test", "-test.v", "-test.timeout=60m", "-test.kill-daemon"]

# test for CONTAINERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns
FROM test-integration-rootless AS test-integration-rootless-port-slirp4netns
Expand All @@ -354,6 +354,6 @@ RUN chown -R rootless:rootless /home/rootless/.config

FROM test-integration AS test-integration-ipv6
CMD ["gotestsum", "--format=testname", "--rerun-fails=2", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \
"--", "-timeout=30m", "-args", "-test.kill-daemon", "-test.ipv6"]
"--", "-timeout=60m", "-args", "-test.kill-daemon", "-test.ipv6"]

FROM base AS demo
4 changes: 2 additions & 2 deletions cmd/nerdctl/apparmor_inspect_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package main
import (
"fmt"

"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/spf13/cobra"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change and all similar changes: we use a variety of styles for dependencies separation / ordering.
Uniformizing on separating non-containerd org dependencies first, then containerd dependencies.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apostasie we may need ci checks to keep this consistent. We usually forget this separation/ ordering during review

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True.
Is there a tool for that or should we write something?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That tool is really neat.
Will send a PR asap.
Thanks a lot @fahedouch


"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/cmd/apparmor"
"github.com/containerd/nerdctl/v2/pkg/defaults"
"github.com/spf13/cobra"
)

func newApparmorInspectCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/apparmor_list_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
package main

import (
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/cmd/apparmor"
"github.com/spf13/cobra"
)

func newApparmorLsCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/apparmor_load_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ package main
import (
"fmt"

"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/cmd/apparmor"
"github.com/containerd/nerdctl/v2/pkg/defaults"
"github.com/spf13/cobra"
)

func newApparmorLoadCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/apparmor_unload_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ package main
import (
"fmt"

"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/cmd/apparmor"
"github.com/containerd/nerdctl/v2/pkg/defaults"
"github.com/spf13/cobra"
)

func newApparmorUnloadCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ import (
"os/exec"
"strings"

"github.com/spf13/cobra"

"github.com/containerd/log"
"github.com/containerd/nerdctl/v2/pkg/buildkitutil"
"github.com/spf13/cobra"
)

func newBuilderCommand() *cobra.Command {
Expand Down
4 changes: 2 additions & 2 deletions cmd/nerdctl/builder_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import (
"strconv"
"strings"

"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/buildkitutil"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/builder"
"github.com/containerd/nerdctl/v2/pkg/strutil"

"github.com/spf13/cobra"
)

func newBuildCommand() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cmd/nerdctl/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ import (
"context"
"time"

"github.com/containerd/containerd"
"github.com/spf13/cobra"

containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/labels"
"github.com/containerd/nerdctl/v2/pkg/netutil"
"github.com/spf13/cobra"
)

func shellCompleteImageNames(cmd *cobra.Command) ([]string, cobra.ShellCompDirective) {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/completion_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
package main

import (
"github.com/containerd/nerdctl/v2/pkg/apparmorutil"
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/apparmorutil"
)

func shellCompleteApparmorProfiles(cmd *cobra.Command) ([]string, cobra.ShellCompDirective) {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
package main

import (
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/composer"
)

func newComposeCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
package main

import (
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposeBuildCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ package main
import (
"fmt"

"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposeConfigCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ package main
import (
"errors"

"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposeCreateCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_down.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
package main

import (
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposeDownCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ package main
import (
"errors"

"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposeExecCommand() *cobra.Command {
Expand Down
11 changes: 6 additions & 5 deletions cmd/nerdctl/compose_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@ import (
"strings"
"text/tabwriter"

"github.com/containerd/containerd"
"github.com/containerd/containerd/pkg/progress"
"github.com/containerd/containerd/snapshots"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"

containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/core/snapshots"
"github.com/containerd/containerd/v2/pkg/progress"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/formatter"
"github.com/containerd/nerdctl/v2/pkg/imgutil"
"github.com/containerd/nerdctl/v2/pkg/labels"
"github.com/containerd/nerdctl/v2/pkg/strutil"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
)

func newComposeImagesCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_kill.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
package main

import (
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposeKillCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
package main

import (
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposeLogsCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_pause.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
package main

import (
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/spf13/cobra"
)

func newComposePauseCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ import (
"fmt"
"strconv"

"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposePortCommand() *cobra.Command {
Expand Down
9 changes: 5 additions & 4 deletions cmd/nerdctl/compose_ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ import (
"text/tabwriter"
"time"

"github.com/containerd/containerd"
"github.com/containerd/containerd/runtime/restart"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"

containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/core/runtime/restart"
"github.com/containerd/errdefs"
gocni "github.com/containerd/go-cni"
"github.com/containerd/log"
Expand All @@ -34,8 +37,6 @@ import (
"github.com/containerd/nerdctl/v2/pkg/formatter"
"github.com/containerd/nerdctl/v2/pkg/labels"
"github.com/containerd/nerdctl/v2/pkg/portutil"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
)

func newComposePsCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
package main

import (
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposePullCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
package main

import (
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposeRestartCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ import (
"errors"
"fmt"

"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposeRunCommand() *cobra.Command {
Expand Down
7 changes: 4 additions & 3 deletions cmd/nerdctl/compose_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ import (
"fmt"
"os"

"github.com/containerd/containerd"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"

containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/errdefs"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/containerutil"
"github.com/containerd/nerdctl/v2/pkg/labels"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
)

func newComposeStartCommand() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
package main

import (
"github.com/spf13/cobra"

"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/spf13/cobra"
)

func newComposeStopCommand() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cmd/nerdctl/compose_top.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ package main
import (
"fmt"

"github.com/containerd/containerd"
"github.com/spf13/cobra"

containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/cmd/container"
"github.com/containerd/nerdctl/v2/pkg/containerutil"
"github.com/containerd/nerdctl/v2/pkg/labels"
"github.com/spf13/cobra"
)

func newComposeTopCommand() *cobra.Command {
Expand Down
Loading
Loading