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

Add lock to fix flaky test #1261

Merged
merged 18 commits into from
Feb 7, 2025
Merged

Add lock to fix flaky test #1261

merged 18 commits into from
Feb 7, 2025

Conversation

matoval
Copy link
Collaborator

@matoval matoval commented Feb 3, 2025

Add lock to fix flaky test

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 52.63158% with 18 lines in your changes missing coverage. Please review.

Project coverage is 40.24%. Comparing base (9eb8256) to head (a5e041a).
Report is 1 commits behind head on devel.

Files with missing lines Patch % Lines
pkg/workceptor/kubernetes.go 47.05% 18 Missing ⚠️
@@            Coverage Diff             @@
##            devel    #1261      +/-   ##
==========================================
+ Coverage   39.80%   40.24%   +0.43%     
==========================================
  Files          45       48       +3     
  Lines        9376     9995     +619     
==========================================
+ Hits         3732     4022     +290     
- Misses       5354     5677     +323     
- Partials      290      296       +6     
Files with missing lines Coverage Δ
pkg/workceptor/command.go 45.84% <100.00%> (+0.15%) ⬆️
pkg/workceptor/remote_work.go 10.99% <100.00%> (+0.16%) ⬆️
pkg/workceptor/workunitbase.go 72.05% <100.00%> (+0.15%) ⬆️
pkg/workceptor/kubernetes.go 28.99% <47.05%> (+0.54%) ⬆️

... and 6 files with indirect coverage changes

Components Coverage Δ
Go 39.68% <52.63%> (-0.13%) ⬇️
Receptorctl 49.31% <ø> (∅)

@matoval matoval changed the title Add lock to fsnotify watcher add to fix flaky test Add lock to fix flaky test Feb 3, 2025
@AaronH88
Copy link
Contributor

AaronH88 commented Feb 4, 2025

Strange, it looks like UntilWithSync is still causing a data race. 🤔

@@ -402,7 +404,9 @@ func (bwu *BaseWorkUnit) MonitorLocalStatus() {
watcherErrors = make(chan error)

if bwu.watcher != nil {
watcherLock.Lock()
Copy link
Contributor

Choose a reason for hiding this comment

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

Strange that we need this.
Have you tried using the existing status file lock?

Copy link

sonarqubecloud bot commented Feb 6, 2025

Copy link
Contributor

@AaronH88 AaronH88 left a comment

Choose a reason for hiding this comment

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

lgtm

@AaronH88 AaronH88 merged commit ce9c65c into ansible:devel Feb 7, 2025
24 checks passed
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