-
Notifications
You must be signed in to change notification settings - Fork 169
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
First crack at a fix to prevent clients from stomping on their headers #376
First crack at a fix to prevent clients from stomping on their headers #376
Conversation
Welcome @bc-sb! It looks like this is your first PR to falcosecurity/falcosidekick 🎉 |
headers. Signed-off-by: Beau Croteau <[email protected]>
d30703a
to
d80b603
Compare
Thank you for this PR, I'm in holidays this week, I'll take a look asap |
For all outputs that use the generic |
I actually tried that approach originally of just doing a:
But was still seeing it...admittedly I got lazy and just crammed it into the clients that were touching the headers to confirm. But now that I looked at it again, I ran the race detector on it:
So, I think I have a better option that I will push after seeing that. |
@Issif I just pushed the more robust option. |
Signed-off-by: Beau Croteau <[email protected]>
69a7a92
to
e1cfc56
Compare
Can you a more explicit name than |
Signed-off-by: Beau Croteau <[email protected]>
outputs/client.go
Outdated
@@ -103,6 +104,7 @@ type Client struct { | |||
DogstatsdClient *statsd.Client | |||
GCPTopicClient *pubsub.Topic | |||
GCPCloudFunctionsClient *gcpfunctions.CloudFunctionsClient | |||
m sync.Mutex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use a longer name for clarity please.
LGTM label has been added. Git tree hash: 10d4035a83f8192a189c4931da6b547ce70519ec
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bc-sb, Issif The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
First crack at a fix to prevent clients from stomping on their own headers
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area outputs
What this PR does / why we need it:
Fixes a race condition that multiple calls to the same http Post causes headers to become unset
Which issue(s) this PR fixes:
#375
Fixes #375
Special notes for your reviewer: