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

Update dependencies (containerd v2) #290

Merged
merged 1 commit into from
Jul 12, 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
12 changes: 6 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:

strategy:
matrix:
go-version: [1.19]
go-version: [1.22.0]

steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v6
with:
version: v1.50.1
version: v1.59
skip-cache: true
args: --timeout=5m

Expand All @@ -40,7 +40,7 @@ jobs:
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src/github.com/containerd/accelerated-container-image
fetch-depth: 100
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
type: string

env:
GO_VERSION: "1.19"
GO_VERSION: "1.22.0"
OBD_VERSION: "1.0.9"

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
fetch-depth: 100

- name: install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: '1.19'
go-version: '1.22.0'

- name: set env
shell: bash
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.22.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3

- run: |
make

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "v*"

env:
GO_VERSION: "1.19"
GO_VERSION: "1.22.0"

jobs:
build:
Expand All @@ -23,7 +23,7 @@ jobs:
releasever="${releasever#refs/tags/}"
echo "RELEASE_VERSION=${releasever}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 100
- name: Setup buildx instance
Expand Down
13 changes: 6 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ linters:
- gofmt
- goimports
- ineffassign
- vet
- govet
- unused
- misspell
disable:
- errcheck

linters-settings:
depguard:
list-type: denylist
include-go-root: true
packages:
# use "io" or "os" instead
# https://go.dev/doc/go1.16#ioutil
- io/ioutil
rules:
main:
deny:
- pkg: io/ioutil
desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil
12 changes: 6 additions & 6 deletions cmd/convertor/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ import (
"time"

"github.com/containerd/accelerated-container-image/cmd/convertor/database"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/platforms"
"github.com/containerd/containerd/reference"
"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/remotes/docker"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/remotes"
"github.com/containerd/containerd/v2/core/remotes/docker"
"github.com/containerd/containerd/v2/pkg/reference"
"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
Expand Down
6 changes: 3 additions & 3 deletions cmd/convertor/builder/builder_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"path"

"github.com/containerd/accelerated-container-image/cmd/convertor/database"
"github.com/containerd/containerd/archive/compression"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/remotes"
"github.com/containerd/containerd/v2/pkg/archive/compression"
"github.com/containerd/continuity"
"github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
4 changes: 2 additions & 2 deletions cmd/convertor/builder/builder_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"testing"

testingresources "github.com/containerd/accelerated-container-image/cmd/convertor/testingresources"
_ "github.com/containerd/containerd/pkg/testutil" // Handle custom root flag
"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/v2/core/remotes"
_ "github.com/containerd/containerd/v2/pkg/testutil" // Handle custom root flag
"github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/convertor/builder/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"testing"
"time"

_ "github.com/containerd/containerd/pkg/testutil" // Handle custom root flag
_ "github.com/containerd/containerd/v2/pkg/testutil" // Handle custom root flag
specs "github.com/opencontainers/image-spec/specs-go/v1"
)

Expand Down
14 changes: 7 additions & 7 deletions cmd/convertor/builder/builder_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ import (
"os"
"path"

"github.com/containerd/containerd/archive/compression"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/platforms"
"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/remotes"
"github.com/containerd/containerd/v2/pkg/archive/compression"
"github.com/containerd/continuity"
"github.com/containerd/errdefs"
"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
Expand Down
6 changes: 3 additions & 3 deletions cmd/convertor/builder/builder_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

testingresources "github.com/containerd/accelerated-container-image/cmd/convertor/testingresources"
sn "github.com/containerd/accelerated-container-image/pkg/types"
"github.com/containerd/containerd/images"
_ "github.com/containerd/containerd/pkg/testutil" // Handle custom root flag
"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/remotes"
_ "github.com/containerd/containerd/v2/pkg/testutil" // Handle custom root flag
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/convertor/builder/overlaybd_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
sn "github.com/containerd/accelerated-container-image/pkg/types"
"github.com/containerd/accelerated-container-image/pkg/utils"
"github.com/containerd/accelerated-container-image/pkg/version"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/errdefs"
"github.com/opencontainers/go-digest"
"github.com/opencontainers/image-spec/identity"
specs "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
7 changes: 4 additions & 3 deletions cmd/convertor/builder/overlaybd_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

testingresources "github.com/containerd/accelerated-container-image/cmd/convertor/testingresources"
sn "github.com/containerd/accelerated-container-image/pkg/types"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
_ "github.com/containerd/containerd/pkg/testutil" // Handle custom root flag
"github.com/containerd/errdefs"

"github.com/containerd/containerd/v2/core/images"
_ "github.com/containerd/containerd/v2/pkg/testutil" // Handle custom root flag
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/convertor/builder/turboOCI_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
sn "github.com/containerd/accelerated-container-image/pkg/types"
"github.com/containerd/accelerated-container-image/pkg/utils"
"github.com/containerd/accelerated-container-image/pkg/version"
"github.com/containerd/containerd/archive/compression"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/pkg/archive/compression"
"github.com/containerd/errdefs"
"github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go/v1"

Expand Down
2 changes: 1 addition & 1 deletion cmd/convertor/database/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"database/sql"
"fmt"

"github.com/containerd/containerd/log"
"github.com/containerd/log"
"github.com/opencontainers/go-digest"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/convertor/testingresources/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"strings"

"github.com/containerd/containerd/reference"
"github.com/containerd/containerd/v2/pkg/reference"
)

