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

update release-1.23 to go1.19 #113983

Merged
merged 21 commits into from
Dec 21, 2022
Merged

Commits on Dec 20, 2022

  1. Update to golang.org/x/... matching release-1.24

    	golang.org/x/crypto v0.0.0-20220214200702-86341886e292
            golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10
            golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
            golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
            golang.org/x/sys v0.3.0
            golang.org/x/term v0.3.0
            golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
            golang.org/x/tools v0.1.12
    
    Mimic commit e6e7a42 with current release-1.24 versions
    liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    1eeda2b View commit details
    Browse the repository at this point in the history
  2. update golangci-lint to 1.45.0

    This should fix Go 1.18 compatibility woes.
    
    Cherry-pick of e3ed3ba with conflict resolved
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin authored and liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    0a782b4 View commit details
    Browse the repository at this point in the history
  3. TestWatchRestartsIfTimeoutNotReached: fix

    This fixes the following error:
    
    > test/integration/apimachinery/watch_restart_test.go:232:5: call to (*T).Fatalf from a non-test goroutine
    
    Update: the previous fix (commit 1ce55e3 that uses panic)
    looks way too severe; it seems it is enough to call t.Errorf and return
    from goroutine. The test will time out and fail anyway.
    
    Combination of 1ce55e3 and 8820f4d
    
    Co-authored-by: Kir Kolyshkin <kolyshkin@gmail.com>
    Co-authored-by: Davanum Srinivas <davanum@gmail.com>
    3 people committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    42931a0 View commit details
    Browse the repository at this point in the history
  4. Regen mocks using go 1.18

    Generated by ./hack/update-mocks.sh using go 1.18
    
    Mimic of commit 4513de0
    liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    3aaa70a View commit details
    Browse the repository at this point in the history
  5. Fix verify: generated-stable-metrics wrt go 1.18

    This should fix the following error when running
    ./hack/update-generated-stable-metrics.sh:
    
    	'go get' is no longer supported outside a module.
    	To build and install a command, use 'go install' with a version,
    	like 'go install example.com/cmd@latest'
    	For more information, see https://golang.org/doc/go-get-install-deprecation
    	or run 'go help get' or 'go help install'.
    
    Using `go get` to download gopkg.in/yaml.v2 package into
    KUBE_EXTRA_GOPATH directory no longer works. Interestingly, main repo
    already has gopkg.in/yaml.v2@v2.4.0, same version that was installed by
    that go get.
    
    I guess that GOPATH with multiple elements no longer works either,
    and since this code was the only user of KUBE_EXTRA_GOPATH, let's remove
    it as well.
    
    Combination of 3470453 and d8fdb00
    
    Co-authored-by: Kir Kolyshkin <kolyshkin@gmail.com>
    Co-authored-by: Davanum Srinivas <davanum@gmail.com>
    3 people committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    9441767 View commit details
    Browse the repository at this point in the history
  6. hack: integrate logcheck into golangci-lint

    Running logcheck as part of golangci-lint has several advantages:
    - faster checking because finding files and parsing is shared
      with other linters
    - gets rid of the complex and buggy
      hack/verify-structured-logging.sh (kubernetes#106746)
    - support for // nolint:logcheck
    - works with Go 1.18
    
    Replay of 17e3c55
    pohly authored and liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    c95a8a1 View commit details
    Browse the repository at this point in the history
  7. enhance and fix log calls

    Some of these changes are cosmetic (repeatedly calling klog.V instead of
    reusing the result), others address real issues:
    
    - Logging a message only above a certain verbosity threshold without
      recording that verbosity level (if klog.V().Enabled() { klog.Info... }):
      this matters when using a logging backend which records the verbosity
      level.
    
    - Passing a format string with parameters to a logging function that
      doesn't do string formatting.
    
    All of these locations where found by the enhanced logcheck tool from
    kubernetes/klog#297.
    
    In some cases it reports false positives, but those can be suppressed with
    source code comments.
    
    Partial cherry-pick of edffc70
    pohly authored and liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    4da1f79 View commit details
    Browse the repository at this point in the history
  8. Ignore unstructured log warnings

    The fixes to this file included in 1.24 in 0f4d066
    rely on multi-line support in klog not present in the version used in
    1.23
    liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    84fde39 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7c6027a View commit details
    Browse the repository at this point in the history
  10. Regenerate vendor

    Replay of 9e1064a
    liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    6179de8 View commit details
    Browse the repository at this point in the history
  11. fix e2e coverage package for go 1.18

    Cherry-pick of 5d8f6f1
    BenTheElder authored and liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    0e2e6b9 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7e2e482 View commit details
    Browse the repository at this point in the history
  13. Update golangci-lint to 1.46.2 and fix errors

    Cherry-pick of 2bca77a
    
    Signed-off-by: Abirdcfly <fp544037857@gmail.com>
    Abirdcfly authored and liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    ab0f90f View commit details
    Browse the repository at this point in the history
  14. Fix quotes that trip up gofmt

    Cherry-pick of 27dc8a9
    
    Signed-off-by: Davanum Srinivas <davanum@gmail.com>
    dims authored and liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    249e05a View commit details
    Browse the repository at this point in the history
  15. fix patch_test for gofmt issue

    Cherry-pick of ea7dff5
    
    Signed-off-by: Davanum Srinivas <davanum@gmail.com>
    dims authored and liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    3cab72a View commit details
    Browse the repository at this point in the history
  16. Adjust for os/exec changes in 1.19

    https://tip.golang.org/doc/go1.19#os-exec-path
    
    Cherry-pick of 1f55703
    
    Signed-off-by: Davanum Srinivas <davanum@gmail.com>
    dims authored and liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    3be2936 View commit details
    Browse the repository at this point in the history
  17. Update to go1.19

    Mimic commit 9329500 and 4784b58
    liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    fd427d8 View commit details
    Browse the repository at this point in the history
  18. Update go.mod to go1.19

    Cherry-pick of 00db9f0
    liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    c54219f View commit details
    Browse the repository at this point in the history
  19. update golangci-lint for go 1.19

    Cherry-pick of c8c5539
    
    Signed-off-by: Abirdcfly <fp544037857@gmail.com>
    Abirdcfly authored and liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    ca22f11 View commit details
    Browse the repository at this point in the history
  20. delete hardcode go version in golangci-lint config

    Cherry-pick of b7bcbf3
    
    Signed-off-by: Abirdcfly <fp544037857@gmail.com>
    Abirdcfly authored and liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    e55e20e View commit details
    Browse the repository at this point in the history
  21. Generate and format files

        - Run hack/update-codegen.sh
        - Run hack/update-generated-device-plugin.sh
        - Run hack/update-generated-protobuf.sh
        - Run hack/update-generated-runtime.sh
        - Run hack/update-generated-swagger-docs.sh
        - Run hack/update-openapi-spec.sh
        - Run hack/update-gofmt.sh
    
    Replay of a9593d6
    liggitt committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    203d8ac View commit details
    Browse the repository at this point in the history