Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: microsoft/hcsshim
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.11.7
Choose a base ref
...
head repository: microsoft/hcsshim
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.11.8
Choose a head ref
  • 5 commits
  • 505 files changed
  • 4 contributors

Commits on Jul 3, 2024

  1. [release/0.11] vendor: github.com/containerd/containerd v1.6.33

    Update to the current v1.6 release, which deprecated the errdefs
    package in favor of the separate github.com/containerd/errdefs
    module, which is now an alias.
    
    Update the minimum required version to prevent consumers from using
    an older version, and thus incompatible errdefs definitions, and change
    all uses of the deprecated package to use the module directly.
    
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah authored and kiashok committed Jul 3, 2024
    Copy the full SHA
    777f798 View commit details

Commits on Aug 30, 2024

  1. Update golang version + fix lint errors

    Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
    kiashok committed Aug 30, 2024
    Copy the full SHA
    9196c84 View commit details

Commits on Oct 30, 2024

  1. Update golang and containerd version

    Update containerd version 1.6.36
    Update golang version to 1.21.x
    Fix lint errors
    
    Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
    kiashok committed Oct 30, 2024
    Copy the full SHA
    f79d88e View commit details
  2. update newBinaryCmd URL path handling (#2041)

    Signed-off-by: Maksim An <maksiman@microsoft.com>
    (cherry picked from commit fe8c673)
    Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
    anmaxvl authored and kiashok committed Oct 30, 2024
    Copy the full SHA
    5928a5d View commit details

Commits on Nov 6, 2024

  1. Fixing typo (#2288)

    (cherry picked from commit 166e62a)
    
    Signed-off-by: ritikaguptams <85255050+ritikaguptams@users.noreply.github.com>
    ritikaguptams authored Nov 6, 2024
    Copy the full SHA
    bd7c37c View commit details
Showing 505 changed files with 8,380 additions and 4,662 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ on:
- pull_request

env:
GO_VERSION: "1.19.x"
GO_VERSION: "1.21.x"
GOTESTSUM_VERSION: "latest"

jobs:
@@ -38,9 +38,9 @@ jobs:
# sometimes go cache causes issues with lint
cache: false

- uses: golangci/golangci-lint-action@v3
- uses: golangci/golangci-lint-action@v6
with:
version: v1.52
version: v1.54
args: >-
--verbose
--max-issues-per-linter=0
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ on:
- 'v*'

env:
GO_VERSION: "1.18.x"
GO_VERSION: "1.21.x"

jobs:
build:
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/exec.go
Original file line number Diff line number Diff line change
@@ -5,8 +5,8 @@ package main
import (
"context"

"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/pkg/errors"
)

2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/exec_hcs.go
Original file line number Diff line number Diff line change
@@ -9,9 +9,9 @@ import (

eventstypes "github.com/containerd/containerd/api/events"
containerd_v1_types "github.com/containerd/containerd/api/types/task"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/exec_wcow_podsandbox.go
Original file line number Diff line number Diff line change
@@ -10,9 +10,9 @@ import (
"github.com/Microsoft/hcsshim/internal/log"
eventstypes "github.com/containerd/containerd/api/events"
containerd_v1_types "github.com/containerd/containerd/api/types/task"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/exec_wcow_podsandbox_test.go
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ import (
"time"

containerd_v1_types "github.com/containerd/containerd/api/types/task"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/pkg/errors"
)

2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/pod.go
Original file line number Diff line number Diff line change
@@ -16,9 +16,9 @@ import (
"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/pkg/annotations"
eventstypes "github.com/containerd/containerd/api/events"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"golang.org/x/sync/errgroup"
16 changes: 11 additions & 5 deletions cmd/containerd-shim-runhcs-v1/pod_test.go
Original file line number Diff line number Diff line change
@@ -9,9 +9,10 @@ import (
"strconv"
"sync"
"testing"
"time"

"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

@@ -96,8 +97,10 @@ func setupTestPodWithFakes(t *testing.T) (*pod, *testShimTask) {
execs: make(map[string]*testShimExec),
}
// Add a 2nd exec
seid := strconv.Itoa(rand.Int())
st.execs[seid] = newTestShimExec(t.Name(), seid, int(rand.Int31()))
seed := time.Now().UnixNano()
source := rand.New(rand.NewSource(seed))
seid := strconv.FormatInt((int64)(source.Uint64()), 10)
st.execs[seid] = newTestShimExec(t.Name(), seid, int(source.Uint64()))
p := &pod{
id: t.Name(),
sandboxTask: st,
@@ -107,10 +110,13 @@ func setupTestPodWithFakes(t *testing.T) (*pod, *testShimTask) {

func setupTestTaskInPod(t *testing.T, p *pod) *testShimTask {
t.Helper()
tid := strconv.Itoa(rand.Int())
seed := time.Now().UnixNano()
source := rand.New(rand.NewSource(seed))
tid := strconv.FormatInt((int64)(source.Uint64()), 10)

wt := &testShimTask{
id: tid,
exec: newTestShimExec(tid, tid, int(rand.Int31())),
exec: newTestShimExec(tid, tid, int(source.Uint64())),
}
p.workloadTasks.Store(wt.id, wt)
return wt
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/service.go
Original file line number Diff line number Diff line change
@@ -14,8 +14,8 @@ import (
"github.com/Microsoft/hcsshim/internal/extendedtask"
"github.com/Microsoft/hcsshim/internal/oc"
"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
google_protobuf1 "github.com/gogo/protobuf/types"
"go.opencensus.io/trace"
)
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/service_internal.go
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@ import (
"github.com/Microsoft/hcsshim/internal/oci"
"github.com/Microsoft/hcsshim/internal/shimdiag"
containerd_v1_types "github.com/containerd/containerd/api/types/task"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/containerd/typeurl"
google_protobuf1 "github.com/gogo/protobuf/types"
"github.com/opencontainers/runtime-spec/specs-go"
11 changes: 7 additions & 4 deletions cmd/containerd-shim-runhcs-v1/service_internal_podshim_test.go
Original file line number Diff line number Diff line change
@@ -12,15 +12,17 @@ import (

"github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options"
"github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/containerd/typeurl"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

func setupPodServiceWithFakes(t *testing.T) (*service, *testShimTask, *testShimTask, *testShimExec) {
t.Helper()
tid := strconv.Itoa(rand.Int())
seed := time.Now().UnixNano()
source := rand.New(rand.NewSource(seed))
tid := strconv.FormatInt((int64)(source.Uint64()), 10)

s, err := NewService(WithTID(tid), WithIsSandbox(true))
if err != nil {
@@ -47,8 +49,9 @@ func setupPodServiceWithFakes(t *testing.T) (*service, *testShimTask, *testShimT
}

// create a 2nd fake container
secondTaskID := strconv.Itoa(rand.Int())
secondTaskSecondExecID := strconv.Itoa(rand.Int())
secondTaskID := strconv.FormatInt((int64)(source.Uint64()), 10)
secondTaskSecondExecID := strconv.FormatInt((int64)(source.Uint64()), 10)

task2 := &testShimTask{
id: secondTaskID,
exec: newTestShimExec(secondTaskID, secondTaskID, 101),
Original file line number Diff line number Diff line change
@@ -16,15 +16,17 @@ import (
"github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats"
"github.com/Microsoft/hcsshim/internal/hcsoci"
"github.com/Microsoft/hcsshim/pkg/ctrdtaskapi"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/containerd/typeurl"
"github.com/opencontainers/runtime-spec/specs-go"
)

func setupTaskServiceWithFakes(t *testing.T) (*service, *testShimTask, *testShimExec) {
t.Helper()
tid := strconv.Itoa(rand.Int())
seed := time.Now().UnixNano()
source := rand.New(rand.NewSource(seed))
tid := strconv.FormatInt((int64)(source.Uint64()), 10)

s, err := NewService(WithTID(tid), WithIsSandbox(false))
if err != nil {
@@ -46,7 +48,7 @@ func setupTaskServiceWithFakes(t *testing.T) (*service, *testShimTask, *testShim
exec: newTestShimExec(tid, tid, 10),
execs: make(map[string]*testShimExec),
}
secondExecID := strconv.Itoa(rand.Int())
secondExecID := strconv.FormatInt((int64)(source.Uint64()), 10)
secondExec := newTestShimExec(tid, secondExecID, 101)
task.execs[secondExecID] = secondExec
s.taskOrPod.Store(task)
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/task.go
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@ import (
"github.com/Microsoft/hcsshim/internal/hcs"
"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/pkg/ctrdtaskapi"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/opencontainers/runtime-spec/specs-go"
)

2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/task_hcs.go
Original file line number Diff line number Diff line change
@@ -12,9 +12,9 @@ import (
"time"

eventstypes "github.com/containerd/containerd/api/events"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/containerd/typeurl"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
3 changes: 2 additions & 1 deletion cmd/containerd-shim-runhcs-v1/task_hcs_test.go
Original file line number Diff line number Diff line change
@@ -9,11 +9,12 @@ import (
"testing"
"time"

"github.com/containerd/containerd/errdefs"
"github.com/containerd/errdefs"
)

func setupTestHcsTask(t *testing.T) (*hcsTask, *testShimExec, *testShimExec) {
t.Helper()

initExec := newTestShimExec(t.Name(), t.Name(), int(rand.Int31()))
lt := &hcsTask{
events: newFakePublisher(),
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/task_test.go
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@ import (
"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/pkg/ctrdtaskapi"
v1 "github.com/containerd/cgroups/stats/v1"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/containerd/typeurl"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/task_wcow_podsandbox.go
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@ import (
"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/internal/uvm"
eventstypes "github.com/containerd/containerd/api/events"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime"
"github.com/containerd/containerd/runtime/v2/task"
"github.com/containerd/errdefs"
"github.com/containerd/typeurl"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
2 changes: 1 addition & 1 deletion ext4/dmverity/dmverity_test.go
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@ package dmverity

import (
"bytes"
"crypto/rand"
"encoding/binary"
"io"
"math/rand"
"os"
"strings"
"testing"
2 changes: 1 addition & 1 deletion ext4/tar2ext4/tar2ext4.go
Original file line number Diff line number Diff line change
@@ -148,7 +148,7 @@ func ConvertTarToExt4(r io.Reader, w io.ReadWriteSeeker, options ...Option) erro

var typ uint16
switch hdr.Typeflag {
case tar.TypeReg, tar.TypeRegA:
case tar.TypeReg:
typ = compactext4.S_IFREG
case tar.TypeSymlink:
typ = compactext4.S_IFLNK
24 changes: 13 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -8,13 +8,14 @@ require (
github.com/cenkalti/backoff/v4 v4.2.0
github.com/containerd/cgroups v1.1.0
github.com/containerd/console v1.0.3
github.com/containerd/containerd v1.6.23
github.com/containerd/containerd v1.6.36
github.com/containerd/errdefs v0.1.0
github.com/containerd/go-runc v1.0.0
github.com/containerd/ttrpc v1.1.2
github.com/containerd/typeurl v1.0.2
github.com/gogo/protobuf v1.3.2
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.5.9
github.com/google/go-cmp v0.6.0
github.com/google/go-containerregistry v0.14.0
github.com/josephspurrier/goversioninfo v1.4.0
github.com/lestrrat-go/jwx v1.2.25
@@ -33,15 +34,16 @@ require (
go.etcd.io/bbolt v1.3.7
go.opencensus.io v0.24.0
golang.org/x/sync v0.3.0
golang.org/x/sys v0.10.0
google.golang.org/grpc v1.50.1
golang.org/x/sys v0.18.0
google.golang.org/grpc v1.59.0
)

require (
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/agnivade/levenshtein v1.0.1 // indirect
github.com/akavel/rsrc v0.10.2 // indirect
github.com/containerd/fifo v1.0.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
@@ -59,7 +61,7 @@ require (
github.com/goccy/go-json v0.9.7 // indirect
github.com/godbus/dbus/v5 v5.0.6 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
github.com/lestrrat-go/blackmagic v1.0.0 // indirect
@@ -69,7 +71,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/vbatts/tar-split v0.11.2 // indirect
@@ -78,13 +80,13 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yashtewari/glob-intersection v0.1.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.11.0 // indirect
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
google.golang.org/protobuf v1.29.1 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

Loading