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

go1.22: update golang.org/x/tools to fix typecheck/TestVerify #120142

Closed
Rajalakshmi-Girish opened this issue Aug 23, 2023 · 21 comments
Closed

go1.22: update golang.org/x/tools to fix typecheck/TestVerify #120142

Rajalakshmi-Girish opened this issue Aug 23, 2023 · 21 comments
Labels
area/code-organization Issues or PRs related to kubernetes code organization kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/testing Categorizes an issue or PR as relevant to SIG Testing.
Milestone

Comments

@Rajalakshmi-Girish
Copy link
Contributor

Rajalakshmi-Girish commented Aug 23, 2023

What happened?

UT typecheck/TestVerify crashing when run with golang tip version.
This is happening after golang/go@5fa4aac

What did you expect to happen?

Test must PASS when run with master golang version

How can we reproduce it (as minimally and precisely as possible)?

  1. Install go tip version
  2. git clone https://github.com/kubernetes/kubernetes
  3. cd kubernetes/test/typecheck/
  4. go test -v -race -run ^TestVerify

Anything else we need to know?

golang/go#62247

OS version

# On Linux:
$ cat /etc/os-release
# NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

$ uname -a
# Linux maxwells1.fyre.ibm.com 4.18.0-489.el8.x86_64 #1 SMP Thu Apr 27 17:02:11 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
@Rajalakshmi-Girish Rajalakshmi-Girish added the kind/bug Categorizes issue or PR as related to a bug. label Aug 23, 2023
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Aug 23, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 23, 2023
@Rajalakshmi-Girish
Copy link
Contributor Author

/kind failing-test

@k8s-ci-robot k8s-ci-robot added the kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. label Aug 23, 2023
@Rajalakshmi-Girish
Copy link
Contributor Author

/remove-kind bug

@k8s-ci-robot k8s-ci-robot removed the kind/bug Categorizes issue or PR as related to a bug. label Aug 23, 2023
@Rajalakshmi-Girish
Copy link
Contributor Author

/sig testing

@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 23, 2023
@Rajalakshmi-Girish
Copy link
Contributor Author

Tried updating x/tools to the latest version of v0.12.0 from https://pkg.go.dev/golang.org/x/tools. But even that panicked.

Looks like only after the new release of x/tools, this runtime error be avoided

@BenTheElder
Copy link
Member

hmmm, SIG Testing isn't testing with golang @ tip, I'm not sure that's something we're aiming for.

For a while sig scalability had something, i'm not sure what the status on that is.

@BenTheElder
Copy link
Member

BenTheElder commented Aug 24, 2023

officially, kubernetes is built with a particular version, and that's what we run tests with. (.go-version)

@Rajalakshmi-Girish
Copy link
Contributor Author

We have an internal CI job that tests k8s with master golang on ppc64le.

We do this to foresee any bugs and compatibility issues between k8s and golang.
This UT failure indicates the need for an update of https://pkg.go.dev/golang.org/x/tools module to be able to use future releases for Golang.

Can we keep this issue open till we get the next release of x/tools module?
@mkumatag ^^

@mkumatag
Copy link
Member

@Rajalakshmi-Girish if we are not fixing anything in k8s then lets close this issue.

@Rajalakshmi-Girish
Copy link
Contributor Author

@Rajalakshmi-Girish if we are not fixing anything in k8s then lets close this issue.

Updating the version of x/tools in go.mod here https://github.com/kubernetes/kubernetes/blob/master/go.mod#L88 is needed to avoid this failure.
While we use the later versions of go in future, we must update this module here.

This test PASSES with master go when x/tools in go.mod is updated to its tip version.

@Rajalakshmi-Girish
Copy link
Contributor Author

[root@maxwells1 kubernetes]# git diff go.mod | grep tools
-       golang.org/x/tools v0.8.0
+       golang.org/x/tools v0.12.1-0.20230825192346-2191a27a6dc5
[root@maxwells1 kubernetes]# cd -
/root/kubernetes/test/typecheck
[root@maxwells1 typecheck]# go mod vendor
[root@maxwells1 typecheck]# go test -v -race -run ^TestVerify
=== RUN   TestVerify
--- PASS: TestVerify (6.62s)
PASS
ok      k8s.io/kubernetes/test/typecheck        7.727s
[root@maxwells1 typecheck]#

@BenTheElder
Copy link
Member

I think we have a vested interest in future go releases working, but I don't know if that includes tracking go @ tip continuously and I'm not sure SIG Testing should have a bug assigned, unless we plan to operate CI for this upstream.

This looks like "when we adopt go 1.22 we'll need to update a library".

cc @liggitt

@liggitt
Copy link
Member

liggitt commented Aug 28, 2023

yeah... I don't think this is a bug for us yet. It's helpful to know so we can update the tools library once it tags a release that includes this, but we wouldn't pick up a prerelease of a library to fix a test failure against a pre-release stdlib :)

@liggitt
Copy link
Member

liggitt commented Aug 28, 2023

/area code-organization
/remove-sig testing
/area code-organization
/kind cleanup

@k8s-ci-robot k8s-ci-robot added area/code-organization Issues or PRs related to kubernetes code organization kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. and removed sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Aug 28, 2023
@liggitt liggitt changed the title k8s UT typecheck/TestVerify: crashes when built with Go at tip due to go/types.Sizes change go1.22: update golang.org/x/tools to fix typecheck/TestVerify Aug 28, 2023
@liggitt liggitt removed the kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. label Aug 28, 2023
@liggitt liggitt added this to the v1.30 milestone Aug 28, 2023
@liggitt
Copy link
Member

liggitt commented Aug 28, 2023

assigned to v1.30, will track as part of adopting go1.22, since Kubernetes 1.29 will release on go1.21

@neolit123
Copy link
Member

/sig architecture testing

@k8s-ci-robot k8s-ci-robot added sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 8, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 28, 2024
@MaryamTavakkoli
Copy link

Hello!
Release Signal shadow here.
This issue has not been updated for a long time, so I'd like to check what's the status. The code freeze is starting 02:00 UTC Wednesday 6th March 2024 / 18:00 PDT Tuesday 5th March 2024 (less than a month from now), and while there is still plenty of time, we want to ensure that each PR has a chance to be merged on time.

As this issue is tagged for 1.30, is it still planned for this release?

@liggitt
Copy link
Member

liggitt commented Feb 9, 2024

yes, this already happened in #122412

/close

@k8s-ci-robot
Copy link
Contributor

@liggitt: Closing this issue.

In response to this:

yes, this already happened in #122412

/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.

@MaryamTavakkoli
Copy link

Thanks for the update @liggitt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-organization Issues or PRs related to kubernetes code organization kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/testing Categorizes an issue or PR as relevant to SIG Testing.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants