kubernetes-sigs / kubetest2

Kubetest2 is the framework for launching and running end-to-end tests on Kubernetes.
Apache License 2.0
326 stars 105 forks source link

gke: Avoid hardcoding COS as default image type #171

Closed bobbypage closed 2 years ago

bobbypage commented 2 years ago

The default image type in GKE as of 1.19 is COS_CONTAINERD. kubetest2 gke deployer should avoid hardcoding the image and instead rely on the default unless image is specified.

k8s-ci-robot commented 2 years ago

Hi @bobbypage. 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
bobbypage commented 2 years ago

/cc @SergeyKanzhelev @qiutongs

bobbypage commented 2 years ago

/assign @amwat

bobbypage commented 2 years ago

/retest

bobbypage commented 2 years ago

Failure in CI is unrelated panic...

Looks like project was not actual fetched from boskos?

+ kubetest2 gke -v 2 --num-clusters 1 --num-nodes 1 --zone us-central1-c,us-west1-a,us-east1-b --network ci-tests-network --up --down --test=exec -- /home/prow/go/src/github.com/kubernetes-sigs/kubetest2/kubetest2-gke/ci-tests/test.sh
I1104 00:24:50.106030    4445 app.go:59] RunDir for this run: "/logs/artifacts/8957be9c-3d05-11ec-bb62-5a9d54b04110"
I1104 00:24:50.126348    4445 app.go:94] ID for this run: "8957be9c-3d05-11ec-bb62-5a9d54b04110"
I1104 00:24:50.126478    4445 common.go:69] No GCP projects provided, acquiring from Boskos [1] project/s
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
sigs.k8s.io/kubetest2/kubetest2-gke/deployer.(*Deployer).Down(0xc000144100, 0xc0079c00a0, 0x26b2ec2f5fc65)
    sigs.k8s.io/kubetest2/kubetest2-gke/deployer/down.go:35 +0x2da
sigs.k8s.io/kubetest2/pkg/metadata.(*Writer).WrapStep(0xc00013c090, 0xe0385a, 0x4, 0xc0003497a8, 0xc000000180, 0xe4b2f0)
    sigs.k8s.io/kubetest2/pkg/metadata/writer.go:51 +0x70

edit: looks like these tests aren't required, not sure how stable they are :)

SergeyKanzhelev commented 2 years ago

Also filed https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/issues/186

bobbypage commented 2 years ago

This is great. I'd say we may also want to apply the same for the machine type. Current default in kubetest is not matching the GKE default

Thanks @SergeyKanzhelev. Agree, I think the less we default on the client and rely on the server side defaults the better. @amwat what do you think about removing default for machine type as well?

chizhg commented 2 years ago

/retest

amwat commented 2 years ago

/approve

I agree, let's rely on server defaults as much as possible.

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amwat, bobbypage, qiutongs, SergeyKanzhelev

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/kubetest2/blob/master/OWNERS)~~ [amwat] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment