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 checks for worker classes in directly chained clusters #5936

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

Martchus
Copy link
Contributor

See particular commit messages and https://progress.opensuse.org/issues/154735

* Consider all worker classes to verify that all jobs in a directly chained
  cluster have the same set of worker classes assigned
* Avoid DBIx warning in case a job with directly chained dependencies has
  more than one worker class assigned
* See https://progress.opensuse.org/issues/154735
* Consider all worker classes to verify that all jobs in a directly chained
  cluster have the same set of worker classes assigned
* Avoid DBIx warning in case a job with directly chained dependencies has
  more than one worker class assigned
* See https://progress.opensuse.org/issues/154735
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.74%. Comparing base (00b92ee) to head (31174dc).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5936      +/-   ##
==========================================
- Coverage   98.74%   98.74%   -0.01%     
==========================================
  Files         396      396              
  Lines       38870    38875       +5     
==========================================
+ Hits        38384    38386       +2     
- Misses        486      489       +3     

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

@@ -6,6 +6,11 @@ use Mojo::Base 'DBIx::Class::ResultSet', -signatures;

use OpenQA::App;

sub all_values_sorted ($self, $job_id, $key) {
state $options = {distinct => 1, columns => 'value', order_by => 'value'};
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you using state here?

Copy link
Contributor Author

@Martchus Martchus Sep 23, 2024

Choose a reason for hiding this comment

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

Because this hash never changes, so no need to re-initialize it on every function call. (That's probably the C++ programmer in me; in C++ that would be static const … and state is the closest Perl has to offer.)

Copy link
Contributor

Choose a reason for hiding this comment

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

It's a bit uncommon for a simple, small hashref, but I won't complain

@mergify mergify bot merged commit 08dcad3 into os-autoinst:master Sep 23, 2024
45 checks passed
@Martchus Martchus deleted the worker-class-comparison branch September 23, 2024 18:45
os-autoinst-bot pushed a commit to os-autoinst-bot/openQA that referenced this pull request Sep 24, 2024
commit 08dcad3
Merge: 6d38c3b 31174dc
Author:     mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
AuthorDate: Mon Sep 23 15:40:50 2024 +0000
Commit:     GitHub <[email protected]>
CommitDate: Mon Sep 23 15:40:50 2024 +0000

    Merge pull request os-autoinst#5936 from Martchus/worker-class-comparison

    Fix checks for worker classes in directly chained clusters
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