OCPCLOUD-2010: Re-vendor api and library-go for external platform support#736
Conversation
|
@adriengentil: This pull request references OCPCLOUD-2010 which is a valid jira issue. DetailsIn 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. |
|
Skipping CI for Draft Pull Request. |
|
/test ? |
|
@adriengentil: The following commands are available to trigger required jobs:
Use DetailsIn 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. |
|
/test unit |
9d41cee to
9256617
Compare
9256617 to
6e16de5
Compare
elmiko
left a comment
There was a problem hiding this comment.
lgtm, just waiting on the upstream PRs so we can revendor
6e16de5 to
0016468
Compare
elmiko
left a comment
There was a problem hiding this comment.
just a question, otherwise lgtm
go.mod
Outdated
| sigs.k8s.io/yaml v1.3.0 // indirect | ||
| ) | ||
|
|
||
| replace vbom.ml/util => github.com/fvbommel/util v0.0.0-20180919145318-efcd4e0f9787 |
There was a problem hiding this comment.
what's the story with this replacement?
There was a problem hiding this comment.
Without it we get:
$ go mod tidy
go: downloading vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787
github.com/openshift/cluster-kube-controller-manager-operator/cmd/cluster-kube-controller-manager-operator imports
github.com/openshift/library-go/pkg/operator/staticpod/prune tested by
github.com/openshift/library-go/pkg/operator/staticpod/prune.test imports
vbom.ml/util/sortorder: unrecognized import path "vbom.ml/util": https fetch: Get "https://vbom.ml/util?go-get=1": dial tcp: lookup vbom.ml: no such host
This library is an dependency of go-library.
It looks like this library was moved to github some time ago, and I saw this replacement in few Openshift components.
I guess the vendoring hid the issue up until now?
There was a problem hiding this comment.
yeah, i guess so, thanks for the explanation!
There was a problem hiding this comment.
Should not it be pulled from the library-go go.mod file automatically? The replace line has been in the go.mod file for at least a year. What has changed we need to duplicate it in the KCM code from now on?
There was a problem hiding this comment.
Running go mod tidy locally just changing api/library-go to release-4.14 branch works without the need to set the replace.
There was a problem hiding this comment.
same it works for me with:
podman run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp golang:1.20.4 sh -c "go mod tidy && go mod vendor && go mod verify"
but the one I have on my system (fedora) keeps failing 🤔
edit: go clean -modcache did not help
There was a problem hiding this comment.
I can reproduce the failure with the fedora image:
podman run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp fedora sh -c "dnf install -y golang && go mod tidy && go mod vendor && go mod verify"
There was a problem hiding this comment.
GOPROXY is off by default on fedora, the following works:
GOPROXY=https://proxy.golang.org go mod tidy
Do you think we should keep the replace or not? because others will face the same issue I guess
There was a problem hiding this comment.
Let's drop the replace for now. In case it will start causing trouble it can be always re-introduced. If the CI does not mind the replace is not needed.
|
/lgtm |
…port Revendor openshift/api and openshift/library-go in order to support the external platform type. library-go PR: openshift/library-go#1496 API PR: openshift/api#1434
0016468 to
77fb2dd
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adriengentil, elmiko, ingvagabund The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@adriengentil: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
Revendor openshift/api and openshift/library-go in order to support the
external platform type.
library-go PR: openshift/library-go#1496
API PR: openshift/api#1434