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: data race on count pending Falco events #112

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

dwisiswant0
Copy link
Collaborator

IMPORTANT: Please do not create a PR without creating an issue first!

(Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request).

Summary

Race condition while count pending Falco events in checkFalcoEvents.

Proposed of changes

This PR fixes/implements the following bugs/features:

How has this been tested?

Proof:

$ go test -v -cover -race -count=1 -run="TestNewWithFalcoSidekickURL" ./
=== RUN   TestNewWithFalcoSidekickURL
--- PASS: TestNewWithFalcoSidekickURL (8.19s)
PASS
coverage: 48.2% of statements
ok  	github.com/kitabisa/teler-waf	9.243s	coverage: 48.2% of statements

Closing issues

Fixe #111

Checklist:

  • My code follows the code style of this project.
  • My changes successfully ran and pass linters locally (run make lint).
  • I have written new tests for my changes.
    • My changes successfully ran and pass tests locally.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (2914f61) 76.81% compared to head (78d7003) 78.60%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #112      +/-   ##
==========================================
+ Coverage   76.81%   78.60%   +1.78%     
==========================================
  Files           6        6              
  Lines        1113     1117       +4     
==========================================
+ Hits          855      878      +23     
+ Misses        206      187      -19     
  Partials       52       52              
Files Coverage Δ
falcosidekick.go 54.23% <75.00%> (+37.87%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dwisiswant0 dwisiswant0 force-pushed the fix/data-race-on-checkFalcoEvents branch from 34b3e64 to 78d7003 Compare October 19, 2023 07:09
@dwisiswant0 dwisiswant0 merged commit a39d234 into master Oct 19, 2023
11 checks passed
@dwisiswant0 dwisiswant0 deleted the fix/data-race-on-checkFalcoEvents branch October 19, 2023 07:25
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.

2 participants