Skip to content

Commit 4648853

Browse files
authored
Merge pull request #327 from replicatedcom/laverya/sc-135986/supportbundle
update go deps
2 parents fb7ecbf + bebe99e commit 4648853

4 files changed

Lines changed: 447 additions & 523 deletions

File tree

e2e/analyze/analyze_test.go

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
package analyze_test
22

33
import (
4+
"archive/tar"
45
"bytes"
6+
"compress/gzip"
57
"fmt"
8+
"io"
69
"io/ioutil"
710
"os"
811
"path"
12+
"path/filepath"
913
"testing"
1014

1115
"github.com/kylelemons/godebug/pretty"
12-
"github.com/mholt/archiver"
1316
. "github.com/onsi/ginkgo"
1417
. "github.com/onsi/gomega"
1518
"github.com/pkg/errors"
@@ -139,25 +142,42 @@ func makeBundle(fs afero.Fs, src, dest string) (os.FileInfo, error) {
139142
err = func() error {
140143
defer f.Close()
141144

142-
cwd, err := os.Getwd()
143-
if err != nil {
144-
return err
145-
}
146-
if err := os.Chdir(src); err != nil {
147-
return err
148-
}
149-
defer os.Chdir(cwd)
150-
151-
var filePaths []string
152-
files, err := ioutil.ReadDir(src)
153-
if err != nil {
154-
return err
155-
}
156-
for _, info := range files {
157-
filePaths = append(filePaths, info.Name())
158-
}
159-
160-
return archiver.TarGz.Write(f, filePaths)
145+
gw := gzip.NewWriter(f)
146+
defer gw.Close()
147+
tw := tar.NewWriter(gw)
148+
defer tw.Close()
149+
150+
return filepath.Walk(src, func(filePath string, info os.FileInfo, err error) error {
151+
if err != nil {
152+
return err
153+
}
154+
rel, err := filepath.Rel(src, filePath)
155+
if err != nil {
156+
return err
157+
}
158+
if rel == "." {
159+
return nil
160+
}
161+
hdr, err := tar.FileInfoHeader(info, "")
162+
if err != nil {
163+
return err
164+
}
165+
hdr.Name = rel
166+
if err := tw.WriteHeader(hdr); err != nil {
167+
return err
168+
}
169+
if !info.IsDir() {
170+
ef, err := os.Open(filePath)
171+
if err != nil {
172+
return err
173+
}
174+
defer ef.Close()
175+
if _, err := io.Copy(tw, ef); err != nil {
176+
return err
177+
}
178+
}
179+
return nil
180+
})
161181
}()
162182
if err != nil {
163183
return nil, errors.Wrapf(err, "create archive from %s", src)

go.mod

Lines changed: 111 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,136 @@
11
module github.com/replicatedcom/support-bundle
22

3-
go 1.25
3+
go 1.25.8
44

55
require (
66
github.com/Masterminds/semver v1.4.2 // indirect
77
github.com/Masterminds/sprig v2.15.0+incompatible
88
github.com/alecthomas/jsonschema v0.0.0-00010101000000-000000000000
99
github.com/andrewchambers/go-jqpipe v0.0.0-20180509223707-2d54cef8cd94
1010
github.com/aokoli/goutils v1.0.1 // indirect
11-
github.com/aws/aws-sdk-go v1.19.11 // indirect
1211
github.com/bgentry/speakeasy v0.1.0 // indirect
1312
github.com/blang/semver v3.5.1+incompatible
14-
github.com/davecgh/go-spew v1.1.1
13+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
1514
github.com/divolgin/archiver v0.0.0-20161209225221-d039d69aa3bc
1615
github.com/docker/docker v0.0.0-20180522102801-da99009bbb11
17-
github.com/docker/go-connections v0.4.0
18-
github.com/docker/go-units v0.4.0
19-
github.com/dsnet/compress v0.0.0-20171208185109-cc9eb1d7ad76 // indirect
16+
github.com/docker/go-connections v0.6.0
17+
github.com/docker/go-units v0.5.0
2018
github.com/ghodss/yaml v1.0.0
21-
github.com/go-kit/kit v0.9.0
22-
github.com/go-stack/stack v1.8.0
19+
github.com/go-kit/kit v0.13.0
20+
github.com/go-stack/stack v1.8.1
2321
github.com/gobwas/glob v0.2.3
2422
github.com/golang/mock v1.6.0
25-
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
26-
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
27-
github.com/hashicorp/go-getter v1.2.0
23+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
24+
github.com/hashicorp/go-getter v1.8.5
2825
github.com/hashicorp/go-multierror v1.1.1
29-
github.com/huandu/xstrings v1.0.0 // indirect
30-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
31-
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 // indirect
32-
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348
33-
github.com/mholt/archiver v2.0.1-0.20180417220235-e4ef56d48eb0+incompatible
34-
github.com/mitchellh/cli v1.0.0
26+
github.com/huandu/xstrings v1.3.2 // indirect
27+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
28+
github.com/kylelemons/godebug v1.1.0
29+
github.com/mitchellh/cli v1.1.5
3530
github.com/mitchellh/go-homedir v1.1.0
36-
github.com/nwaples/rardecode v0.0.0-20171029023500-e06696f847ae // indirect
3731
github.com/onsi/ginkgo v1.16.5
38-
github.com/onsi/gomega v1.27.4
39-
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
32+
github.com/onsi/gomega v1.39.1
4033
github.com/pivotal-golang/archiver v0.0.0-20200129012029-d46e448f0c5d // indirect
4134
github.com/pkg/errors v0.9.1
4235
github.com/posener/complete v1.1.1 // indirect
43-
github.com/retracedhq/retraced-go v0.0.0-20230918111004-20688ab81037
36+
github.com/retracedhq/retraced-go v1.0.1
4437
github.com/satori/go.uuid v1.2.0
45-
github.com/spf13/afero v1.2.2
46-
github.com/spf13/cobra v1.1.3
47-
github.com/spf13/jwalterweatherman v1.0.0
38+
github.com/spf13/afero v1.15.0
39+
github.com/spf13/cobra v1.10.2
40+
github.com/spf13/jwalterweatherman v1.1.0
4841
github.com/spf13/viper v1.7.0
49-
github.com/stretchr/testify v1.8.1
50-
go.uber.org/dig v1.8.0
51-
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
52-
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
53-
golang.org/x/net v0.8.0
54-
golang.org/x/tools v0.7.0 // indirect
42+
github.com/stretchr/testify v1.11.1
43+
go.uber.org/dig v1.19.0
44+
golang.org/x/crypto v0.49.0
45+
golang.org/x/net v0.52.0
5546
gopkg.in/yaml.v2 v2.4.0
5647
k8s.io/api v0.27.4
5748
k8s.io/apimachinery v0.27.4
5849
k8s.io/client-go v0.27.4
5950
)
6051

52+
require sigs.k8s.io/yaml v1.3.0
53+
6154
require (
62-
cloud.google.com/go v0.65.0 // indirect
63-
cloud.google.com/go/storage v1.10.0 // indirect
64-
github.com/Microsoft/go-winio v0.5.1 // indirect
55+
cel.dev/expr v0.25.1 // indirect
56+
cloud.google.com/go v0.123.0 // indirect
57+
cloud.google.com/go/auth v0.18.1 // indirect
58+
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
59+
cloud.google.com/go/compute/metadata v0.9.0 // indirect
60+
cloud.google.com/go/iam v1.5.3 // indirect
61+
cloud.google.com/go/monitoring v1.24.3 // indirect
62+
cloud.google.com/go/storage v1.60.0 // indirect
63+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 // indirect
64+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.55.0 // indirect
65+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.55.0 // indirect
66+
github.com/Masterminds/goutils v1.1.1 // indirect
67+
github.com/Masterminds/semver/v3 v3.4.0 // indirect
68+
github.com/Masterminds/sprig/v3 v3.2.1 // indirect
69+
github.com/Microsoft/go-winio v0.6.2 // indirect
6570
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 // indirect
71+
github.com/aws/aws-sdk-go-v2 v1.41.1 // indirect
72+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.4 // indirect
73+
github.com/aws/aws-sdk-go-v2/config v1.32.9 // indirect
74+
github.com/aws/aws-sdk-go-v2/credentials v1.19.9 // indirect
75+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 // indirect
76+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 // indirect
77+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17 // indirect
78+
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
79+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.17 // indirect
80+
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4 // indirect
81+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.8 // indirect
82+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17 // indirect
83+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.17 // indirect
84+
github.com/aws/aws-sdk-go-v2/service/s3 v1.96.0 // indirect
85+
github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 // indirect
86+
github.com/aws/aws-sdk-go-v2/service/sso v1.30.10 // indirect
87+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.14 // indirect
88+
github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 // indirect
89+
github.com/aws/smithy-go v1.24.0 // indirect
6690
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
91+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
92+
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 // indirect
6793
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
6894
github.com/docker/distribution v2.8.1+incompatible // indirect
6995
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
70-
github.com/fatih/color v1.7.0 // indirect
96+
github.com/envoyproxy/go-control-plane/envoy v1.36.0 // indirect
97+
github.com/envoyproxy/protoc-gen-validate v1.3.0 // indirect
98+
github.com/fatih/color v1.18.0 // indirect
99+
github.com/felixge/httpsnoop v1.0.4 // indirect
71100
github.com/fsnotify/fsnotify v1.4.9 // indirect
72-
github.com/go-logfmt/logfmt v0.4.0 // indirect
73-
github.com/go-logr/logr v1.2.3 // indirect
101+
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
102+
github.com/go-kit/log v0.2.0 // indirect
103+
github.com/go-logfmt/logfmt v0.5.1 // indirect
104+
github.com/go-logr/logr v1.4.3 // indirect
105+
github.com/go-logr/stdr v1.2.2 // indirect
74106
github.com/go-openapi/jsonpointer v0.19.6 // indirect
75107
github.com/go-openapi/jsonreference v0.20.1 // indirect
76108
github.com/go-openapi/swag v0.22.3 // indirect
77109
github.com/gogo/protobuf v1.3.2 // indirect
78-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
79-
github.com/golang/protobuf v1.5.3 // indirect
110+
github.com/golang/protobuf v1.5.4 // indirect
80111
github.com/google/gnostic v0.5.7-v3refs // indirect
81-
github.com/google/go-cmp v0.5.9 // indirect
112+
github.com/google/go-cmp v0.7.0 // indirect
82113
github.com/google/gofuzz v1.2.0 // indirect
83-
github.com/google/uuid v1.3.0 // indirect
84-
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
114+
github.com/google/s2a-go v0.1.9 // indirect
115+
github.com/google/uuid v1.6.0 // indirect
116+
github.com/googleapis/enterprise-certificate-proxy v0.3.11 // indirect
117+
github.com/googleapis/gax-go/v2 v2.17.0 // indirect
85118
github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect
119+
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.70 // indirect
86120
github.com/hashicorp/errwrap v1.1.0 // indirect
87-
github.com/hashicorp/go-safetemp v1.0.0 // indirect
88-
github.com/hashicorp/go-version v1.1.0 // indirect
121+
github.com/hashicorp/go-version v1.8.0 // indirect
89122
github.com/hashicorp/hcl v1.0.0 // indirect
90123
github.com/imdario/mergo v0.3.12 // indirect
91-
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
92124
github.com/josharian/intern v1.0.0 // indirect
93125
github.com/json-iterator/go v1.1.12 // indirect
94-
github.com/jstemmer/go-junit-report v0.9.1 // indirect
126+
github.com/klauspost/compress v1.18.4 // indirect
95127
github.com/magiconair/properties v1.8.1 // indirect
96128
github.com/mailru/easyjson v0.7.7 // indirect
97-
github.com/mattn/go-colorable v0.0.9 // indirect
98-
github.com/mattn/go-isatty v0.0.4 // indirect
99-
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
100-
github.com/mitchellh/mapstructure v1.1.2 // indirect
129+
github.com/mattn/go-colorable v0.1.14 // indirect
130+
github.com/mattn/go-isatty v0.0.20 // indirect
131+
github.com/mitchellh/copystructure v1.0.0 // indirect
132+
github.com/mitchellh/mapstructure v1.5.0 // indirect
133+
github.com/mitchellh/reflectwalk v1.0.0 // indirect
101134
github.com/moby/spdystream v0.2.0 // indirect
102135
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
103136
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -106,23 +139,36 @@ require (
106139
github.com/opencontainers/go-digest v1.0.0 // indirect
107140
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
108141
github.com/pelletier/go-toml v1.9.3 // indirect
109-
github.com/pmezard/go-difflib v1.0.0 // indirect
110-
github.com/spf13/cast v1.3.0 // indirect
111-
github.com/spf13/pflag v1.0.5 // indirect
142+
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
143+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
144+
github.com/shopspring/decimal v1.2.0 // indirect
145+
github.com/spf13/cast v1.3.1 // indirect
146+
github.com/spf13/pflag v1.0.9 // indirect
147+
github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect
112148
github.com/subosito/gotenv v1.2.0 // indirect
113-
github.com/ulikunitz/xz v0.5.5 // indirect
114-
go.opencensus.io v0.23.0 // indirect
115-
golang.org/x/mod v0.9.0 // indirect
116-
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
117-
golang.org/x/sys v0.6.0 // indirect
118-
golang.org/x/term v0.6.0 // indirect
119-
golang.org/x/text v0.8.0 // indirect
120-
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
121-
google.golang.org/api v0.30.0 // indirect
122-
google.golang.org/appengine v1.6.7 // indirect
123-
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
124-
google.golang.org/grpc v1.43.0 // indirect
125-
google.golang.org/protobuf v1.30.0 // indirect
149+
github.com/ulikunitz/xz v0.5.15 // indirect
150+
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
151+
go.opentelemetry.io/contrib/detectors/gcp v1.39.0 // indirect
152+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
153+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
154+
go.opentelemetry.io/otel v1.40.0 // indirect
155+
go.opentelemetry.io/otel/metric v1.40.0 // indirect
156+
go.opentelemetry.io/otel/sdk v1.40.0 // indirect
157+
go.opentelemetry.io/otel/sdk/metric v1.40.0 // indirect
158+
go.opentelemetry.io/otel/trace v1.40.0 // indirect
159+
go.yaml.in/yaml/v3 v3.0.4 // indirect
160+
golang.org/x/oauth2 v0.36.0 // indirect
161+
golang.org/x/sync v0.20.0 // indirect
162+
golang.org/x/sys v0.42.0 // indirect
163+
golang.org/x/term v0.41.0 // indirect
164+
golang.org/x/text v0.35.0 // indirect
165+
golang.org/x/time v0.15.0 // indirect
166+
google.golang.org/api v0.267.0 // indirect
167+
google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 // indirect
168+
google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20 // indirect
169+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20 // indirect
170+
google.golang.org/grpc v1.79.3 // indirect
171+
google.golang.org/protobuf v1.36.11 // indirect
126172
gopkg.in/inf.v0 v0.9.1 // indirect
127173
gopkg.in/ini.v1 v1.51.0 // indirect
128174
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
@@ -133,7 +179,6 @@ require (
133179
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
134180
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
135181
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
136-
sigs.k8s.io/yaml v1.3.0 // indirect
137182
)
138183

139184
replace github.com/alecthomas/jsonschema => github.com/emosbaugh/jsonschema v0.0.0-20200130190411-0a8db23df698

0 commit comments

Comments
 (0)