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

Upgrade Go to 1.23 #6647

Merged
merged 3 commits into from
Sep 9, 2024
Merged

Upgrade Go to 1.23 #6647

merged 3 commits into from
Sep 9, 2024

Commits on Aug 30, 2024

  1. Upgrade Go to 1.23

    * Update some for loops in response to the following change introduced
      in Go 1.22: each iteration of the loop creates new variables, to avoid
      accidental sharing bugs. As a result of this change, a few existing
      loop variables had become heap-allocated, so we updated the loop to
      avoid the extra allocation. Other loops that were affected by the
      change (compiling differently), but for which the loop variable was
      stack-allocated, were reviewed individually and when it made sense,
      the loop was refactored to avoid the extra variable copy. The `go test
      -gcflags=-d=loopvar=2` command was used to find affected loops.
    * The antrea/codegen image was updated to use Go 1.23. No changes in
      generated files.
    * golangci-lint was updated to the latest available version (v1.60.3)
    
        - govet reported some invalid usages of printf, which was addressed;
          this lead to some refactoring of the `antctl check` code
        - a new gosec rule (G115), which looks for potential integer
          overflows when converting between integer types, caused a lot of
          errors to be reported in the codebase. There were too many errors
          to be addressed as part of this PR, so we only handled a few of
          them for which the fix was straightforward. When the rule
          implementation is improved (so that it reports fewer false
          positives), we should review all errors and address them as needed.
    
    Fixes antrea-io#6644
    
    Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
    antoninbas committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    304b2c4 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2024

  1. Update metrics doc

    Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
    antoninbas committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    c1a75b1 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2024

  1. Address review comments

    Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
    antoninbas committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    cfc45c8 View commit details
    Browse the repository at this point in the history