Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Update all dependencies to latest versions. In particular, brings
context support to Kubernetes API calls.

Also switches from fuse to syscall error constants for
bazil/fuse@e2f0bde

Signed-off-by: Michael Smith <[email protected]>
  • Loading branch information
MikaelSmith committed Mar 31, 2020
1 parent 41d093f commit e052e1b
Show file tree
Hide file tree
Showing 14 changed files with 649 additions and 220 deletions.
1 change: 0 additions & 1 deletion MAINT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ go get -v gopkg.in/src-d/go-license-detector.v2/..
go mod vendor
find . -name 'LICENSE*' -exec dirname {} \; | xargs license-detector
```

2 changes: 1 addition & 1 deletion datastore/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// TODO: Once https://github.com/patrickmn/go-cache/pull/75
// is merged, go back to importing the main go-cache repo.
cache "github.com/ekinanp/go-cache"
"github.com/hashicorp/vault/helper/locksutil"
"github.com/hashicorp/vault/sdk/helper/locksutil"
log "github.com/sirupsen/logrus"
)

Expand Down
7 changes: 4 additions & 3 deletions fuse/dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package fuse
import (
"context"
"os"
"syscall"

"bazil.org/fuse"
"bazil.org/fuse/fs"
Expand Down Expand Up @@ -38,7 +39,7 @@ func (d *dir) children(ctx context.Context) (*plugin.EntryMap, error) {
return plugin.ListWithAnalytics(ctx, updatedEntry.(plugin.Parent))
}

return nil, fuse.ENOENT
return nil, syscall.ENOENT
}

// Lookup searches a directory for children.
Expand All @@ -50,14 +51,14 @@ func (d *dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.Lo
entries, err := d.children(ctx)
if err != nil {
activity.Warnf(ctx, "FUSE: Find %v in %v errored: %v", req.Name, d, err)
return nil, fuse.ENOENT
return nil, syscall.ENOENT
}

cname := req.Name
entry, ok := entries.Load(cname)
if !ok {
log.Debugf("FUSE: %v not found in %v", req.Name, d)
return nil, fuse.ENOENT
return nil, syscall.ENOENT
}

if plugin.ListAction().IsSupportedOn(entry) {
Expand Down
17 changes: 9 additions & 8 deletions fuse/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io"
"os"
"sync"
"syscall"

"bazil.org/fuse"
"bazil.org/fuse/fs"
Expand Down Expand Up @@ -142,19 +143,19 @@ func (f *file) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenR
switch {
case req.Flags.IsReadOnly() && !readable:
activity.Warnf(ctx, "FUSE: Open read-only unsupported on %v", f)
return nil, fuse.ENOTSUP
return nil, syscall.ENOTSUP
case req.Flags.IsWriteOnly() && !writable:
activity.Warnf(ctx, "FUSE: Open write-only unsupported on %v", f)
return nil, fuse.ENOTSUP
return nil, syscall.ENOTSUP
case req.Flags.IsReadWrite() && (!readable || !writable):
activity.Warnf(ctx, "FUSE: Open read-write unsupported on %v", f)
return nil, fuse.ENOTSUP
return nil, syscall.ENOTSUP
}

if !f.isFileLikeEntry() && req.Flags.IsReadWrite() {
// Error ReadWrite on non-file-like entries because it probably won't work well.
activity.Warnf(ctx, "FUSE: Open Read/Write is not supported on non-file-like entry %v", f)
return nil, fuse.ENOTSUP
return nil, syscall.ENOTSUP
}

if !f.isFileLikeEntry() {
Expand Down Expand Up @@ -277,7 +278,7 @@ func (f *file) load(ctx context.Context, start, end int64) ([]byte, error) {

if !plugin.ReadAction().IsSupportedOn(f.entry) {
activity.Warnf(ctx, "FUSE: Non-contiguous writes (at %v) unsupported on %v", start, f)
return nil, fuse.ENOTSUP
return nil, syscall.ENOTSUP
}

return plugin.Read(ctx, f.entry, end-start, start)
Expand Down Expand Up @@ -345,7 +346,7 @@ func (f *file) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse
if !req.Valid.Handle() {
// No guarantee we'll ever write the change. If this is ever necessary, we could update it
// to immediately do a plugin.Write.
return fuse.ENOTSUP
return syscall.ENOTSUP
}

// Ensure handle is in list of writers because we need to operate on a local copy of the data,
Expand All @@ -370,7 +371,7 @@ func (f *file) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse
return nil
}

// Needs to be defined or vim gets an fuse.EIO error on Fsync.
// Needs to be defined or vim gets an EIO error on Fsync.
var _ = fs.NodeFsyncer(&file{})

func (f *file) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
Expand All @@ -379,5 +380,5 @@ func (f *file) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
// for reading, we could potentially invalidate the Wash cache and re-request data from the
// plugin, but in most cases that doesn't seem to be necessary.
activity.Record(ctx, "FUSE: Fsync %v: %+v", f, *req)
return fuse.ENOSYS
return syscall.ENOSYS
}
136 changes: 61 additions & 75 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,110 +1,96 @@
module github.com/puppetlabs/wash

// Ensures we get the correct client version, tied to v19.03.2.
// Ensures we get the correct client version, tied to v19.03.8.
// docker/docker stopped tagging in 2017. The engine code we care about appears to be maintained at
// docker/engine, but all of that code still refers to other dependencies within itself via
// docker/docker. So we rewrite docker/docker => docker/engine so that the correct version is used.
replace github.com/docker/docker => github.com/docker/engine v1.4.2-0.20190822205725-ed20165a37b4
replace github.com/docker/docker => github.com/docker/engine v1.4.2-0.20200309214505-aa6a9891b09c

// Version considerations:
// - k8s.io/client-go reports "latest" as v11.0.0. Ignore that, it follows Kubernetes versioning.
// - googleapis/gnostic 0.4.0 changed case of OpenAPIv2, making it incompatible with client-go. Stick to 0.3.x.

require (
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
cloud.google.com/go v0.46.3
cloud.google.com/go/firestore v1.1.0
cloud.google.com/go/pubsub v1.0.1
cloud.google.com/go/storage v1.0.0
bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc
cloud.google.com/go v0.55.0
cloud.google.com/go/firestore v1.2.0
cloud.google.com/go/pubsub v1.3.1
cloud.google.com/go/storage v1.6.0
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Benchkram/errz v0.0.0-20180520163740-571a80a661f2
github.com/InVisionApp/tabular v0.3.0
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 // indirect
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 // indirect
github.com/araddon/dateparse v0.0.0-20190329160016-74dc0e29b01f
github.com/avast/retry-go v2.4.1+incompatible
github.com/aws/aws-sdk-go v1.25.0
github.com/araddon/dateparse v0.0.0-20190622164848-0fb0a474d195
github.com/avast/retry-go v2.6.0+incompatible
github.com/aws/aws-sdk-go v1.30.1
github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 // indirect
github.com/containerd/containerd v1.3.3 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v0.0.0-00010101000000-000000000000
github.com/docker/docker v1.13.1
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.3.3 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
github.com/dustin/go-humanize v1.0.0
github.com/ekinanp/go-cache v2.1.0+incompatible
github.com/ekinanp/jsonschema v0.0.0-20190624212413-cd4dbe12fbae
github.com/elazarl/goproxy v0.0.0-20181111060418-2ce16c963a8a // indirect
github.com/elazarl/goproxy v0.0.0-20200315184450-1f3cb6622dad // indirect
github.com/emirpasic/gods v1.12.0
github.com/fatih/color v1.7.0
github.com/gammazero/workerpool v0.0.0-20190608213748-0ed5e40ec55e
github.com/fatih/color v1.9.0
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/gammazero/workerpool v0.0.0-20200311205957-7b00833861c6
github.com/getlantern/deepcopy v0.0.0-20160317154340-7f45deb8130a
github.com/ghodss/yaml v1.0.0
github.com/gliderlabs/ssh v0.2.2
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/gliderlabs/ssh v0.3.0
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/go-openapi/strfmt v0.19.3 // indirect
github.com/go-openapi/errors v0.19.4 // indirect
github.com/go-openapi/strfmt v0.19.5 // indirect
github.com/gobwas/glob v0.2.3
github.com/gogo/protobuf v1.2.1 // indirect
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang/protobuf v1.3.2
github.com/golang/protobuf v1.3.5
github.com/google/uuid v1.1.1
github.com/googleapis/gnostic v0.2.2 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/mux v1.6.2
github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f // indirect
github.com/hashicorp/vault v1.0.3
github.com/googleapis/gnostic v0.3.1 // indirect
github.com/gorilla/mux v1.7.4
github.com/hashicorp/vault/sdk v0.1.14-0.20200305172021-03a3749f220d
github.com/hpcloud/tail v1.0.0
github.com/imdario/mergo v0.3.7 // indirect
github.com/jedib0t/go-pretty v4.2.1+incompatible
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a
github.com/json-iterator/go v1.1.7 // indirect
github.com/imdario/mergo v0.3.9 // indirect
github.com/jedib0t/go-pretty v4.3.0+incompatible
github.com/json-iterator/go v1.1.9 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/kevinburke/ssh_config v0.0.0-20190724205821-6cfae18c12b8
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515
github.com/magiconair/properties v1.8.1 // indirect
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-isatty v0.0.9
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c // indirect
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/mattn/go-colorable v0.1.6 // indirect
github.com/mattn/go-isatty v0.0.12
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.8.1
github.com/shirou/gopsutil v2.18.12+incompatible
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
github.com/shopspring/decimal v0.0.0-20200105231215-408a2507e114
github.com/simplereach/timeutils v1.2.0 // indirect
github.com/sirupsen/logrus v1.4.2
github.com/smartystreets/goconvey v0.0.0-20190306220146-200a235640ff // indirect
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.3.2
github.com/stretchr/testify v1.3.0
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.1.0
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca
go.mongodb.org/mongo-driver v1.0.4 // indirect
go.opencensus.io v0.22.1 // indirect
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/sys v0.0.0-20191210023423-ac6580df4449
golang.org/x/tools v0.0.0-20200121192408-9375b12bd86f // indirect
google.golang.org/api v0.13.0
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a
gopkg.in/go-ini/ini.v1 v1.42.0
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.42.0 // indirect
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect
gopkg.in/yaml.v2 v2.2.2
github.com/pkg/errors v0.9.1
github.com/shirou/gopsutil v2.20.2+incompatible
github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc
github.com/sirupsen/logrus v1.5.0
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v0.0.7
github.com/spf13/viper v1.6.2
github.com/stretchr/testify v1.5.1
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonschema v1.2.0
github.com/xlab/treeprint v1.0.0
go.mongodb.org/mongo-driver v1.3.1 // indirect
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d
google.golang.org/api v0.20.0
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940
gopkg.in/go-ini/ini.v1 v1.55.0
gopkg.in/yaml.v2 v2.2.8
gotest.tools v2.2.0+incompatible // indirect
k8s.io/api v0.0.0-20190222213804-5cb15d344471
k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628
k8s.io/client-go v10.0.0+incompatible
k8s.io/klog v0.1.0 // indirect
sigs.k8s.io/yaml v1.1.0 // indirect
k8s.io/api v0.18.0
k8s.io/apimachinery v0.18.0
k8s.io/client-go v0.18.0
)

go 1.13
Loading

0 comments on commit e052e1b

Please sign in to comment.