Skip to content

chore: Upgrade nerdctl204 #81

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

Closed
wants to merge 10 commits into from
Closed
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 .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- '**.md'
workflow_dispatch:
env:
GO_VERSION: '1.23.0'
GO_VERSION: '1.23.7'
GOLANGCI_LINT_VERSION: '1.60.3'
jobs:
git-secrets:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout finch-deamon repo
Expand All @@ -84,7 +84,7 @@ jobs:
env:
CONTAINERD_VERSION: ${{ matrix.containerd }}
steps:
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout finch-daemon repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
workflow_call:
env:
GO_VERSION: '1.22.7'
GO_VERSION: '1.23.7'
permissions:
contents: write
deployments: write
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-tags: true
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
cache: false
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.13.1"
".": "0.14.0"
}
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## [0.14.0](https://github.com/runfinch/finch-daemon/compare/v0.13.1...v0.14.0) (2025-03-18)


### Build System or External Dependencies

* **deps:** Bump github.com/containerd/containerd/v2 from 2.0.2 to 2.0.4 ([#186](https://github.com/runfinch/finch-daemon/issues/186)) ([8d92e1f](https://github.com/runfinch/finch-daemon/commit/8d92e1f2a1d8555f4db1ed41025f7f9cac0916d0))
* **deps:** Bump github.com/containerd/go-cni from 1.1.11 to 1.1.12 ([#154](https://github.com/runfinch/finch-daemon/issues/154)) ([d9be44f](https://github.com/runfinch/finch-daemon/commit/d9be44f30aa0ae63aa1dd2b8224ff43eb8b11e0f))
* **deps:** bump github.com/containerd/nerdctl/v2 from 2.0.0 to 2.0.3 ([#173](https://github.com/runfinch/finch-daemon/issues/173)) ([1bcfebd](https://github.com/runfinch/finch-daemon/commit/1bcfebd4acc8c14c91eeda3c1e73b0e66a14b66e))
* **deps:** Bump github.com/docker/docker from 27.5.0+incompatible to 28.0.1+incompatible ([#170](https://github.com/runfinch/finch-daemon/issues/170)) ([e474488](https://github.com/runfinch/finch-daemon/commit/e474488f13615308af0e12f4a45720cfd947ba31))
* **deps:** Bump github.com/go-jose/go-jose/v4 from 4.0.4 to 4.0.5 ([#167](https://github.com/runfinch/finch-daemon/issues/167)) ([71a062a](https://github.com/runfinch/finch-daemon/commit/71a062adc537fa935e88e2da4c2b7addf4365c88))
* **deps:** Bump github.com/moby/moby from 27.4.1+incompatible to 28.0.1+incompatible ([#169](https://github.com/runfinch/finch-daemon/issues/169)) ([be4b61a](https://github.com/runfinch/finch-daemon/commit/be4b61a21cf68e0e67c29b830f6a09a5a11b4435))
* **deps:** Bump golang.org/x/net from 0.34.0 to 0.36.0 ([#182](https://github.com/runfinch/finch-daemon/issues/182)) ([006c68d](https://github.com/runfinch/finch-daemon/commit/006c68d3d55b6f2cd2e43f9f177c4ad503132f1b))
* **deps:** Bump golang.org/x/net from 0.34.0 to 0.37.0 ([#183](https://github.com/runfinch/finch-daemon/issues/183)) ([159c5f3](https://github.com/runfinch/finch-daemon/commit/159c5f3b860746f7b3e157664c10a0f6e238df0e))
* **deps:** Bump google.golang.org/protobuf from 1.36.4 to 1.36.5 ([#184](https://github.com/runfinch/finch-daemon/issues/184)) ([46b1402](https://github.com/runfinch/finch-daemon/commit/46b1402e070c3e662ca26fbf9710c04799d21fc2))


### Features

* add detachKeys option to container start ([#159](https://github.com/runfinch/finch-daemon/issues/159)) ([b03f126](https://github.com/runfinch/finch-daemon/commit/b03f12688a0bbbbbcad4f6a6ec300a39846775d1))


### Bug Fixes

* Refactor filters parsing ([#181](https://github.com/runfinch/finch-daemon/issues/181)) ([6d36c03](https://github.com/runfinch/finch-daemon/commit/6d36c03b37e5f1a7eb225093aff71e16728a5247))
* refactor wait API ([#177](https://github.com/runfinch/finch-daemon/issues/177)) ([08878dc](https://github.com/runfinch/finch-daemon/commit/08878dc134e24310c293849950e854c83ff30cb5))

## [0.13.1](https://github.com/runfinch/finch-daemon/compare/v0.13.0...v0.13.1) (2025-02-21)


Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ endif
.PHONY: gen-code
gen-code: linux
rm -rf ./pkg/mocks
GOBIN=$(BIN) go install github.com/golang/mock/mockgen
GOBIN=$(BIN) go install golang.org/x/tools/cmd/stringer
GOBIN=$(BIN) go install github.com/golang/mock/mockgen@v1.6.0
GOBIN=$(BIN) go install golang.org/x/tools/cmd/stringer@v0.31.0
PATH=$(BIN):$(PATH) go generate ./...
PATH=$(BIN):$(PATH) mockgen --destination=./mocks/mocks_container/container.go -package=mocks_container github.com/containerd/containerd/v2/client Container
PATH=$(BIN):$(PATH) mockgen --destination=./mocks/mocks_container/process.go -package=mocks_container github.com/containerd/containerd/v2/client Process
Expand Down
8 changes: 5 additions & 3 deletions e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package e2e

import (
"flag"
"os"
"testing"

Expand All @@ -15,13 +16,14 @@ import (
"github.com/runfinch/finch-daemon/e2e/tests"
)

// Subject defines which CLI the tests are run against, defaults to \"nerdctl\" in the user's PATH.
var Subject = flag.String("subject", "nerdctl", `which CLI the tests are run against, defaults to "nerdctl" in the user's PATH.`)

func TestRun(t *testing.T) {
if os.Getenv("TEST_E2E") != "1" {
t.Skip("E2E tests skipped. Set TEST_E2E=1 to run these tests")
}
// TODO : Make this configurable
runtimeExe := "nerdctl"
opt, _ := option.New([]string{runtimeExe, "-n", "finch"})
opt, _ := option.New([]string{*Subject, "--namespace", "finch"})

ginkgo.SynchronizedBeforeSuite(func() []byte {
tests.SetupLocalRegistry(opt)
Expand Down
16 changes: 13 additions & 3 deletions e2e/tests/container_restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
"fmt"
"io"
"net/http"
"strings"
"time"
"unicode"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -40,7 +42,10 @@ func ContainerRestart(opt *option.Option) {
It("should start and restart the container", func() {
containerShouldBeRunning(opt, testContainerName)

before := time.Now().Round(0)
// use location to ensure all times are UTC since
// the default location is different on different platforms
lo, _ := time.LoadLocation("UTC")
before := time.Now().In(lo).Round(0)

restartRelativeUrl := fmt.Sprintf("/containers/%s/restart", testContainerName)
res, err := uClient.Post(client.ConvertToFinchUrl(version, restartRelativeUrl), "application/json", nil)
Expand All @@ -57,8 +62,13 @@ func ContainerRestart(opt *option.Option) {
body, err := io.ReadAll(res.Body)
Expect(err).Should(BeNil())

dateStr := string(body[8 : len(body)-1])
date, _ := time.Parse(time.UnixDate, dateStr)
// get the second date from the container logs, which are newline delimited
// and strip newlines, spaces, and non-printable characters
dateStr := strings.TrimFunc(strings.Split(string(body), "\n")[1], func(r rune) bool {
return !unicode.IsGraphic(r) || unicode.IsSpace(r)
})
date, err := time.ParseInLocation(time.UnixDate, dateStr, lo)
Expect(err).Should(BeNil())
Expect(before.Before(date)).Should(BeTrue())
})
It("should fail to restart container that does not exist", func() {
Expand Down
38 changes: 19 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/runfinch/finch-daemon

go 1.23.0
go 1.23.7

require (
github.com/containerd/cgroups/v3 v3.0.5
Expand All @@ -9,15 +9,15 @@ require (
github.com/containerd/errdefs v1.0.0
github.com/containerd/fifo v1.1.0
github.com/containerd/go-cni v1.1.12
github.com/containerd/nerdctl/v2 v2.0.3
github.com/containerd/nerdctl/v2 v2.0.4
github.com/containerd/platforms v1.0.0-rc.1
github.com/containerd/typeurl/v2 v2.2.3
github.com/containernetworking/cni v1.2.3
github.com/coreos/go-iptables v0.8.0
github.com/coreos/go-systemd/v22 v22.5.0
github.com/distribution/reference v0.6.0
github.com/docker/cli v27.5.0+incompatible
github.com/docker/docker v28.0.1+incompatible
github.com/docker/cli v28.0.2+incompatible
github.com/docker/docker v28.0.2+incompatible
github.com/docker/go-connections v0.5.0
github.com/docker/go-units v0.5.0
github.com/getlantern/httptest v0.0.0-20161025015934-4b40f4c7e590
Expand All @@ -29,14 +29,14 @@ require (
github.com/onsi/ginkgo/v2 v2.22.2
github.com/onsi/gomega v1.36.2
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0
github.com/opencontainers/runtime-spec v1.2.0
github.com/opencontainers/image-spec v1.1.1
github.com/opencontainers/runtime-spec v1.2.1
github.com/pelletier/go-toml/v2 v2.2.3
github.com/pkg/errors v0.9.1
github.com/runfinch/common-tests v0.9.1
github.com/sirupsen/logrus v1.9.3
github.com/spf13/afero v1.12.0
github.com/spf13/cobra v1.8.1
github.com/spf13/afero v1.14.0
github.com/spf13/cobra v1.9.1
github.com/stretchr/testify v1.10.0
github.com/vishvananda/netlink v1.3.0
github.com/vishvananda/netns v0.0.5
Expand All @@ -53,22 +53,22 @@ require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Microsoft/hcsshim v0.12.9 // indirect
github.com/cilium/ebpf v0.16.0 // indirect
github.com/containerd/accelerated-container-image v1.2.3 // indirect
github.com/containerd/accelerated-container-image v1.3.0 // indirect
github.com/containerd/console v1.0.4 // indirect
github.com/containerd/continuity v0.4.5 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/go-runc v1.1.0 // indirect
github.com/containerd/imgcrypt/v2 v2.0.0 // indirect
github.com/containerd/imgcrypt/v2 v2.0.1 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/nydus-snapshotter v0.15.0 // indirect
github.com/containerd/plugin v1.0.0 // indirect
github.com/containerd/stargz-snapshotter v0.16.3 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/containerd/stargz-snapshotter/ipfs v0.16.3 // indirect
github.com/containerd/ttrpc v1.2.7 // indirect
github.com/containernetworking/plugins v1.5.1 // indirect
github.com/containernetworking/plugins v1.6.2 // indirect
github.com/containers/ocicrypt v1.2.1 // indirect
github.com/cyphar/filepath-securejoin v0.4.0 // indirect
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/djherbis/times v1.6.0 // indirect
github.com/docker/docker-credential-helpers v0.8.2 // indirect
Expand All @@ -89,8 +89,8 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/ipfs/go-cid v0.5.0 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
Expand Down Expand Up @@ -120,12 +120,12 @@ require (
github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rootless-containers/bypass4netns v0.4.1 // indirect
github.com/rootless-containers/rootlesskit/v2 v2.3.2 // indirect
github.com/rootless-containers/bypass4netns v0.4.2 // indirect
github.com/rootless-containers/rootlesskit/v2 v2.3.4 // indirect
github.com/sasha-s/go-deadlock v0.3.5 // indirect
github.com/smallstep/pkcs7 v0.1.1 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 // indirect
github.com/tinylib/msgp v1.2.0 // indirect
github.com/vbatts/tar-split v0.11.6 // indirect
Expand All @@ -142,8 +142,8 @@ require (
golang.org/x/text v0.23.0 // indirect
golang.org/x/time v0.8.0 // indirect
golang.org/x/tools v0.28.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 // indirect
google.golang.org/grpc v1.68.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect
google.golang.org/grpc v1.69.4 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
)
Loading
Loading