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

[8.x](backport #5878) [Flaky Test] Fix TestHTTPSProxy #5902

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 31, 2024

What does this PR do?

It moves the close of the proxy and target http server to t.Cleanup()

Why is it important?

Just using defer was causing the last request log to be logged after the test had ended, what lead to a panic.

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

Disruptive User Impact

  • N/A

How to test this PR locally

On a Mac (the panics happened on Mac)

go test -count 10000 -timeout 0 -run TestHTTPSProxy ./testing/proxytest/

It should succeed

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

This is an automatic backport of pull request #5878 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner October 31, 2024 13:16
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Oct 31, 2024
@mergify mergify bot requested review from kaanyalti and andrzej-stencel and removed request for a team October 31, 2024 13:16
Copy link
Contributor Author

mergify bot commented Oct 31, 2024

Cherry-pick of 02fb75e has failed:

On branch mergify/bp/8.x/pr-5878
Your branch is up to date with 'origin/8.x'.

You are currently cherry-picking commit 02fb75e59e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   testing/proxytest/proxytest_test.go

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@pierrehilbert pierrehilbert requested review from AndersonQ and removed request for kaanyalti and andrzej-stencel October 31, 2024 13:36
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Oct 31, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@AndersonQ AndersonQ force-pushed the mergify/bp/8.x/pr-5878 branch from 24f1b9c to 40e4a92 Compare October 31, 2024 14:30
Copy link
Contributor Author

mergify bot commented Nov 4, 2024

This pull request has not been merged yet. Could you please review and merge it @AndersonQ? 🙏

Copy link
Contributor Author

mergify bot commented Nov 4, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/8.x/pr-5878 upstream/mergify/bp/8.x/pr-5878
git merge upstream/8.x
git push upstream mergify/bp/8.x/pr-5878

@AndersonQ AndersonQ force-pushed the mergify/bp/8.x/pr-5878 branch from 528a281 to 2c6a94c Compare November 4, 2024 13:31
@AndersonQ AndersonQ force-pushed the mergify/bp/8.x/pr-5878 branch from 2c6a94c to 1c5209a Compare November 4, 2024 14:28
@AndersonQ AndersonQ enabled auto-merge (squash) November 4, 2024 14:28
@AndersonQ AndersonQ removed the conflicts There is a conflict in the backported pull request label Nov 4, 2024
@AndersonQ AndersonQ force-pushed the mergify/bp/8.x/pr-5878 branch from 1c5209a to 84d5034 Compare November 4, 2024 16:25
@AndersonQ AndersonQ force-pushed the mergify/bp/8.x/pr-5878 branch from 84d5034 to 430f865 Compare November 4, 2024 16:25
Copy link

@AndersonQ AndersonQ merged commit 13e654e into 8.x Nov 5, 2024
14 checks passed
@AndersonQ AndersonQ deleted the mergify/bp/8.x/pr-5878 branch November 5, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants