kueue
kueue copied to clipboard
fix: Solving `make run` errors under Go vendor mode.
What type of PR is this?
kind cleanup
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
@alculquicondor
Does this PR introduce a user-facing change?
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.
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: village-way Once this PR has been reviewed and has the lgtm label, please assign alculquicondor for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Welcome @village-way!
It looks like this is your first PR to kubernetes-sigs/kueue 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-sigs/kueue has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Hi @village-way. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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.
Deploy Preview for kubernetes-sigs-kueue canceled.
| Name | Link |
|---|---|
| Latest commit | 9761017fe729669430b13436d8ded6944901b5f3 |
| Latest deploy log | https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/65e815cf7a76550008ed0fb7 |
/easycla
Do you have a specific use-case for this?
Depending on what you want to do, in my opinion , it's easier to just
installanddeploy
I just want to start the kueue main.go process and debug the code in the goland, so want to run that in make run with flags or in the goland Run/Debug configurations
Do you have a specific use-case for this? Depending on what you want to do, in my opinion , it's easier to just
installanddeployI just want to start the kueue main.go process and debug the code in the goland, so want to run that in
make runwith flags or in the goland Run/Debug configurations
I'm not sure why we should have the vendor if we use Goland.
Can you make sure you are using go v1.21 or newer and that you enable go modules support in golang? https://www.jetbrains.com/help/go/create-a-project-with-go-modules-integration.html#using-go-modules-in-your-project
You should not run go mod vendor
Can you make sure you are using go v1.21 or newer and that you enable go modules support in golang? https://www.jetbrains.com/help/go/create-a-project-with-go-modules-integration.html#using-go-modules-in-your-project
You should not run
go mod vendorthis is the go env
GO111MODULE='on'
GOARCH='amd64'
GOBIN='/Users/devine/go'
GOCACHE='/Users/devine/Library/Caches/go-build'
GOENV='/Users/devine/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/devine/go/pkg/mod'
GONOPROXY='gitlab.*.com'
GONOSUMDB='gitlab.*.com'
GOOS='darwin'
GOPATH='/Users/devine/go'
GOPRIVATE='gitlab.*.com'
GOPROXY='https://goproxy.cn,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.22.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/devine/GolandProjects/kueue/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/fm/sp8j2q9d5q55x1rdzlywfzs00000gp/T/go-build1822828399=/tmp/go-build -gno-record-gcc-switches -fno-common'
if not run go mod vendor everythings is ok, after run go mod vendor the make run this command, will occurs cannot find module providing package sigs.k8s.io/controller-tools/cmd/controller-gen: import lookup disabled by -mod=vendor (Go version in go.mod is at least 1.14 and vendor directory exists.) make: *** [controller-gen] Error 1 that's why i add the version for the controller-gen in the script dependencies. Only run go mod vendor, the goland can find the dependencies. The config of goland is
Do you have a specific use-case for this? Depending on what you want to do, in my opinion , it's easier to just
installanddeployI just want to start the kueue main.go process and debug the code in the goland, so want to run that in
make runwith flags or in the goland Run/Debug configurationsI'm not sure why we should have the vendor if we use Goland.
Every time GoLand is opened, it executes go list. However, this go list command fails, and it's unclear if this is the cause. Executing go mod vendor is just to allow GoLand to find dependencies without prompting that they can't be found.
Do you have a specific use-case for this? Depending on what you want to do, in my opinion , it's easier to just
installanddeployI just want to start the kueue main.go process and debug the code in the goland, so want to run that in
make runwith flags or in the goland Run/Debug configurationsI'm not sure why we should have the vendor if we use Goland.
Every time GoLand is opened, it executes go list. However, this go list command fails, and it's unclear if this is the cause. Executing go mod vendor is just to allow GoLand to find dependencies without prompting that they can't be found.
That problem could be fixed by https://github.com/kubernetes-sigs/kueue/issues/1345.
Do you have a specific use-case for this? Depending on what you want to do, in my opinion , it's easier to just
installanddeployI just want to start the kueue main.go process and debug the code in the goland, so want to run that in
make runwith flags or in the goland Run/Debug configurationsI'm not sure why we should have the vendor if we use Goland.
Every time GoLand is opened, it executes go list. However, this go list command fails, and it's unclear if this is the cause. Executing go mod vendor is just to allow GoLand to find dependencies without prompting that they can't be found.
That problem could be fixed by #1345.
Thank you very much, according to #1345 , this problem can be fixed and we don't need run go mod vendor, so why not add this lines to go.mod file ? @tenzen-y
replace (
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.3
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.28.3
k8s.io/kubectl => k8s.io/kubectl v0.28.3
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.28.3
)
Do you have a specific use-case for this? Depending on what you want to do, in my opinion , it's easier to just
installanddeployI just want to start the kueue main.go process and debug the code in the goland, so want to run that in
make runwith flags or in the goland Run/Debug configurationsI'm not sure why we should have the vendor if we use Goland.
Every time GoLand is opened, it executes go list. However, this go list command fails, and it's unclear if this is the cause. Executing go mod vendor is just to allow GoLand to find dependencies without prompting that they can't be found.
That problem could be fixed by #1345.
Thank you very much, according to #1345 , this problem can be fixed and we don't need run
go mod vendor, so why not add this lines to go.mod file ? @tenzen-yreplace ( k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.3 k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.28.3 k8s.io/kubectl => k8s.io/kubectl v0.28.3 k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.28.3 )
I don't think so since after #1345 is fixed, we don't need such imports. We're working on fixing it in the autoscaler repository.
Do you have a specific use-case for this? Depending on what you want to do, in my opinion , it's easier to just
installanddeployI just want to start the kueue main.go process and debug the code in the goland, so want to run that in
make runwith flags or in the goland Run/Debug configurationsI'm not sure why we should have the vendor if we use Goland.
Every time GoLand is opened, it executes go list. However, this go list command fails, and it's unclear if this is the cause. Executing go mod vendor is just to allow GoLand to find dependencies without prompting that they can't be found.
That problem could be fixed by #1345.
Thank you very much, according to #1345 , this problem can be fixed and we don't need run
go mod vendor, so why not add this lines to go.mod file ? @tenzen-yreplace ( k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.3 k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.28.3 k8s.io/kubectl => k8s.io/kubectl v0.28.3 k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.28.3 )I don't think so since after #1345 is fixed, we don't need such imports. We're working on fixing it in the autoscaler repository.
I saw the PR you mentioned at https://github.com/kubernetes/autoscaler/pull/6315. I'm not very familiar with the Go module dependencies, but I roughly understand that the issue arises because the clusterAutoscale is trying to reuse the code from Schedule without it being a separate Go module. However, I'm still quite confused about this area. Could you please help explain why this problem occurred? I'm looking forward to your reply. ♥
@tenzen-y do you think we are close to merging the split of cluster-autoscaler packages?
If it's taking too long, maybe it's worth introducing the replace for now?
do you think we are close to merging the split of cluster-autoscaler packages? If it's taking too long, maybe it's worth introducing the
replacefor now?
All tasks have already been done. I'm waiting for approval from @x13n (for CA approval) and @mwielgus (for autoscaler repository approval). Both approvals are necessary.
do you think we are close to merging the split of cluster-autoscaler packages? If it's taking too long, maybe it's worth introducing the
replacefor now?All tasks have already been done. I'm waiting for approval from @x13n (for CA approval) and @mwielgus (for autoscaler repository approval). Both approvals are necessary.
Or only approval from @mwielgus should be fine since @x13n already approved that PR.
Do you have a specific use-case for this? Depending on what you want to do, in my opinion , it's easier to just
installanddeployI just want to start the kueue main.go process and debug the code in the goland, so want to run that in
make runwith flags or in the goland Run/Debug configurationsI'm not sure why we should have the vendor if we use Goland.
Every time GoLand is opened, it executes go list. However, this go list command fails, and it's unclear if this is the cause. Executing go mod vendor is just to allow GoLand to find dependencies without prompting that they can't be found.
That problem could be fixed by #1345.
Thank you very much, according to #1345 , this problem can be fixed and we don't need run
go mod vendor, so why not add this lines to go.mod file ? @tenzen-yreplace ( k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.3 k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.28.3 k8s.io/kubectl => k8s.io/kubectl v0.28.3 k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.28.3 )I don't think so since after #1345 is fixed, we don't need such imports. We're working on fixing it in the autoscaler repository.
I saw the PR you mentioned at kubernetes/autoscaler#6315. I'm not very familiar with the Go module dependencies, but I roughly understand that the issue arises because the clusterAutoscale is trying to reuse the code from Schedule without it being a separate Go module. However, I'm still quite confused about this area. Could you please help explain why this problem occurred? I'm looking forward to your reply. ♥
k/k repository is not assumed to be used as a go module. This issue might be helpful for you to understand reasons: https://github.com/kubernetes/kubernetes/issues/79384
Do you have a specific use-case for this? Depending on what you want to do, in my opinion , it's easier to just
installanddeployI just want to start the kueue main.go process and debug the code in the goland, so want to run that in
make runwith flags or in the goland Run/Debug configurationsI'm not sure why we should have the vendor if we use Goland.
Every time GoLand is opened, it executes go list. However, this go list command fails, and it's unclear if this is the cause. Executing go mod vendor is just to allow GoLand to find dependencies without prompting that they can't be found.
That problem could be fixed by #1345.
Thank you very much, according to #1345 , this problem can be fixed and we don't need run
go mod vendor, so why not add this lines to go.mod file ? @tenzen-yreplace ( k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.3 k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.28.3 k8s.io/kubectl => k8s.io/kubectl v0.28.3 k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.28.3 )I don't think so since after #1345 is fixed, we don't need such imports. We're working on fixing it in the autoscaler repository.
I saw the PR you mentioned at kubernetes/autoscaler#6315. I'm not very familiar with the Go module dependencies, but I roughly understand that the issue arises because the clusterAutoscale is trying to reuse the code from Schedule without it being a separate Go module. However, I'm still quite confused about this area. Could you please help explain why this problem occurred? I'm looking forward to your reply. ♥
k/k repository is not assumed to be used as a go module. This issue might be helpful for you to understand reasons: kubernetes/kubernetes#79384
thanks, this pr can be closed as the related issue solved.
In favor of #1872 /close
@tenzen-y: Closed this PR.
In response to this:
In favor of #1872 /close
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.
