-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Bump library-go to latest version #4198
Conversation
Current version adds a dependency for bitbucket.org/ww/goautoneg@v0.0.0-20120707110453-75cd24fc2f2c which is an unstable path and is often not available. This dependency was removed from library-go a while back
Hi @ahmedwaleedmalik. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I think even with this change you will still run into the bitbucket.org issue when it comes to machine-api-operator:
|
Yeah, you're going to need something like this done to the go.mod file:
(Before the last line, add in an extra entry for the library-go module) |
Yeah we can simply pin it to a specific version as well by adding this in go.mod:
But I am thinking of updating this module in |
It was already updated in
github.com/googleapis/gnostic/OpenAPIv2 doesn't exist anymore and should be replaced with a valid version now like Should I update that part in my PR as well ? Also, do you guys run |
@ahmedwaleedmalik - no, I simply clone the installer repo, checkout the 4.5 branch (as that's what's important to me right now), and make the following changes-
and
I can then build the binary I need. |
Yeah that is already done in this PR. So, it should be good to go imo |
This does not resolve the issue for me (in the release-4.5 branch at least). I can resolve the issue with the following workaround: [brad@gca-dev-00-builder openshift-installer]$ git diff go.mod
diff --git a/go.mod b/go.mod
index aadf08c3f..19108f4b2 100644
--- a/go.mod
+++ b/go.mod
@@ -146,4 +146,5 @@ replace (
sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20200120114645-8a9592f1f87b // Pin OpenShift fork
sigs.k8s.io/cluster-api-provider-openstack => github.com/openshift/cluster-api-provider-openstack v0.0.0-20200526112135-319a35b2e38e // Pin OpenShift fork
sigs.k8s.io/controller-tools => github.com/abhinavdahiya/controller-tools v0.3.1-0.20200430222905-6fdf2d5fc069 // Using fork for sigs.k8s.io/controller-tools#427
+ github.com/openshift/library-go => github.com/openshift/library-go v0.0.0-20200924151131-575c4875cdbe //bgd
)
[brad@gca-dev-00-builder openshift-installer]$ go mod tidy
warning: ignoring symlink /home/brad/okd/openshift-installer/pkg/asset/store/data
[brad@gca-dev-00-builder openshift-installer]$ go mod vendor
warning: ignoring symlink /home/brad/okd/openshift-installer/pkg/asset/store/data
[brad@gca-dev-00-builder openshift-installer]$ git status
Refresh index: 100% (12906/12906), done.
On branch release-4.5
Your branch is up to date with 'origin/release-4.5'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: go.mod
modified: go.sum
modified: vendor/github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers/status.go
modified: vendor/golang.org/x/net/http2/transport.go
modified: vendor/golang.org/x/sys/unix/errors_freebsd_386.go
modified: vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
modified: vendor/golang.org/x/sys/unix/mkall.sh
modified: vendor/golang.org/x/sys/unix/mkerrors.sh
modified: vendor/golang.org/x/sys/unix/syscall_freebsd.go
modified: vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
modified: vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
modified: vendor/golang.org/x/sys/unix/syscall_linux.go
modified: vendor/golang.org/x/sys/unix/syscall_unix.go
modified: vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
modified: vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
modified: vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
modified: vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
modified: vendor/golang.org/x/sys/unix/zerrors_linux.go
modified: vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
modified: vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
modified: vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
modified: vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
modified: vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
modified: vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
modified: vendor/golang.org/x/sys/unix/ztypes_linux.go
modified: vendor/modules.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
vendor/golang.org/x/sys/unix/syscall_illumos.go
vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
no changes added to commit (use "git add" and/or "git commit -a")
[brad@gca-dev-00-builder openshift-installer]$ git diff go.mod
diff --git a/go.mod b/go.mod
index aadf08c3f..c8730125c 100644
--- a/go.mod
+++ b/go.mod
@@ -48,7 +48,7 @@ require (
github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 // indirect
github.com/openshift-metal3/terraform-provider-ironic v0.2.1
github.com/openshift/api v3.9.1-0.20191111211345-a27ff30ebf09+incompatible
- github.com/openshift/client-go v0.0.0-20200320150128-a906f3d8e723
+ github.com/openshift/client-go v0.0.0-20200521150516-05eb9880269c
github.com/openshift/cloud-credential-operator v0.0.0-20200316201045-d10080b52c9e
github.com/openshift/cluster-api v0.0.0-20191129101638-b09907ac6668
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20200120152131-1b09fd9e7156
@@ -85,14 +85,14 @@ require (
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073
golang.org/x/lint v0.0.0-20200302205851-738671d3881b
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
- golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527
+ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd
google.golang.org/api v0.14.0
gopkg.in/AlecAivazis/survey.v1 v1.8.9-0.20200217094205-6773bdf39b7f
gopkg.in/ini.v1 v1.51.0
gopkg.in/yaml.v2 v2.2.8
- k8s.io/api v0.18.2
- k8s.io/apiextensions-apiserver v0.18.2
- k8s.io/apimachinery v0.18.2
+ k8s.io/api v0.18.3
+ k8s.io/apiextensions-apiserver v0.18.3
+ k8s.io/apimachinery v0.18.3
k8s.io/client-go v12.0.0+incompatible
k8s.io/klog v1.0.0
k8s.io/utils v0.0.0-20200327001022-6496210b90e8
@@ -114,6 +114,7 @@ replace (
github.com/metal3-io/cluster-api-provider-baremetal => github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d // Pin OpenShift fork
github.com/openshift/api => github.com/openshift/api v0.0.0-20200413201024-c6e8c9b6eb9a // Pin API
github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20200116152001-92a2713fa240 // Pin client-go
+ github.com/openshift/library-go => github.com/openshift/library-go v0.0.0-20200924151131-575c4875cdbe //bgd
github.com/openshift/machine-config-operator => github.com/openshift/machine-config-operator v0.0.1-0.20200130220348-e5685c0cf530 // Pin MCO so it doesn't get downgraded
github.com/terraform-providers/terraform-provider-aws => github.com/openshift/terraform-provider-aws v1.60.1-0.20200630224953-76d1fb4e5699 // Pin to openshift fork with tag v2.67.0-openshift
github.com/terraform-providers/terraform-provider-azurerm => github.com/openshift/terraform-provider-azurerm v1.40.1-0.20200707062554-97ea089cc12a // release-2.17.0 branch
[brad@gca-dev-00-builder openshift-installer]$ hack/build.sh
+ minimum_go_version=1.13
++ go version
++ cut -d ' ' -f 3
+ current_go_version=go1.15.2
++ version 1.15.2
++ IFS=.
++ printf '%03d%03d%03d\n' 1 15 2
++ unset IFS
++ version 1.13
++ IFS=.
++ printf '%03d%03d%03d\n' 1 13
++ unset IFS
+ '[' 001015002 -lt 001013000 ']'
+ MODE=release
++ git rev-parse --verify 'HEAD^{commit}'
+ GIT_COMMIT=9893a482f310ee72089872f1a4caea3dbec34f28
++ git describe --always --abbrev=40 --dirty
+ GIT_TAG=unreleased-master-3176-g9893a482f310ee72089872f1a4caea3dbec34f28-dirty
+ GOFLAGS=-mod=vendor
+ LDFLAGS=' -X github.com/openshift/installer/pkg/version.Raw=unreleased-master-3176-g9893a482f310ee72089872f1a4caea3dbec34f28-dirty -X github.com/openshift/installer/pkg/version.Commit=9893a482f310ee72089872f1a4caea3dbec34f28'
+ TAGS=
+ OUTPUT=bin/openshift-install
+ export CGO_ENABLED=0
+ CGO_ENABLED=0
+ case "${MODE}" in
+ LDFLAGS=' -X github.com/openshift/installer/pkg/version.Raw=unreleased-master-3176-g9893a482f310ee72089872f1a4caea3dbec34f28-dirty -X github.com/openshift/installer/pkg/version.Commit=9893a482f310ee72089872f1a4caea3dbec34f28 -s -w'
+ TAGS=' release'
+ test '' '!=' y
+ go generate ./data
writing assets_vfsdata.go
+ echo ' release'
+ grep -q libvirt
+ go build -mod=vendor -ldflags ' -X github.com/openshift/installer/pkg/version.Raw=unreleased-master-3176-g9893a482f310ee72089872f1a4caea3dbec34f28-dirty -X github.com/openshift/installer/pkg/version.Commit=9893a482f310ee72089872f1a4caea3dbec34f28 -s -w' -tags ' release' -o bin/openshift-install ./cmd/openshift-install
[brad@gca-dev-00-builder openshift-installer]$ |
@bdurrow I was unable to re-produce your issue with the latest master branch. For the current issue just pinning |
I think #4266 should have bumped the master to latest version of library-go that this should be fixed now. |
@abhinavdahiya: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Current version adds a dependency for
bitbucket.org/ww/goautoneg@v0.0.0-20120707110453-75cd24fc2f2c
which is an unstable path and is often not available. This dependency was removed from library-go a while back in this commit.This fixes #4162