Skip to content
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

[release-1.28] [occm] Make sure we don't mask LB tests failures and fix what was failing #2537

Conversation

dulek
Copy link
Contributor

@dulek dulek commented Feb 7, 2024

This is a cherry-pick of #2360

NONE

/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 7, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 7, 2024
@dulek
Copy link
Contributor Author

dulek commented Feb 7, 2024

This one should wait for #2536 to make it as clean as possible.

…ling (kubernetes#2360)

* Compare proper LB name for shared LBs

With shared LBs we distinguish the elements by tagging them with the
proper name of the LB that would be created for a Service if it wasn't
created as shared. This commit fixes that comparison for listener
deletion as code was always comparing the name of the primary LB.

* Fix shared LBs tests

PR kubernetes#2190 prohibited sharing an LB that is internal for security reasons.
This commit fixes the shared LBs tests to not create internal LBs.

* Make sure we don't mask LB tests failures

In `test-lb-service.sh` we do `trap "delete_resources" EXIT` to make
sure we cleanup resources on a test failure. In there, we only fetched
the `$?` after making a check for `${AUTO_CLEAN_UP}`, which itself
alters the code to 0, so function always returns success. This means
tests can never really fail.

This commit fixes it by making sure `$ERROR_CODE` is fetched at the very
beginning of the cleanup function.
@dulek dulek force-pushed the cherry-pick-2360-to-release-1.28 branch from 4457dd8 to d7ffecb Compare February 7, 2024 16:04
@dulek
Copy link
Contributor Author

dulek commented Feb 7, 2024

/hold cancel
/approve

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 7, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dulek

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 7, 2024
Copy link
Contributor

@mandre mandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean cherry-pick.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2024
@dulek
Copy link
Contributor Author

dulek commented Feb 7, 2024

/retest

This is very weird.

@mandre
Copy link
Contributor

mandre commented Feb 7, 2024

You may try with a newer version of golangci-lint? There was a new release just an hour ago.

@dulek
Copy link
Contributor Author

dulek commented Feb 7, 2024

#2542

But locally all works. :/

@mandre
Copy link
Contributor

mandre commented Feb 8, 2024

It's clearly not caused by your PR as we had a bunch of the same failure yesterday, both in release-1.28 and master: https://prow.k8s.io/job-history/gs/kubernetes-jenkins/pr-logs/directory/pull-cloud-provider-openstack-check

#2542 shows that it can work, however I'm surprised that it suddenly broke as the previous version was working fine until now. Perhaps there's a new dep that it doesn't like?

Let's see one last time if it fixed by itself.
/retest

@mandre
Copy link
Contributor

mandre commented Feb 8, 2024

The test image is different between a failing job and a working one: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20240130-9db6d59ca0-master vs gcr.io/k8s-staging-test-infra/kubekins-e2e:v20240111-cf1d81388e-master.

I suspect different versions of go that break golangci-lint.

@mandre
Copy link
Contributor

mandre commented Feb 8, 2024

Bingo!

❯ podman run --rm --entrypoint /usr/local/go/bin/go gcr.io/k8s-staging-test-infra/kubekins-e2e:v20240111-cf1d81388e-master version
go version go1.21.6 linux/amd64


❯ podman run --rm --entrypoint /usr/local/go/bin/go gcr.io/k8s-staging-test-infra/kubekins-e2e:v20240130-9db6d59ca0-master version
go version go1.22rc2 linux/amd64

And golangci/golangci-lint#4272

This explains why we need the newest version of golangci-lint.

@dulek
Copy link
Contributor Author

dulek commented Feb 8, 2024

/retest

@k8s-ci-robot k8s-ci-robot merged commit db86c94 into kubernetes:release-1.28 Feb 8, 2024
5 checks passed
@mandre mandre deleted the cherry-pick-2360-to-release-1.28 branch February 8, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants