purpleidea / mgmt

Next generation distributed, event-driven, parallel config management!
https://purpleidea.com/tags/mgmtconfig/
GNU General Public License v3.0
3.47k stars 308 forks source link

mod: Fix two broken libraries #757

Closed frebib closed 3 months ago

frebib commented 3 months ago

Follow-on from #755

See commit messages for explanations of each fix

purpleidea commented 3 months ago

I'm not in principle against merging these if they are legitimate fixes that we need, however without them things are working in CI, so what's the discrepancy? Is there a bug in how CI runs? Is there a bug in your environment?

The hashicorp patch should get fixed automatically in the future... So it just causes warnings for now, which is not AIUI breaking anything...

purpleidea commented 3 months ago
[james@computer2 ~]$ cd tmp/
[james@computer2 tmp]$ git clone --recursive https://github.com/purpleidea/mgmt 
Cloning into 'mgmt'...
remote: Enumerating objects: 19804, done.
remote: Counting objects: 100% (1896/1896), done.
remote: Compressing objects: 100% (699/699), done.
remote: Total 19804 (delta 1137), reused 1810 (delta 1112), pack-reused 17908
Receiving objects: 100% (19804/19804), 7.67 MiB | 3.63 MiB/s, done.
Resolving deltas: 100% (13762/13762), done.
[james@computer2 tmp]$ cd mgmt/
[james@computer2 mgmt]$ go version
go version go1.21.9 linux/amd64
[james@computer2 mgmt]$ go clean -modcache
[james@computer2 mgmt]$ make
go: downloading go.etcd.io/etcd/server/v3 v3.5.13
go: downloading github.com/alexflint/go-arg v1.4.3
go: downloading github.com/spf13/afero v1.11.0
go: downloading github.com/go-git/go-git/v5 v5.12.0
go: downloading github.com/google/uuid v1.6.0
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/pkg/errors v0.9.1
go: downloading golang.org/x/time v0.5.0
go: downloading github.com/hashicorp/hil v0.0.0-20231024160542-43d11d37940c
go: downloading github.com/godbus/dbus/v5 v5.1.0
go: downloading github.com/vishvananda/netlink v1.2.1-beta.2
go: downloading go.etcd.io/etcd/client/v3 v3.5.13
go: downloading go.etcd.io/etcd/client/pkg/v3 v3.5.13
go: downloading go.etcd.io/etcd/api/v3 v3.5.13
go: downloading github.com/alexflint/go-scalar v1.2.0
go: downloading github.com/yalue/merged_fs v1.3.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading golang.org/x/text v0.14.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading dario.cat/mergo v1.0.0
go: downloading github.com/ProtonMail/go-crypto v1.0.0
go: downloading github.com/go-git/go-billy/v5 v5.5.0
go: downloading github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3
go: downloading github.com/aws/aws-sdk-go v1.51.30
go: downloading github.com/coredhcp/coredhcp v0.0.0-20240314075632-dfd0594edf16
go: downloading github.com/coreos/go-systemd/v22 v22.5.0
go: downloading github.com/cyphar/filepath-securejoin v0.2.4
go: downloading github.com/deniswernert/go-fstab v0.0.0-20141204152952-eb4090f26517
go: downloading github.com/docker/docker v26.1.0+incompatible
go: downloading github.com/docker/go-connections v0.5.0
go: downloading github.com/google/nftables v0.2.0
go: downloading github.com/hashicorp/consul/api v1.28.2
go: downloading github.com/hetznercloud/hcloud-go v1.54.1
go: downloading github.com/insomniacslk/dhcp v0.0.0-20221001123530-5308ebe5334c
go: downloading github.com/libvirt/libvirt-go v7.4.0+incompatible
go: downloading github.com/libvirt/libvirt-go-xml v7.4.0+incompatible
go: downloading github.com/pin/tftp/v3 v3.1.0
go: downloading go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
go: downloading golang.org/x/sys v0.19.0
go: downloading honnef.co/go/augeas v0.0.0-20161110001225-ca62e35ed6b8
go: downloading golang.org/x/crypto v0.22.0
go: downloading github.com/prometheus/client_golang v1.19.0
go: downloading github.com/vishvananda/netns v0.0.4
go: downloading go.uber.org/zap v1.27.0
go: downloading google.golang.org/grpc v1.63.2
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/golang/protobuf v1.5.4
go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be
go: downloading github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: downloading github.com/soheilhy/cmux v0.1.5
go: downloading github.com/spf13/cobra v1.8.0
go: downloading go.etcd.io/etcd/pkg/v3 v3.5.13
go: downloading golang.org/x/net v0.24.0
go: downloading sigs.k8s.io/yaml v1.4.0
go: downloading github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376
go: downloading github.com/pjbgf/sha1cd v0.3.0
go: downloading github.com/emirpasic/gods v1.18.1
go: downloading github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
go: downloading github.com/bits-and-blooms/bitset v1.13.0
go: downloading github.com/docker/go-units v0.5.0
go: downloading github.com/moby/docker-image-spec v1.3.1
go: downloading github.com/distribution/reference v0.6.0
go: downloading github.com/opencontainers/go-digest v1.0.0
go: downloading github.com/opencontainers/image-spec v1.1.0
go: downloading go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0
go: downloading go.opentelemetry.io/otel/trace v1.26.0
go: downloading google.golang.org/genproto v0.0.0-20240415180920-8c6c420018be
go: downloading github.com/mdlayher/netlink v1.7.2
go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
go: downloading github.com/hashicorp/go-hclog v1.6.3
go: downloading github.com/hashicorp/go-rootcerts v1.0.2
go: downloading github.com/hashicorp/serf v0.10.1
go: downloading golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f
go: downloading github.com/fsnotify/fsnotify v1.7.0
go: downloading github.com/grpc-ecosystem/grpc-gateway v1.16.0
go: downloading github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75
go: downloading go.etcd.io/bbolt v1.3.9
go: downloading go.opentelemetry.io/otel v1.26.0
go: downloading go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0
go: downloading go.opentelemetry.io/otel/sdk v1.26.0
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0
go: downloading go.uber.org/multierr v1.11.0
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.2.1
go: downloading github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701
go: downloading github.com/coreos/go-semver v0.3.1
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/client_model v0.6.1
go: downloading github.com/prometheus/common v0.53.0
go: downloading github.com/prometheus/procfs v0.14.0
go: downloading google.golang.org/protobuf v1.33.0
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be
go: downloading github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading go.etcd.io/etcd/raft/v3 v3.5.13
go: downloading github.com/jonboulle/clockwork v0.4.0
go: downloading go.etcd.io/etcd/client/v2 v2.305.13
go: downloading github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510
go: downloading github.com/cloudflare/circl v1.3.8
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading github.com/kevinburke/ssh_config v1.2.0
go: downloading github.com/skeema/knownhosts v1.2.2
go: downloading github.com/xanzy/ssh-agent v0.3.3
go: downloading github.com/chappjc/logrus-prefix v0.0.0-20180227015900-3a1d64819adb
go: downloading github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5
go: downloading github.com/sirupsen/logrus v1.9.3
go: downloading gopkg.in/warnings.v0 v0.1.2
go: downloading github.com/josharian/native v1.1.0
go: downloading github.com/mdlayher/socket v0.5.1
go: downloading github.com/fatih/color v1.16.0
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading github.com/jmespath/go-jmespath v0.4.0
go: downloading github.com/armon/go-metrics v0.4.1
go: downloading github.com/gorilla/websocket v1.5.1
go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
go: downloading github.com/felixge/httpsnoop v1.0.4
go: downloading go.opentelemetry.io/otel/metric v1.26.0
go: downloading go.opentelemetry.io/proto/otlp v1.2.0
go: downloading github.com/tredoe/osutil/v2 v2.0.0-rc.16
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/golang-jwt/jwt/v4 v4.5.0
go: downloading github.com/google/btree v1.1.2
go: downloading github.com/json-iterator/go v1.1.12
go: downloading github.com/modern-go/reflect2 v1.0.2
go: downloading github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
go: downloading golang.org/x/sync v0.7.0
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/hashicorp/go-immutable-radix v1.3.1
go: downloading github.com/go-logr/logr v1.4.1
go: downloading github.com/cenkalti/backoff/v4 v4.3.0
go: downloading github.com/go-logr/stdr v1.2.2
go: downloading github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading golang.org/x/term v0.19.0
go: downloading github.com/hashicorp/golang-lru v1.0.2
Generating: lexer...
Generating: parser...
Generating: interpolation...
Generating: type kind strings...
Generating: funcs...
go: downloading github.com/iancoleman/strcase v0.3.0
Building: mgmt, os/arch: linux-amd64, version: 0.0.26-18-g328360ee...
time env GOOS=linux GOARCH=amd64 go build -trimpath -ldflags=github.com/purpleidea/mgmt="-X main.program=mgmt -X main.version=0.0.26-18-g328360ee -s -w " -o build/mgmt-linux-amd64 

