Skip to content

Commit

Permalink
Merge branch 'main' into refactor/snapshot-embedded-containerd
Browse files Browse the repository at this point in the history
Signed-off-by: Robbie Buxton <138501839+rbpdt@users.noreply.github.com>
  • Loading branch information
rbpdt authored and Robbie Buxton committed Aug 11, 2023
2 parents dd78f93 + 45af8ff commit dfdd884
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ARG CRI_TOOLS_VERSION=v1.27.0
# Legacy builder that doesn't support TARGETARCH should set this explicitly using --build-arg.
# If TARGETARCH isn't supported by the builder, the default value is "amd64".

FROM golang:1.20.6-bullseye AS golang-base
FROM golang:1.20.7-bullseye AS golang-base

# Build containerd
FROM golang-base AS containerd-dev
Expand Down
4 changes: 2 additions & 2 deletions cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/containerd/stargz-snapshotter/cmd
go 1.19

require (
github.com/containerd/containerd v1.7.2
github.com/containerd/containerd v1.7.3
github.com/containerd/go-cni v1.1.9
github.com/containerd/stargz-snapshotter v0.14.3
github.com/containerd/stargz-snapshotter/estargz v0.14.3
Expand Down Expand Up @@ -36,7 +36,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cilium/ebpf v0.9.1 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/cgroups/v3 v3.0.1 // indirect
github.com/containerd/cgroups/v3 v3.0.2 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/continuity v0.4.1 // indirect
github.com/containerd/fifo v1.1.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions cmd/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
github.com/containerd/cgroups/v3 v3.0.1 h1:4hfGvu8rfGIwVIDd+nLzn/B9ZXx4BcCjzt5ToenJRaE=
github.com/containerd/cgroups/v3 v3.0.1/go.mod h1:/vtwk1VXrtoa5AaZLkypuOJgA/6DyPMZHJPGQNtlHnw=
github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0=
github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE=
github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw=
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
Expand Down
2 changes: 1 addition & 1 deletion ipfs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/containerd/stargz-snapshotter/ipfs
go 1.19

require (
github.com/containerd/containerd v1.7.2
github.com/containerd/containerd v1.7.3
github.com/mitchellh/go-homedir v1.1.0
github.com/multiformats/go-multiaddr v0.10.1
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
Expand Down
4 changes: 2 additions & 2 deletions ipfs/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo=
github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI=
github.com/containerd/containerd v1.7.3 h1:cKwYKkP1eTj54bP3wCdXXBymmKRQMrWjkLSWZZJDa8o=
github.com/containerd/containerd v1.7.3/go.mod h1:32FOM4/O0RkNg7AjQj3hDzN9cUGtu+HMvaKUNiqCZB8=
github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU=
github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY=
Expand Down
1 change: 0 additions & 1 deletion script/k3s-argo-workflow/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ cat "${TMP_K3S_REPO}/go.mod"

sed -i -E 's|(ENV DAPPER_RUN_ARGS .*)|\1 -v '"$(realpath ${REPO})":"$(realpath ${REPO})"':ro|g' "${TMP_K3S_REPO}/Dockerfile.dapper"
sed -i -E 's|(ENV DAPPER_ENV .*)|\1 DOCKER_BUILDKIT|g' "${TMP_K3S_REPO}/Dockerfile.dapper"
sed -i 's|\${VERSION_CONTAINERD}|v1.7.2-stargz|g' "${TMP_K3S_REPO}/scripts/download"
sed -i -E 's|github.com/k3s-io/containerd|github.com/pdtpartners/containerd|g' "${TMP_K3S_REPO}/scripts/download"
(
cd "${TMP_K3S_REPO}" && \
Expand Down
1 change: 0 additions & 1 deletion script/k3s/run-k3s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ cat "${TMP_K3S_REPO}/go.mod"

sed -i -E 's|(ENV DAPPER_RUN_ARGS .*)|\1 -v '"$(realpath ${REPO})":"$(realpath ${REPO})"':ro|g' "${TMP_K3S_REPO}/Dockerfile.dapper"
sed -i -E 's|(ENV DAPPER_ENV .*)|\1 DOCKER_BUILDKIT|g' "${TMP_K3S_REPO}/Dockerfile.dapper"
sed -i 's|\${VERSION_CONTAINERD}|v1.7.2-stargz|g' "${TMP_K3S_REPO}/scripts/download"
sed -i -E 's|github.com/k3s-io/containerd|github.com/pdtpartners/containerd|g' "${TMP_K3S_REPO}/scripts/download"

(
Expand Down
4 changes: 3 additions & 1 deletion snapshot/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ func (o *snapshotter) remoteCommit(ctx context.Context, name, key string, opts .
return err
}

rollback := true
defer func() {
if err != nil {
if rollback {
if rerr := t.Rollback(); rerr != nil {
log.G(ctx).WithError(rerr).Warn("failed to rollback transaction")
}
Expand All @@ -224,6 +225,7 @@ func (o *snapshotter) remoteCommit(ctx context.Context, name, key string, opts .
return fmt.Errorf("failed to commit snapshot: %w", err)
}

rollback = false
return t.Commit()
}

Expand Down

0 comments on commit dfdd884

Please sign in to comment.