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/0.11] Update golang version in ci.yml #2189

Open
wants to merge 1 commit into
base: release/0.11
Choose a base branch
from

Conversation

kiashok
Copy link
Contributor

@kiashok kiashok commented Jun 27, 2024

Update ci.yml to use golang 1.20 + fix lint errors with math.Rand

This change fixes the long standing mingw errors PRs were running into in release/0.11

image

@kiashok kiashok marked this pull request as ready for review June 27, 2024 20:16
@kiashok kiashok requested a review from a team as a code owner June 27, 2024 20:16
@thaJeztah
Copy link
Contributor

thaJeztah commented Jun 27, 2024

Oh! All the fun, looks like we now hit the rand/read is deprecated issue;

 Error: SA1019: rand.Read has been deprecated since Go 1.20 because it shouldn't be used: For almost all use cases, crypto/rand.Read is more appropriate.  (staticcheck)
  Error: SA1019: rand.Read has been deprecated since Go 1.20 because it shouldn't be used: For almost all use cases, crypto/rand.Read is more appropriate.  (staticcheck)
  Error: SA1019: tar.TypeRegA has been deprecated since Go 1.11 and an alternative has been available since Go 1.1: Use TypeReg instead.  (staticcheck)
  Error: SA1019: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: Programs that call Seed and then expect a specific sequence of results from the global random source (using functions such as Int) can be broken when a dependency changes how much it consumes from the global random source. To avoid such breakages, programs that need a specific result sequence should use NewRand(NewSource(seed)) to obtain a random generator that other packages cannot access.  (staticcheck)
cmd/containerd-shim-runhcs-v1/pod_test.go:      "math/rand"
cmd/containerd-shim-runhcs-v1/service_internal_podshim_test.go: "math/rand"
cmd/containerd-shim-runhcs-v1/service_internal_taskshim_test.go:        "math/rand"
cmd/containerd-shim-runhcs-v1/task_hcs_test.go: "math/rand"
ext4/dmverity/dmverity_test.go: "math/rand"
internal/cmd/io_npipe.go:       "math/rand"
internal/regopolicyinterpreter/regopolicyinterpreter_test.go:   "math/rand"
internal/tools/networkagent/main.go:    "math/rand"
pkg/securitypolicy/regopolicy_test.go:  "math/rand"
pkg/securitypolicy/securitypolicy_test.go:      "math/rand"

Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
Copy link
Contributor

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Contributor

@katiewasnothere katiewasnothere left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants