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

replace math/rand with math/rand/v2 #5336

Merged
merged 6 commits into from
Aug 27, 2024

Conversation

mauri870
Copy link
Member

@mauri870 mauri870 commented Aug 21, 2024

What does this PR do?

This PR updates all occurrences of math/rand with the new math/rand/v2 introduced in Go 1.22.

Why is it important?

The math/rand/v2 includes performance and scalability improvements.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

How to test this PR locally

Related issues

@mauri870 mauri870 added the enhancement New feature or request label Aug 21, 2024
@mauri870 mauri870 requested a review from a team as a code owner August 21, 2024 14:19
Copy link
Contributor

mergify bot commented Aug 21, 2024

This pull request does not have a backport label. Could you fix it @mauri870? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Aug 21, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Very mechanical, looks good.

@mauri870 mauri870 force-pushed the feature/math-rand-v2 branch 2 times, most recently from fde80c6 to 4400321 Compare August 21, 2024 15:26
@mauri870 mauri870 force-pushed the feature/math-rand-v2 branch from 4400321 to eab5e57 Compare August 21, 2024 15:27
@mauri870
Copy link
Member Author

Test failure seems to be unrelated and is being tracked at #5279.

@VihasMakwana
Copy link
Contributor

@mauri870 I've merged main into this. #5279 is now resolved and CI should be green.

@mauri870
Copy link
Member Author

@mauri870 I've merged main into this. #5279 is now resolved and CI should be green.

Thanks!

Copy link
Member

@pchila pchila left a comment

Choose a reason for hiding this comment

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

LGTM

@mauri870 mauri870 merged commit 6bb6b1e into elastic:main Aug 27, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip enhancement New feature or request skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use math/rand/v2 in place of math/rand
7 participants