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

Make all GoroutinesChecker methods be on a pointer receiver #35125

Merged
merged 5 commits into from
Apr 20, 2023

Conversation

AndersonQ
Copy link
Member

What does this PR do?

Make all GoroutinesChecker methods be on a pointer receiver

Why is it important?

It's not recommended to mix methods on the same type having a pointer and a non-pointer receiver.

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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

N/A

Related issues

N/A

@AndersonQ AndersonQ self-assigned this Apr 19, 2023
@AndersonQ AndersonQ requested a review from a team as a code owner April 19, 2023 09:31
@AndersonQ AndersonQ requested review from pierrehilbert and faec and removed request for a team April 19, 2023 09:31
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 19, 2023
@AndersonQ AndersonQ added the Team:Elastic-Agent Label for the Agent team label Apr 19, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 19, 2023
@AndersonQ AndersonQ added needs_team Indicates that the issue/PR needs a Team:* label backport-skip Skip notification from the automated backport with mergify labels Apr 19, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 19, 2023
@botelastic
Copy link

botelastic bot commented Apr 19, 2023

This pull request doesn't have a Team:<team> label.

@AndersonQ AndersonQ added v8.8.0 backport-v8.7.0 Automated backport with mergify labels Apr 19, 2023
@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 19, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-04-19T14:50:54.973+0000

  • Duration: 69 min 17 sec

Test stats 🧪

Test Results
Failed 0
Passed 26147
Skipped 1979
Total 28126

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor

@faec faec left a comment

Choose a reason for hiding this comment

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

Hmm, I like the consistency but is there a reason we couldn't do it the other way around, i.e. remove the pointer requirement on the one remaining method? I don't see anything that requires mutability.

@AndersonQ AndersonQ merged commit b062987 into elastic:main Apr 20, 2023
@AndersonQ AndersonQ deleted the fix-goroutinececker branch April 20, 2023 09:01
mergify bot pushed a commit that referenced this pull request Apr 20, 2023
@AndersonQ
Copy link
Member Author

Hmm, I like the consistency but is there a reason we couldn't do it the other way around, i.e. remove the pointer requirement on the one remaining method? I don't see anything that requires mutability.

You're right, it could be the other way around. Sorry I saw the approval and merged, only after I saw your comment :/

AndersonQ added a commit that referenced this pull request May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify backport-v8.7.0 Automated backport with mergify enhancement Team:Elastic-Agent Label for the Agent team v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants