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 cloud-provider-gcp to k8s v1.23 #305
Conversation
ddea78b
to
42ec38d
Compare
/test cloud-provider-gcp-e2e-full |
May be another breaking change. diff --git a/cmd/gcp-controller-manager/service_account_verifier_test.go b/cmd/gcp-controller-manager/service_account_verifier_test.go
index cc19caf3..4db82ac5 100644
--- a/cmd/gcp-controller-manager/service_account_verifier_test.go
+++ b/cmd/gcp-controller-manager/service_account_verifier_test.go
@@ -20,6 +20,8 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
+ "net/http"
+ "net/http/httptest"
"reflect"
"sync"
"testing"
@@ -32,8 +34,6 @@ import (
"k8s.io/client-go/kubernetes/fake"
ktesting "k8s.io/client-go/testing"
"k8s.io/client-go/tools/cache"
- "net/http"
- "net/http/httptest"
)
func newKSA(sa serviceAccount, gsa gsaEmail) *core.ServiceAccount {
@@ -396,7 +396,6 @@ func TestConfigMapPersist(t *testing.T) {
cmRes := schema.GroupVersionResource{Version: "v1", Resource: "configmaps"}
wantCMKey := fmt.Sprintf("%s/%s", verifiedSAConfigMapNamespace, verifiedSAConfigMapName)
-
tests := []struct {
desc string
indexerObj interface{}
@@ -469,7 +468,7 @@ func TestConfigMapPersist(t *testing.T) {
wantErr: true,
wantActions: []ktesting.Action{
ktesting.NewUpdateAction(cmRes, verifiedSAConfigMapNamespace, newCMFromSAMap(t, &mapWithBothSA)),
- ktesting.NewDeleteAction(cmRes, verifiedSAConfigMapNamespace, wantCMKey),
+ ktesting.NewDeleteActionWithOptions(cmRes, verifiedSAConfigMapNamespace, wantCMKey, *meta.NewDeleteOptions(0)),
},
},
{
Ref:
|
5ca9610
to
4b1b0f9
Compare
@jiahuif thanks for the suggestion! I updated the code as you asked and now all test pass |
/lgtm |
Thanks for raising this PR! Have you tried to run Conformance test locally(with command |
I got 2 errors with Summarizing 2 Failures:
[Fail] [sig-network] Services [It] should delete a collection of services [Conformance]
/workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/service.go:2808
[Fail] [sig-cli] Kubectl client Update Demo [It] should scale a replication controller [Conformance]
/workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/util.go:603
Ran 346 of 7042 Specs in 7822.170 seconds
FAIL! -- 344 Passed | 2 Failed | 0 Pending | 6696 Skipped
--- FAIL: TestE2E (7823.71s)
FAIL Running this without my changes led to 3 failures: Summarizing 3 Failures:
[Fail] [sig-network] Services [It] should delete a collection of services [Conformance]
/workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/service.go:2808
[Fail] [sig-node] KubeletManagedEtcHosts [AfterEach] should test kubelet managed /etc/hosts file [LinuxOnly] [NodeConformance] [Conformance]
/workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:481
[Fail] [sig-api-machinery] CustomResourcePublishOpenAPI [Privileged:ClusterAdmin] [It] works for CRD preserving unknown fields at the schema root [Conformance]
/workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go:113
Ran 346 of 7042 Specs in 7886.095 seconds
FAIL! -- 343 Passed | 3 Failed | 0 Pending | 6696 Skipped After a quick look at the failing tests it seems to me that they are not caused by my changes. Probably you may rerun it on your own to gather more statistics about these issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is my result
Summarizing 1 Failure:
[Fail] [sig-network] Services [It] should delete a collection of services [Conformance]
/workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/service.go:2808
Ran 346 of 7042 Specs in 5709.385 seconds
FAIL! -- 345 Passed | 1 Failed | 0 Pending | 6696 Skipped
--- FAIL: TestE2E (5711.23s)
FAIL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change:
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -100,11 +100,11 @@ load("//defs:repo_rules.bzl", "fetch_kube_release")
fetch_kube_release(
name = "io_k8s_release",
archives = {
- "kubernetes-server-linux-amd64.tar.gz": "af62692a5d5c6024a78d230061061b3fcd2f5422cea2f3d6aaad2fe20fb13746",
- "kubernetes-manifests.tar.gz": "037d1a93edd2b9f54902adaca6060f9dd94911fc4c7122d06c26112ef5e72cce",
+ "kubernetes-server-linux-amd64.tar.gz": "9dc1be960e0f9fa41652aad90ea67c228e6b96b21f3d1833741d4362834df081",
+ "kubernetes-manifests.tar.gz": "a65cc4f74063b0d2d65b47b054bcc5d1bf3f00ae69563419530e374f414756b0",
# we do not currently make modifications to these release tars below
- "kubernetes-node-linux-amd64.tar.gz": "55e63ed2452693c1026307a14554e5b2fff549a97993400d178cd827c76ce128",
- "kubernetes-node-windows-amd64.tar.gz": "17eea748c06137bc802d836a7db8e2d4fba379f3cea1d22b88fcfbbd7c8396ad",
+ "kubernetes-node-linux-amd64.tar.gz": "faa25a8a0b14742b2f48184ad04a3c32c357912a9cdf4a0988d97a70174d5eab",
+ "kubernetes-node-windows-amd64.tar.gz": "aec9dfbd64670bc1175577aa2538e8eefc770c85e6e8cc2ea6719c524a02adff",
},
- version = "v1.22.0",
+ version = "v1.23.1",
)
Or use this PR |
I can confirm that after applying the patch above, the conformance suite passes. Please resolve conflicts and it should be good enough.
|
Ran: go mod tidy && ./tools/update_vendor.sh && ./tools/update_bazel.sh
/lgtm kubetest2 gce -v 3 --gcp-project $PROJECT --repo-root `pwd` --build --up --down --test=ginkgo -- --test-package-version=v1.23.1 --focus-regex='\[Conformance\]' End of ginkgo output.
/assign @cheftako |
sigs.k8s.io/controller-tools v0.7.0 | ||
) | ||
|
||
require ( | ||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems suspect. Would like to understand why we're pulling this in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ go mod why github.com/Azure/go-ansiterm
# github.com/Azure/go-ansiterm
k8s.io/cloud-provider-gcp/cmd/cloud-controller-manager
k8s.io/cloud-provider/app
k8s.io/component-base/term
github.com/moby/term
github.com/moby/term/windows
github.com/Azure/go-ansiterm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an indirect dependency that we import via k8s.io/cloud-provider from Azure org, but it's not related to Azure cloud platform.
It's important to mention, that this dependency already exists in the current CCM version https://github.com/kubernetes/cloud-provider-gcp/blob/master/go.sum#L21-L34
The fact it appears in go.mod file now is because in golang 1.17 all indirect dependencies must be listed there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case this makes it easier to swallow, this dependency is already in the main branch of this project
Lines 22 to 25 in 285a94c
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= | |
github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= | |
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= | |
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= |
but the difference here is that the go.mod file has been bumped to Go 1.17, and in 1.17, when Go writes out the go.mod file, it lists first the required explicit dependencies, and then it creates a list of all of the implicit dependencies as well. That's why we are now seeing this as required where we weren't in Go 1.16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bridgetkromhout going to look into why this is an "Azure" project rather than a more generic Microsoft contribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only usage of k8s.io/component-base/term
is to figure out how many columns the terminal has, which has the unfortunate side effect of introducing github.com/moby/term
, github.com/moby/term/windows
(for windows support), and finally github.com/Azure/go-ansiterm
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cheftako, Fedosin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
After kubernetes#305 these dependencies should be bumped as well.
After kubernetes#305 these dependencies should be bumped as well.
After kubernetes#305 these dependencies should be bumped as well.
After kubernetes#305 these dependencies should be bumped as well.
After kubernetes#305 these dependencies should be bumped as well.
Ran:
go mod tidy && ./tools/update_vendor.sh
Fixes #300