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

Improve minion guards for needle tasks #5961

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

perlpunk
Copy link
Contributor

@perlpunk perlpunk commented Sep 30, 2024

In OpenQA::Task::Needle::Save, OpenQA::Task::Needle::Delete and
OpenQA::Task::Git::Clone we are now using a guard for the individual directory
git_clone_${needledir}_task instead of a global guard limit_needle_task.

Issue: https://progress.opensuse.org/issues/164898

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.77%. Comparing base (9d29acb) to head (015e115).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5961      +/-   ##
==========================================
- Coverage   98.78%   98.77%   -0.01%     
==========================================
  Files         396      396              
  Lines       39023    39043      +20     
==========================================
+ Hits        38547    38564      +17     
- Misses        476      479       +3     

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

Copy link
Contributor

@Martchus Martchus left a comment

Choose a reason for hiding this comment

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

We probably need the same for the delete needle task. But otherwise it looks good.

@perlpunk
Copy link
Contributor Author

We probably need the same for the delete needle task.

why?

@Martchus
Copy link
Contributor

Because it also invokes Git commands on a needle checkout (so far only using the limit_needle_task lock).

@perlpunk
Copy link
Contributor Author

Because it also invokes Git commands on a needle checkout (so far only using the limit_needle_task lock).

Oh, the git operation is hidden in OpenQA::Schema::Result::Needles. I only looked at OpenQA::Task::Needle::Delete and didn't expect it elsewhere :(

@okurz
Copy link
Member

okurz commented Oct 1, 2024

@Mergifyio rebase

Copy link
Contributor

mergify bot commented Oct 1, 2024

rebase

✅ Branch has been successfully rebased

@perlpunk perlpunk marked this pull request as draft October 2, 2024 10:53
@perlpunk perlpunk force-pushed the minion-guards branch 3 times, most recently from e986590 to c4d80c2 Compare October 2, 2024 13:32
In OpenQA::Task::Needle::Save, OpenQA::Task::Needle::Delete and
OpenQA::Task::Git::Clone we are now using a guard for the individual directory
`git_clone_${needledir}_task` instead of a global guard limit_needle_task.

Issue: https://progress.opensuse.org/issues/164898
@perlpunk perlpunk marked this pull request as ready for review October 2, 2024 13:59
@perlpunk
Copy link
Contributor Author

perlpunk commented Oct 2, 2024

I updated all git gru tasks to use a guard per directory instead of the global one

@perlpunk
Copy link
Contributor Author

perlpunk commented Oct 2, 2024

There seems to be flaky coverage in lib/OpenQA/Shared/Controller/Running.pm. We don't see it because the coverage decrease is so low, but going to the report I can see it in the indirect changes tab often:

     # setup a function to stop streaming again
     my $timer_id;
     my $close_connection = sub ($self, @) {     # line 204-206 reported as uncovered
         Mojo::IOLoop->remove($timer_id);
         $self->finish;
     };
 
     # setup a recurring timer to send the last screenshot to the client

edit: https://progress.opensuse.org/issues/167803

@mergify mergify bot merged commit 0d7df5d into os-autoinst:master Oct 3, 2024
45 checks passed
@perlpunk perlpunk deleted the minion-guards branch October 6, 2024 22:24
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.

4 participants