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: Possible race condition in file collector #2147

Merged
merged 1 commit into from
Aug 8, 2022
Merged

FIX: Possible race condition in file collector #2147

merged 1 commit into from
Aug 8, 2022

Conversation

waldbauer-certat
Copy link
Contributor

@waldbauer-certat waldbauer-certat commented Feb 1, 2022

Locking the file with python fcntl to aquire a file lock,
it may not support windows installations :/

Fixes #2128

@codecov-commenter
Copy link

Codecov Report

Merging #2147 (74ecf6e) into develop (1dc5364) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 74ecf6e differs from pull request most recent head 7a518ea. Consider uploading reports for the commit 7a518ea to get more accurate results

@@             Coverage Diff             @@
##           develop    #2147      +/-   ##
===========================================
+ Coverage    76.34%   76.36%   +0.01%     
===========================================
  Files          441      441              
  Lines        23652    23668      +16     
  Branches      3739     3739              
===========================================
+ Hits         18058    18074      +16     
  Misses        4857     4857              
  Partials       737      737              
Impacted Files Coverage Δ
intelmq/bots/collectors/file/collector_file.py 67.30% <100.00%> (+4.26%) ⬆️
...telmq/tests/bots/collectors/file/test_collector.py 100.00% <100.00%> (ø)

@sebix sebix added bug Indicates an unexpected problem or unintended behavior component: bots labels Jul 6, 2022
Copy link
Contributor

@wagner-intevation wagner-intevation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit does not fix #1631, the file output bot is missing. Please adapt the commit message.

CHANGELOG.md Outdated Show resolved Hide resolved
intelmq/bots/collectors/file/collector_file.py Outdated Show resolved Hide resolved
Locking the file with python fcntl to aquire a file lock,
it may not support windows installations :/

Fixes #2128

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
@wagner-intevation
Copy link
Contributor

Rebased on master to fix the merge conflict

@sebix sebix merged commit df4658b into develop Aug 8, 2022
@sebix sebix deleted the fix-1631 branch August 8, 2022 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: bots
Projects
None yet
Development

Successfully merging this pull request may close these issues.

race condition in filecollector line 75
4 participants