Skip to content

Fixed race conditions for log writing and minor bugs in parser.go#58

Open
annab-stripe wants to merge 5 commits intoslackhq:masterfrom
annab-stripe:bug_fixes
Open

Fixed race conditions for log writing and minor bugs in parser.go#58
annab-stripe wants to merge 5 commits intoslackhq:masterfrom
annab-stripe:bug_fixes

Conversation

@annab-stripe
Copy link
Copy Markdown

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've been mindful about doing atomic commits, adding documentation to my changes, not refactoring too much.
  • I've a descriptive title and added any useful information for the reviewer. Where appropriate, I've attached a screenshot and/or screencast (gif preferrably).
  • I've written tests to cover the new code and functionality included in this PR.
  • I've read, agree to, and signed the Contributor License Agreement (CLA).

PR Summary

  • Added a mutex to AuditWriter in order to avoid a race condition.

  • Added a function rotate to use the mutex to rotate logs.

  • Modified tests accordingly to the previous changes and used an atomic.LoadUint32 for n.seq.

  • Added the syscall JSON parameter in order for it to appear in AuditMessageGroup.

  • Added 1305 to the AddMessage switch in order to not map the uid for that message.

Related Issues

None

Test strategy

Modified the tests in order to work with the mutex changes. Tested in a test environment to verify the 'syscall' parameter was appearing in the JSON struct.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jul 30, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@nbrownus
Copy link
Copy Markdown
Collaborator

👋 @annab-stripe thanks for the PR. Can you do the CLA bit for us?

@annab-stripe
Copy link
Copy Markdown
Author

Hi, somebody from Stripe legal team signed one for me an year ago.

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.

3 participants