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

Bump CI to use supported go version, fix a single Go 1.20 issue in mount pkg; rm uneeded errorlint annotations #129

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Commits on Oct 27, 2023

  1. mount: fix Go 1.20 errorlint warning

    Since Go 1.20,
    
    > [t]he fmt.Errorf function now supports multiple occurrences of the %w
    > format verb, which will cause it to return an error that wraps all of
    > those error operands.
    
    This change, together with newer errorlint, causes the following
    warning:
    
    > mount_unix.go:74:56: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
    > 					return fmt.Errorf("%w (possible cause: %s)", err, suberr)
    >					                                                  ^
    
    As we still want to support Go 1.17, use explicit string for suberr,
    and add a TODO to switch to %w once we switch to Go 1.20+.
    
    Fixes: 487129d
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    fb28f89 View commit details
    Browse the repository at this point in the history
  2. Bump various components used in CI

    1. Test with supported Go releases (1.20.x and 1.21.x). Also leave Go
       1.17.x since it costs us little to keep supporting it.
    
    2. Bump golangci-lint to the latest released version (v1.55.1).
    
    3. Bump actions/setup-go to v4.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    8b02f54 View commit details
    Browse the repository at this point in the history
  3. */go.mod: set go to 1.17

    It is already that way for sequential, and Go 1.17 is the oldest version
    we use in CI, so let's bring other modules go.mod in sync.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    89efe05 View commit details
    Browse the repository at this point in the history
  4. *: bump golang.org/x/sys to v0.1.0

    This is the oldest tagged version of x/sys. This allows to follow Go
    module's "minimum version selection", leaving it up to users of this
    module to pick the version they want.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    c8f0d56 View commit details
    Browse the repository at this point in the history
  5. mount: rm unneeded errorlint annotation

    golangci-lint v1.54.2 comes with errorlint v1.4.4, which contains
    the fix [1] whitelisting all errno comparisons for errors coming from
    x/sys/unix. Remove the annotation that is no longer needed.
    
    Unfortunately, switch on a bare unix error (in mountinfo) still needs to
    be annotated (see [2]).
    
    [1] polyfloyd/go-errorlint#47
    [2] polyfloyd/go-errorlint#54
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    d6a5209 View commit details
    Browse the repository at this point in the history
  6. sequential: format via gofumpt

    This fixes the following CI error:
    
    > sequential_windows.go:114: File is not `gofumpt`-ed (gofumpt)
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    4700bc3 View commit details
    Browse the repository at this point in the history