Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

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.