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

ci(smoketest): Pin promtool version in GHA #14954

Merged
merged 1 commit into from
Feb 12, 2021
Merged

Conversation

sayboras
Copy link
Member

@sayboras sayboras commented Feb 12, 2021

This commit is to pin the promtool in tools.go

Closes #14950

Signed-off-by: Tam Mach sayboras@yahoo.com

ci(smoketest): Pin promtool version in GHA

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 12, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.10.0 Feb 12, 2021
@sayboras sayboras added area/CI Continuous Integration testing issue or flake release-note/ci This PR makes changes to the CI. labels Feb 12, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Feb 12, 2021
@@ -134,7 +134,7 @@ jobs:
cilium_pod=$(kubectl -n kube-system get po -o name --field-selector=status.phase==Running -l 'k8s-app=cilium' -o jsonpath='{.items[0].metadata.name}' )
kubectl -n kube-system exec $cilium_pod -- sh -c "apt update && apt install curl -y"
kubectl -n kube-system exec $cilium_pod -- curl http://localhost:9090/metrics > metrics.prom
go get -u github.com/prometheus/prometheus/cmd/promtool
GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool@e4487274853c587717006eeda8804e597d120340 # v2.24.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayboras my suggestion was to import github.com/prometheus/prometheus/cmd/promtool directly so that we have all dependencies versions being stored in a single place.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, I think that Gilberto mentioned this in slack as well, having this in tools.go so that the version will be pinned in go.mod is fine to me.

I haven't tried it yet, but I have unpleasant experience with prometheus/client_golang packages as they are quite bulky and lead to a lot of conflicts/replace directive statements.

Copy link
Member Author

@sayboras sayboras Feb 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually it's not too bad, below is the diff for your info.

go.mod diff
diff --git a/go.mod b/go.mod
index da24d15b3..9c2d4af06 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,6 @@ require (
        github.com/Azure/go-autorest/autorest/adal v0.9.10
        github.com/Azure/go-autorest/autorest/azure/auth v0.5.6
        github.com/Azure/go-autorest/autorest/to v0.4.0
-       github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
        github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef
        github.com/aws/aws-sdk-go-v2 v1.1.0
        github.com/aws/aws-sdk-go-v2/config v1.0.0
@@ -26,9 +25,7 @@ require (
        github.com/containernetworking/cni v0.8.0
        github.com/containernetworking/plugins v0.9.0
        github.com/davecgh/go-spew v1.1.1
-       github.com/docker/distribution v2.7.1+incompatible // indirect
-       github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0
-       github.com/docker/go-connections v0.4.0 // indirect
+       github.com/docker/docker v20.10.1+incompatible
        github.com/docker/libnetwork v0.0.0-20190128195551-d8d4c8cf03d7
        github.com/fsnotify/fsnotify v1.4.10-0.20200417215612-7f4cf4dd2b52
        github.com/go-bindata/go-bindata/v3 v3.1.3
@@ -47,7 +44,7 @@ require (
        github.com/google/renameio v1.0.0
        github.com/google/uuid v1.2.0
        github.com/gorilla/mux v1.8.0
-       github.com/hashicorp/consul/api v1.3.0
+       github.com/hashicorp/consul/api v1.8.1
        github.com/hashicorp/go-immutable-radix v1.3.0
        github.com/hashicorp/golang-lru v0.5.4
        // must be bound to this old version not to break libnetwork
@@ -56,17 +53,14 @@ require (
        github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351
        github.com/kr/pretty v0.2.1
        github.com/mattn/go-shellwords v1.0.10
-       github.com/miekg/dns v1.0.14
-       github.com/morikuni/aec v1.0.0 // indirect
+       github.com/miekg/dns v1.1.35
        github.com/onsi/ginkgo v1.12.1
        github.com/onsi/gomega v1.10.5
-       github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
-       github.com/opencontainers/image-spec v1.0.1 // indirect
        github.com/optiopay/kafka v0.0.0-00010101000000-000000000000
        github.com/pmezard/go-difflib v1.0.0
        github.com/prometheus/client_golang v1.9.0
        github.com/prometheus/client_model v0.2.1-0.20200623203004-60555c9708c7
-       github.com/prometheus/prometheus v1.8.2-0.20210119214810-e4487274853c // indirect
+       github.com/prometheus/prometheus v1.8.2-0.20210119214810-e4487274853c
        github.com/russross/blackfriday/v2 v2.1.0
        github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa
        github.com/servak/go-fastping v0.0.0-20160802140958-5718d12e20a0
@@ -84,10 +78,10 @@ require (
        golang.org/x/net v0.0.0-20210119194325-5f4716e94777
        golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
        golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061
-       golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
+       golang.org/x/time v0.0.0-20201208040808-7e3f01d25324
        golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e
        google.golang.org/genproto v0.0.0-20210111234610-22ae2b108f89
-       google.golang.org/grpc v1.29.1
+       google.golang.org/grpc v1.33.2
        google.golang.org/protobuf v1.25.0
        gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
        gopkg.in/ini.v1 v1.62.0
@@ -117,6 +111,9 @@ replace (
        github.com/miekg/dns => github.com/cilium/dns v1.1.4-0.20190417235132-8e25ec9a0ff3
        github.com/optiopay/kafka => github.com/cilium/kafka v0.0.0-20180809090225-01ce283b732b
 
+       google.golang.org/grpc => google.golang.org/grpc v1.29.1
+
        // Using private fork of controller-tools. See commit msg for more context
        // as to why we are using a private fork.
        sigs.k8s.io/controller-tools => github.com/christarazi/controller-tools v0.3.1-0.20200911184030-7e668c1fb4c2

@sayboras sayboras force-pushed the tam/smoke-test branch 3 times, most recently from c33b09b to 139e5a1 Compare February 12, 2021 13:27
@sayboras sayboras marked this pull request as ready for review February 12, 2021 13:27
@sayboras sayboras requested review from a team as code owners February 12, 2021 13:27
Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayboras I think I take it back. I understimated how bad it would be to directly import prometheus into our code base 🤯 🤯 🤯

@sayboras
Copy link
Member Author

I think I take it back. I understimated how bad it would be to directly import prometheus into our code base exploding_head exploding_head exploding_head

haha no worry, all good, let me revert back the commit.

This commit is to pin the promtool, also avoid using -u in go get
command.

Closes cilium#14950

Signed-off-by: Tam Mach <sayboras@yahoo.com>
@pchaigno pchaigno removed their assignment Feb 12, 2021
Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@aanm aanm merged commit 3c630d8 into cilium:master Feb 12, 2021
1.10.0 automation moved this from In progress to Done Feb 12, 2021
@pchaigno
Copy link
Member

Same issue is happening on v1.9: https://github.com/cilium/cilium/pull/14961/checks?check_run_id=1888105879. We need to backport.

@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.9.5 Feb 12, 2021
@joestringer joestringer moved this from In progress to Done in 1.10.0 Feb 12, 2021
@sayboras sayboras deleted the tam/smoke-test branch February 12, 2021 23:10
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.9 in 1.9.5 Feb 15, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.9 in 1.9.5 Feb 15, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.9 to Backport done to v1.9 in 1.9.5 Feb 15, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.9 to Backport done to v1.9 in 1.9.5 Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake release-note/ci This PR makes changes to the CI.
Projects
No open projects
1.9.5
Backport done to v1.9
Development

Successfully merging this pull request may close these issues.

CI: Smoke test / conformance-test:
4 participants