real    0m51.214s
user    3m42.220s
sys 0m24.315s
cp -a build/mgmt-linux-amd64 mgmt
[james@computer2 mgmt]$ git s
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
[james@computer2 mgmt]$ go get -u
go: downloading github.com/godbus/dbus v4.1.0+incompatible
go: downloading github.com/go-git/go-git v3.2.0+incompatible
go: downloading go.etcd.io/etcd v2.3.8+incompatible
go: downloading github.com/hashicorp/consul v1.18.1
go: downloading go4.org v0.0.0-20230225012048-214862532bf5
go: downloading github.com/go-git/go-billy v3.1.0+incompatible
go: downloading go.opentelemetry.io/contrib v1.26.0
go: downloading go.opentelemetry.io/contrib/instrumentation/net/http v0.11.0
go: downloading go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc v0.11.0
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading go.opentelemetry.io/otel/exporters/otlp v0.20.1
go: downloading github.com/inconshreveable/mousetrap v1.1.0
go: downloading github.com/google/go-cmp v0.6.0
go: downloading github.com/Microsoft/go-winio v0.6.2
go: downloading go.opentelemetry.io/proto v1.2.0
go: downloading github.com/tredoe/osutil v1.0.6
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/armon/go-metrics v0.5.3
go: downloading github.com/golang-jwt/jwt v3.2.2+incompatible
go: downloading github.com/cenkalti/backoff v2.2.1+incompatible
go: downloading github.com/pierrec/lz4 v2.6.1+incompatible
go: github.com/armon/go-metrics@v0.5.3: parsing go.mod:
    module declares its path as: github.com/hashicorp/go-metrics
            but was required as: github.com/armon/go-metrics
    trying github.com/armon/go-metrics@v0.5.2
