-
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
fix(loki): fix the deadlock in Loki integration #647
Conversation
There is not a label identifying the kind of this PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Welcome @bsod90! It looks like this is your first PR to falcosecurity/falcosidekick 🎉 |
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.
As you confirmed it works, I'm approving.
FYI, I would have used anonymous functions.
Something like:
func (c *Client) LokiPost(falcopayload types.FalcoPayload) {
c.Stats.Loki.Add(Total, 1)
c.ContentType = LokiContentType
if c.Config.Loki.User != "" && c.Config.Loki.APIKey != "" {
func() {
c.httpClientLock.Lock()
defer c.httpClientLock.Unlock()
c.BasicAuth(c.Config.Loki.User, c.Config.Loki.APIKey)
}()
}
LGTM label has been added. Git tree hash: cc3d9117460b639b38ae42541b004e150ee09662
|
can you sign-off your commit please |
Signed-off-by: Maksim Leanovich <[email protected]>
f1631bd
to
9688c10
Compare
Thank you so much, @Issif ! |
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.
All good, for the anonymous functions I thought it was interesting for you to mention them 😉
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsod90, 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 |
A quick follow-up question: when do you expect the next minor release to be cut? I'm asking because I'm trying to use Loki integration in our infra and it would be easier to just use the official image instead of forking, custom-building, etc. |
@bsod90 I created an RC for you https://github.com/falcosecurity/falcosidekick/releases/tag/2.29.0-rc.3 |
Thank you!
…On Thu, Sep 28, 2023 at 5:46 AM Thomas Labarussias ***@***.***> wrote:
@bsod90 <https://github.com/bsod90> I created an RC for you
https://github.com/falcosecurity/falcosidekick/releases/tag/2.29.0-rc.3
—
Reply to this email directly, view it on GitHub
<#647 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARPWEY26GU45NAEBK6QAMLX4VWSBANCNFSM6AAAAAA5GUH3RM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I believe this should be the fix for #646, but I'm still figuring out a way to test it locally.