commit
f5d5407c2f
@ -12,7 +12,7 @@
|
|||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
|
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
|
||||||
"ghcr.io/devcontainers/features/go:1": {
|
"ghcr.io/devcontainers/features/go:1": {
|
||||||
"version": "1.22.6"
|
"version": "1.23.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
2
.github/actions/install-go/action.yml
vendored
2
.github/actions/install-go/action.yml
vendored
@ -3,7 +3,7 @@ description: "Reusable action to install Go, so there is one place to bump Go ve
|
|||||||
inputs:
|
inputs:
|
||||||
go-version:
|
go-version:
|
||||||
required: true
|
required: true
|
||||||
default: "1.22.6"
|
default: "1.23.0"
|
||||||
description: "Go version to install"
|
description: "Go version to install"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
|
2
.github/workflows/api-release.yml
vendored
2
.github/workflows/api-release.yml
vendored
@ -6,7 +6,7 @@ on:
|
|||||||
name: API Release
|
name: API Release
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: "1.22.6"
|
GO_VERSION: "1.23.0"
|
||||||
|
|
||||||
permissions: # added using https://github.com/step-security/secure-workflows
|
permissions: # added using https://github.com/step-security/secure-workflows
|
||||||
contents: read
|
contents: read
|
||||||
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -33,7 +33,7 @@ jobs:
|
|||||||
- uses: ./.github/actions/install-go
|
- uses: ./.github/actions/install-go
|
||||||
- uses: golangci/golangci-lint-action@v6
|
- uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
version: v1.59.1
|
version: v1.60.1
|
||||||
skip-cache: true
|
skip-cache: true
|
||||||
args: --timeout=8m
|
args: --timeout=8m
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-22.04, ubuntu-24.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019, windows-2022]
|
os: [ubuntu-22.04, ubuntu-24.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019, windows-2022]
|
||||||
go-version: ["1.22.6"]
|
go-version: ["1.22.6", "1.23.0"]
|
||||||
exclude:
|
exclude:
|
||||||
- os: ${{ github.repository != 'containerd/containerd' && 'actuated-arm64-4cpu-16gb' }}
|
- os: ${{ github.repository != 'containerd/containerd' && 'actuated-arm64-4cpu-16gb' }}
|
||||||
steps:
|
steps:
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -13,7 +13,7 @@ on:
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: "1.22.6"
|
GO_VERSION: "1.23.0"
|
||||||
|
|
||||||
permissions: # added using https://github.com/step-security/secure-workflows
|
permissions: # added using https://github.com/step-security/secure-workflows
|
||||||
contents: read
|
contents: read
|
||||||
|
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -104,7 +104,7 @@ EOF
|
|||||||
config.vm.provision "install-golang", type: "shell", run: "once" do |sh|
|
config.vm.provision "install-golang", type: "shell", run: "once" do |sh|
|
||||||
sh.upload_path = "/tmp/vagrant-install-golang"
|
sh.upload_path = "/tmp/vagrant-install-golang"
|
||||||
sh.env = {
|
sh.env = {
|
||||||
'GO_VERSION': ENV['GO_VERSION'] || "1.22.6",
|
'GO_VERSION': ENV['GO_VERSION'] || "1.23.0",
|
||||||
}
|
}
|
||||||
sh.inline = <<~SHELL
|
sh.inline = <<~SHELL
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# docker run --privileged containerd-test
|
# docker run --privileged containerd-test
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
ARG GOLANG_VERSION=1.22.6
|
ARG GOLANG_VERSION=1.23.0
|
||||||
ARG GOLANG_IMAGE=golang
|
ARG GOLANG_IMAGE=golang
|
||||||
|
|
||||||
FROM ${GOLANG_IMAGE}:${GOLANG_VERSION} AS golang
|
FROM ${GOLANG_IMAGE}:${GOLANG_VERSION} AS golang
|
||||||
|
@ -43,11 +43,11 @@ go run main.go --target_dir $SRC/containerd/images
|
|||||||
|
|
||||||
apt-get update && apt-get install -y wget
|
apt-get update && apt-get install -y wget
|
||||||
cd $SRC
|
cd $SRC
|
||||||
wget --quiet https://go.dev/dl/go1.22.6.linux-amd64.tar.gz
|
wget --quiet https://go.dev/dl/go1.23.0.linux-amd64.tar.gz
|
||||||
|
|
||||||
mkdir temp-go
|
mkdir temp-go
|
||||||
rm -rf /root/.go/*
|
rm -rf /root/.go/*
|
||||||
tar -C temp-go/ -xzf go1.22.6.linux-amd64.tar.gz
|
tar -C temp-go/ -xzf go1.23.0.linux-amd64.tar.gz
|
||||||
mv temp-go/go/* /root/.go/
|
mv temp-go/go/* /root/.go/
|
||||||
cd $SRC/containerd
|
cd $SRC/containerd
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ import (
|
|||||||
"compress/gzip"
|
"compress/gzip"
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
@ -290,14 +291,14 @@ func TestDockerFetcherOpen(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "should return just status if the registry request fails and does not return a docker error",
|
name: "should return just status if the registry request fails and does not return a docker error",
|
||||||
mockedStatus: 500,
|
mockedStatus: 500,
|
||||||
mockedErr: fmt.Errorf("Non-docker error"),
|
mockedErr: errors.New("Non-docker error"),
|
||||||
want: nil,
|
want: nil,
|
||||||
wantErr: true,
|
wantErr: true,
|
||||||
wantPlainError: true,
|
wantPlainError: true,
|
||||||
}, {
|
}, {
|
||||||
name: "should return StatusRequestTimeout after 5 retries",
|
name: "should return StatusRequestTimeout after 5 retries",
|
||||||
mockedStatus: http.StatusRequestTimeout,
|
mockedStatus: http.StatusRequestTimeout,
|
||||||
mockedErr: fmt.Errorf(http.StatusText(http.StatusRequestTimeout)),
|
mockedErr: errors.New(http.StatusText(http.StatusRequestTimeout)),
|
||||||
want: nil,
|
want: nil,
|
||||||
wantErr: true,
|
wantErr: true,
|
||||||
wantPlainError: true,
|
wantPlainError: true,
|
||||||
@ -305,7 +306,7 @@ func TestDockerFetcherOpen(t *testing.T) {
|
|||||||
}, {
|
}, {
|
||||||
name: "should return StatusTooManyRequests after 5 retries",
|
name: "should return StatusTooManyRequests after 5 retries",
|
||||||
mockedStatus: http.StatusTooManyRequests,
|
mockedStatus: http.StatusTooManyRequests,
|
||||||
mockedErr: fmt.Errorf(http.StatusText(http.StatusTooManyRequests)),
|
mockedErr: errors.New(http.StatusText(http.StatusTooManyRequests)),
|
||||||
want: nil,
|
want: nil,
|
||||||
wantErr: true,
|
wantErr: true,
|
||||||
wantPlainError: true,
|
wantPlainError: true,
|
||||||
|
@ -24,7 +24,6 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
@ -488,13 +487,6 @@ func getLogDirPath(runtimeVersion, id string) string {
|
|||||||
func TestContainerAttach(t *testing.T) {
|
func TestContainerAttach(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
if runtime.GOOS == "windows" {
|
|
||||||
// On windows, closing the write side of the pipe closes the read
|
|
||||||
// side, sending an EOF to it and preventing reopening it.
|
|
||||||
// Hence this test will always fails on windows
|
|
||||||
t.Skip("invalid logic on windows")
|
|
||||||
}
|
|
||||||
|
|
||||||
client, err := newClient(t, address)
|
client, err := newClient(t, address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
@ -667,13 +659,6 @@ func testContainerUser(t *testing.T, userstr, expectedOutput string) {
|
|||||||
func TestContainerAttachProcess(t *testing.T) {
|
func TestContainerAttachProcess(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
if runtime.GOOS == "windows" {
|
|
||||||
// On windows, closing the write side of the pipe closes the read
|
|
||||||
// side, sending an EOF to it and preventing reopening it.
|
|
||||||
// Hence this test will always fails on windows
|
|
||||||
t.Skip("invalid logic on windows")
|
|
||||||
}
|
|
||||||
|
|
||||||
client, err := newClient(t, address)
|
client, err := newClient(t, address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
@ -791,13 +776,6 @@ func TestContainerAttachProcess(t *testing.T) {
|
|||||||
func TestContainerLoadUnexistingProcess(t *testing.T) {
|
func TestContainerLoadUnexistingProcess(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
if runtime.GOOS == "windows" {
|
|
||||||
// On windows, closing the write side of the pipe closes the read
|
|
||||||
// side, sending an EOF to it and preventing reopening it.
|
|
||||||
// Hence this test will always fails on windows
|
|
||||||
t.Skip("invalid logic on windows")
|
|
||||||
}
|
|
||||||
|
|
||||||
client, err := newClient(t, address)
|
client, err := newClient(t, address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -27,7 +27,7 @@ func TestBackground(t *testing.T) {
|
|||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
var k struct{}
|
var k struct{}
|
||||||
v := "incontext"
|
v := "incontext"
|
||||||
ctx = context.WithValue(ctx, k, v)
|
ctx = context.WithValue(ctx, k, v) //nolint:staticcheck
|
||||||
|
|
||||||
assert.Nil(t, contextError(ctx))
|
assert.Nil(t, contextError(ctx))
|
||||||
assert.Equal(t, ctx.Value(k), v)
|
assert.Equal(t, ctx.Value(k), v)
|
||||||
|
@ -76,7 +76,7 @@ func (c *criService) CheckpointContainer(ctx context.Context, r *runtime.Checkpo
|
|||||||
podCriuVersion,
|
podCriuVersion,
|
||||||
r.GetContainerId(),
|
r.GetContainerId(),
|
||||||
)
|
)
|
||||||
log.G(ctx).WithError(err).Errorf(errorMessage)
|
log.G(ctx).WithError(err).Error(errorMessage)
|
||||||
return nil, fmt.Errorf(
|
return nil, fmt.Errorf(
|
||||||
"%s: %w",
|
"%s: %w",
|
||||||
errorMessage,
|
errorMessage,
|
||||||
|
@ -208,7 +208,7 @@ func (p *parser) field() (string, error) {
|
|||||||
case tokenQuoted:
|
case tokenQuoted:
|
||||||
return p.unquote(pos, s, false)
|
return p.unquote(pos, s, false)
|
||||||
case tokenIllegal:
|
case tokenIllegal:
|
||||||
return "", p.mkerr(pos, p.scanner.err)
|
return "", p.mkerr(pos, "%s", p.scanner.err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return "", p.mkerr(pos, "expected field or quoted")
|
return "", p.mkerr(pos, "expected field or quoted")
|
||||||
@ -229,7 +229,7 @@ func (p *parser) operator() (operator, error) {
|
|||||||
return 0, p.mkerr(pos, "unsupported operator %q", s)
|
return 0, p.mkerr(pos, "unsupported operator %q", s)
|
||||||
}
|
}
|
||||||
case tokenIllegal:
|
case tokenIllegal:
|
||||||
return 0, p.mkerr(pos, p.scanner.err)
|
return 0, p.mkerr(pos, "%s", p.scanner.err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0, p.mkerr(pos, `expected an operator ("=="|"!="|"~=")`)
|
return 0, p.mkerr(pos, `expected an operator ("=="|"!="|"~=")`)
|
||||||
@ -244,7 +244,7 @@ func (p *parser) value(allowAltQuotes bool) (string, error) {
|
|||||||
case tokenQuoted:
|
case tokenQuoted:
|
||||||
return p.unquote(pos, s, allowAltQuotes)
|
return p.unquote(pos, s, allowAltQuotes)
|
||||||
case tokenIllegal:
|
case tokenIllegal:
|
||||||
return "", p.mkerr(pos, p.scanner.err)
|
return "", p.mkerr(pos, "%s", p.scanner.err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return "", p.mkerr(pos, "expected value or quoted")
|
return "", p.mkerr(pos, "expected value or quoted")
|
||||||
|
@ -133,7 +133,7 @@ func (s *service) Delete(ctx context.Context, req *api.DeleteContentRequest) (*p
|
|||||||
log.G(ctx).WithField("digest", req.Digest).Debugf("delete content")
|
log.G(ctx).WithField("digest", req.Digest).Debugf("delete content")
|
||||||
dg, err := digest.Parse(req.Digest)
|
dg, err := digest.Parse(req.Digest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, status.Errorf(codes.InvalidArgument, err.Error())
|
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.store.Delete(ctx, dg); err != nil {
|
if err := s.store.Delete(ctx, dg); err != nil {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# lived test environment.
|
# lived test environment.
|
||||||
Set-MpPreference -DisableRealtimeMonitoring:$true
|
Set-MpPreference -DisableRealtimeMonitoring:$true
|
||||||
|
|
||||||
$PACKAGES= @{ mingw = "10.2.0"; git = ""; golang = "1.22.6"; make = ""; nssm = "" }
|
$PACKAGES= @{ mingw = "10.2.0"; git = ""; golang = "1.23.0"; make = ""; nssm = "" }
|
||||||
|
|
||||||
Write-Host "Downloading chocolatey package"
|
Write-Host "Downloading chocolatey package"
|
||||||
curl.exe -L "https://packages.chocolatey.org/chocolatey.0.10.15.nupkg" -o 'c:\choco.zip'
|
curl.exe -L "https://packages.chocolatey.org/chocolatey.0.10.15.nupkg" -o 'c:\choco.zip'
|
||||||
|
Loading…
Reference in New Issue
Block a user