Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #32

Merged

Conversation

chitoku-k
Copy link
Contributor

Hi, thanks for developing and maintaining bosh_exporter!

As the dependencies of bosh_exporter have become too old for now, any further maintenance becomes somewhat harder. This PR tries to bump them as latest as possible to address that. Apart from that, I am trying to add some features to help service discovery better work with certain environments by exposing their CIDs in the future time :)

@psycofdj
Copy link
Contributor

any comment on this @benjaminguttmann-avtq ?

@benjaminguttmann-avtq
Copy link
Contributor

@chitoku-k like last time, would appreciate to maybe have a dedicated PR for the README as it is not related to the dependency update, but you can leave it like that :D Thank you for doing the work, I will test the same and if successful approve it

@chitoku-k chitoku-k force-pushed the update-dependencies branch 2 times, most recently from 44f502f to 603f30e Compare February 25, 2022 09:04
@chitoku-k
Copy link
Contributor Author

@benjaminguttmann-avtq Sorry about that. I've just moved them to #33.

@benjaminguttmann-avtq
Copy link
Contributor

Hi @chitoku-k,

sorry I was very busy in the last months :-/ Finally having time to give this one a try. I guess you tried to build a binary out of your branch, right? I just tried to 'go get' it and get the following result:

src/github.com/chitoku-k/bosh_exporter/bosh_exporter.go:297:51: cannot use boshClient (type "github.com/chitoku-k/bosh_exporter/vendor/github.com/cloudfoundry/bosh-cli/director".Director) as type "github.com/bosh-prometheus/bosh_exporter/vendor/github.com/cloudfoundry/bosh-cli/director".Director in argument to filters.NewDeploymentsFilter:
	"github.com/chitoku-k/bosh_exporter/vendor/github.com/cloudfoundry/bosh-cli/director".Director does not implement "github.com/bosh-prometheus/bosh_exporter/vendor/github.com/cloudfoundry/bosh-cli/director".Director (wrong type for CancelTasks method)
		have CancelTasks("github.com/chitoku-k/bosh_exporter/vendor/github.com/cloudfoundry/bosh-cli/director".TasksFilter) error
		want CancelTasks("github.com/bosh-prometheus/bosh_exporter/vendor/github.com/cloudfoundry/bosh-cli/director".TasksFilter) error
src/github.com/chitoku-k/bosh_exporter/bosh_exporter.go:348:25: cannot use boshCollector (type *collectors.BoshCollector) as type "github.com/chitoku-k/bosh_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector in argument to "github.com/chitoku-k/bosh_exporter/vendor/github.com/prometheus/client_golang/prometheus".MustRegister:
	*collectors.BoshCollector does not implement "github.com/chitoku-k/bosh_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method)
		have Collect(chan<- "github.com/bosh-prometheus/bosh_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
		want Collect(chan<- "github.com/chitoku-k/bosh_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)

Sorry, not that familiar with go, so maybe it is just me doing something wrong here.

@chitoku-k
Copy link
Contributor Author

@benjaminguttmann-avtq
Thank you for looking into this again! I guess you'd just done go getting github.com/chitoku-k/bosh_exporter but that doesn't work as this PR includes an addition of go.mod whose module is set to github.com/bosh-prometheus/bosh_exporter that doesn't match the argument. Try manually cloning or fetching this set of changes and execute go build there so as not to go get github.com/chitoku-k/bosh_exporter.

@benjaminguttmann-avtq benjaminguttmann-avtq merged commit 18621cd into cloudfoundry:master Aug 11, 2022
@benjaminguttmann-avtq
Copy link
Contributor

@chitoku-k I merged it to make it easier for me to test the build with promu but it seems like I still get some error there. Maybe you can support me on this.

What I am trying to do is run promu crossbuild -c .promu.yml

When executing I receive the following:

>> building binaries
 >   bosh_exporter
go: inconsistent vendoring in /app:
	github.com/prometheus/client_golang@v1.13.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/prometheus/common@v0.37.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/Masterminds/semver@v1.5.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/alecthomas/units@v0.0.0-20211218093645-b94a6e3cc137: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/google/go-cmp@v0.5.8: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/google/go-github/v25@v25.1.3: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/google/go-querystring@v1.1.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/pkg/errors@v0.9.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/prometheus/procfs@v0.8.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/prometheus/promu@v0.13.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	go.uber.org/atomic@v1.9.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	golang.org/x/net@v0.0.0-20220809184613-07c6da5e1ced: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	golang.org/x/oauth2@v0.0.0-20220808172628-8227340efae7: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	golang.org/x/sys@v0.0.0-20220808155132-1c4a2a72c664: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	google.golang.org/appengine@v1.6.7: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	google.golang.org/protobuf@v1.28.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/alecthomas/units@v0.0.0-20190924025748-f65c72e2690d: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod
	github.com/prometheus/client_golang@v1.7.1: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod
	github.com/prometheus/common@v0.26.0: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod
	github.com/prometheus/procfs@v0.7.3: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod
	golang.org/x/net@v0.0.0-20220127200216-cd36cc0744dd: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod
	golang.org/x/sys@v0.0.0-20220209214540-3681064d5158: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod
	google.golang.org/protobuf@v1.27.1: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod

	To ignore the vendor directory, use -mod=readonly or -mod=mod.
	To sync the vendor directory, run:
		go mod vendor

@benjaminguttmann-avtq
Copy link
Contributor

Okay, after I adjusted the .promu config to use flag mod=mod instead of vendor I bypassed those issues.
Next issue is that the latest version of prometheus/common does not contain the log package anymore.

filters/deployments_filter.go:9:2: module github.com/prometheus/common@latest found (v0.37.0), but does not contain package github.com/prometheus/common/log

prometheus/common#306

So I guess that needs to get replaced everywhere >.<

@chitoku-k
Copy link
Contributor Author

What I found is that Makefile also needs to be modified. Opening PR...

@chitoku-k
Copy link
Contributor Author

Try #34!

@chitoku-k chitoku-k deleted the update-dependencies branch August 11, 2022 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants