antrea-io / antrea

Kubernetes networking based on Open vSwitch
https://antrea.io
Apache License 2.0
1.67k stars 367 forks source link

Migrate from math/rand to math/rand/v2 #6648

Open antoninbas opened 2 months ago

antoninbas commented 2 months ago

Once #6644 is addressed and the repository has migrated to Go 1.23, we should replace all usages of the math/rand package with math/rand/v2. math/rand/v2 provides a better API and includes various optimizations. AFAIK, there is no downside to migrating to the new version. See https://tip.golang.org/doc/go1.22#math_rand_v2 and https://go.dev/blog/randv2 for more information.

kushal9897 commented 2 months ago

I will work on this issue once the repository has migrated to Go 1.23.

kushal9897 commented 2 months ago

Could you please assign this issue to me? I'd love to contribute. Thank you!

antoninbas commented 2 months ago

@kushal9897 #6647 has been merged, feel free to work on this

kushal9897 commented 2 months ago

@antoninbas Should 'Math/rand' change everywhere or just in a specific file?

antoninbas commented 2 months ago

we should replace all usages of the math/rand package with math/rand/v2

kushal9897 commented 1 month ago

@antoninbas can you please describe more about this issue, please

antoninbas commented 1 month ago

@kushal9897 I think the issue is self-explanatory, but I also have provided guidance in your existing PR (https://github.com/antrea-io/antrea/pull/6674), so I am not sure what extra information you require. If you no longer have time to work on this issue, please let me know and I can unassign you.

kushal9897 commented 1 month ago

i am working on it

kushal9897 commented 3 weeks ago

@antoninbas Sorry, I am unable to make changes in PR #6674. I've submitted a new PR with the required updates. Could you please review and accept the new one? Thank you!