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

fix(webhook): Rewind HTTP request body upon request failure #2143

Merged
merged 3 commits into from
Sep 18, 2023

Conversation

yquansah
Copy link
Contributor

@yquansah yquansah commented Sep 18, 2023

fixes: #2127
This PR is for fixing this issue.

The client was not sending a body in the request upon failure, and that is due to not "rewinding" the HTTP body upon failure.

In this change, we create a request every time we are communicating with the webhook server to avoid those types of errors.

@yquansah yquansah requested a review from a team as a code owner September 18, 2023 14:11
@markphelps markphelps changed the title feat(webhook): Rewind HTTP request body upon request failure fix(webhook): Rewind HTTP request body upon request failure Sep 18, 2023
@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Merging #2143 (829f481) into main (734e7c9) will decrease coverage by 0.03%.
The diff coverage is 46.66%.

@@            Coverage Diff             @@
##             main    #2143      +/-   ##
==========================================
- Coverage   70.65%   70.63%   -0.03%     
==========================================
  Files          73       73              
  Lines        7054     7062       +8     
==========================================
+ Hits         4984     4988       +4     
- Misses       1785     1788       +3     
- Partials      285      286       +1     
Files Changed Coverage Δ
internal/server/audit/webhook/client.go 87.17% <46.66%> (-4.25%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@markphelps markphelps enabled auto-merge (squash) September 18, 2023 14:50
@markphelps markphelps merged commit 11775ea into main Sep 18, 2023
23 of 25 checks passed
@markphelps markphelps deleted the fix-webhook-retries branch September 18, 2023 14:54
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.

[FLI-599] webhook retry does not seem to include body
2 participants