go: github.com/armon/go-metrics@v0.5.2: parsing go.mod:
    module declares its path as: github.com/hashicorp/go-metrics
            but was required as: github.com/armon/go-metrics
    trying github.com/armon/go-metrics@v0.5.1
go: github.com/armon/go-metrics@v0.5.1: parsing go.mod:
    module declares its path as: github.com/hashicorp/go-metrics
            but was required as: github.com/armon/go-metrics
    trying github.com/armon/go-metrics@v0.5.0
go: github.com/armon/go-metrics@v0.5.0: parsing go.mod:
    module declares its path as: github.com/hashicorp/go-metrics
            but was required as: github.com/armon/go-metrics
    restoring github.com/armon/go-metrics@v0.4.1
[james@computer2 mgmt]$ echo $?
0
[james@computer2 mgmt]$ git add -p
No changes.
[james@computer2 mgmt]$ go mod tidy
go: downloading github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
go: downloading github.com/kylelemons/godebug v1.1.0
go: downloading golang.org/x/tools v0.20.0
go: downloading gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
go: downloading github.com/stretchr/testify v1.9.0
go: downloading github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399
go: downloading github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118
go: downloading github.com/mdlayher/raw v0.1.0
go: downloading github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714
go: downloading github.com/sanity-io/litter v1.5.5
go: downloading gotest.tools/v3 v3.0.3
go: downloading github.com/hashicorp/consul/sdk v0.16.0
go: downloading github.com/hashicorp/go-uuid v1.0.3
go: downloading go.uber.org/goleak v1.3.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/onsi/gomega v1.27.10
go: downloading github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a
go: downloading github.com/mdlayher/packet v1.1.2
go: downloading github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
go: downloading github.com/containerd/log v0.1.0
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0
go: downloading github.com/hashicorp/go-msgpack v0.5.5
go: downloading github.com/hashicorp/memberlist v0.5.0
go: downloading github.com/stretchr/objx v0.5.0
go: downloading github.com/hashicorp/go-version v1.2.1
go: downloading github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
go: downloading github.com/gliderlabs/ssh v0.3.7
go: downloading github.com/cockroachdb/datadriven v1.0.2
go: downloading github.com/jmespath/go-jmespath/internal/testify v1.5.1
go: downloading github.com/onsi/ginkgo v1.14.0
go: downloading github.com/x-cray/logrus-prefixed-formatter v0.5.2
go: downloading github.com/moby/term v0.0.0-20200312100748-672ec06f55cd
go: downloading github.com/morikuni/aec v1.0.0
go: downloading github.com/pascaldekloe/goe v0.1.0
go: downloading github.com/hashicorp/go-sockaddr v1.0.2
go: downloading github.com/miekg/dns v1.1.41
go: downloading github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529
go: downloading github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be
go: downloading github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78
go: downloading github.com/nxadm/tail v1.4.11
go: downloading github.com/kr/pretty v0.3.1
go: downloading github.com/rogpeppe/go-internal v1.11.0
go: downloading github.com/kr/text v0.2.0
go: downloading gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
[james@computer2 mgmt]$ git add -p
No changes.
[james@computer2 mgmt]$ 

So I'm not sure what I can do here for now. Things are green for me, things are green in CI. I'd love to merge these in the future if it shows they're needed. Closing for now, but happy to re-open when we have better reason to.