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

Allow monitor command to skip aborted jobs #6101

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kalikiana
Copy link
Member

Aborted includes cancelled and parallel failed.

See: https://progress.opensuse.org/issues/174583

@@ -23,6 +23,11 @@ sub _monitor_jobs ($self, $client, $poll_interval, $job_ids, $job_results) {
if (OpenQA::Jobs::Constants::meta_state($job_state) eq OpenQA::Jobs::Constants::FINAL) {
push @$job_results, $job->{result} // NONE;
next;
} elsif (OpenQA::Jobs::Constants::meta_state($job_state) eq OpenQA::Jobs::Constants::ABORTED_RESULTS) {
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 still a draft, but I would mention that this should probably be configurable. An aborted result usually not considered as successful.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, obsoleted is a result and not a state. Any job will sooner or later be in a FINAL state.

Copy link
Contributor

@Martchus Martchus Jan 9, 2025

Choose a reason for hiding this comment

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

This condition doesn't make much sense. meta_state returns meta-state for the specified concrete state but this check compares it to a list of results.

But yes, as @perlpunk has already mentioned, this should be configurable anyway.

So this should probably ignore the results SKIPPED and OBSOLETED or maybe for the sake of completeness the whole meta-result ABORTED. Not sure how much sense it makes to deal with the meta constants here when making this configurable anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

And the check should be done in _compute_return_code, not here

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