/*
Expand Down
4 changes: 2 additions & 2 deletions cmd/convertor/testingresources/local_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"os"
"path/filepath"

"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/errdefs"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/convertor/testingresources/local_remotes.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"io"
"time"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/remotes/docker"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/remotes"
"github.com/containerd/containerd/v2/core/remotes/docker"
"github.com/containerd/errdefs"
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/convertor/testingresources/local_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"io"
"strings"

"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/errdefs"
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
"oras.land/oras-go/v2/content/oci"
Expand Down
2 changes: 1 addition & 1 deletion cmd/convertor/testingresources/serialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"encoding/json"
"errors"

"github.com/containerd/containerd/images"
"github.com/containerd/containerd/v2/core/images"
"github.com/opencontainers/go-digest"
"github.com/opencontainers/image-spec/specs-go"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
4 changes: 2 additions & 2 deletions cmd/convertor/testingresources/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"path/filepath"
"testing"

"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/v2/core/remotes"
"github.com/containerd/containerd/v2/pkg/testutil"
)

func GetLocalRegistryPath() string {
Expand Down
12 changes: 3 additions & 9 deletions cmd/ctr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,13 @@ package main

import (
"fmt"
"math/rand"
"os"
"time"

"github.com/containerd/containerd/cmd/ctr/app"
"github.com/urfave/cli"
"github.com/containerd/containerd/v2/cmd/ctr/app"
"github.com/urfave/cli/v2"
)

func init() {
rand.Seed(time.Now().UnixNano())
}

var pluginCmds = []cli.Command{
var pluginCmds = []*cli.Command{
rpullCommand,
convertCommand,
recordTraceCommand,
Expand Down
21 changes: 11 additions & 10 deletions cmd/ctr/overlaybd_conv.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,42 @@ import (
"time"

obdconv "github.com/containerd/accelerated-container-image/pkg/convertor"
"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/images/converter"
"github.com/containerd/containerd/leases"

"github.com/containerd/containerd/v2/cmd/ctr/commands"
"github.com/containerd/containerd/v2/core/images/converter"
"github.com/containerd/containerd/v2/core/leases"
_ "github.com/go-sql-driver/mysql"
"github.com/pkg/errors"
"github.com/urfave/cli"
"github.com/urfave/cli/v2"
)

var convertCommand = cli.Command{
var convertCommand = &cli.Command{
Name: "obdconv",
Usage: "convert image layer into overlaybd format type",
ArgsUsage: "<src-image> <dst-image>",
Description: `Export images to an OCI tar[.gz] into zfile format`,
Flags: append(commands.RegistryFlags,
cli.StringFlag{
&cli.StringFlag{
Name: "fstype",
Usage: "filesystem type(required), used to mount block device, support specifying mount options and mkfs options, separate fs type and options by ';', separate mount options by ',', separate mkfs options by ' '",
Value: "ext4",
},
cli.StringFlag{
&cli.StringFlag{
Name: "dbstr",
Usage: "data base config string used for layer deduplication",
Value: "",
},
cli.StringFlag{
&cli.StringFlag{
Name: "algorithm",
Usage: "compress algorithm uses in zfile, [lz4|zstd]",
Value: "",
},
cli.IntFlag{
&cli.IntFlag{
Name: "bs",
Usage: "The size of a compressed data block in KB. Must be a power of two between 4K~64K [4/8/16/32/64]",
Value: 0,
},
cli.IntFlag{
&cli.IntFlag{
Name: "vsize",
Usage: "virtual block device size (GB)",
Value: 64,
Expand Down
Loading
Loading