action #110518
closedcoordination #102915: [saga][epic] Automated classification of failures
QA (public) - coordination #94105: [epic] Use feedback from openqa-investigate to automatically inform on github pull requests, open tickets, weed out automatically failed tests
Call job_done_hooks if requested by test setting (not only openQA config as done so far) size:M
Description
User story¶
Commonly we want to call job_done_hooks only on failed or incomplete jobs. For some cases, e.g. openqa-investigate, it makes sense to call job_done_hooks on passed jobs. To not overwhelm an openQA instance with too much overhead calling job_done_hooks on all jobs we could ask openQA with a test setting to only do this for specific jobs
Acceptance criteria¶
- AC1: If an openQA job has a specific test setting, e.g. _TRIGGER_JOB_DONE_HOOK=1, then the job done hook is called regardless of the openQA config
- AC2: If an openQA job does not have any special test setting but fails and openQA is configured to call the job_done_hook on failed jobs the job_done_hook is still called
Suggestions¶
- Read how we currently decide within openQA if job_done_hooks are called based on the current configuration in https://github.com/os-autoinst/openQA/blob/9313003e11f0dbeaa29e1754536dcaa09f0f259c/lib/OpenQA/Task/Job/FinalizeResults.pm#L41
- Extend documentation for the new feature
- Add test
- Extend accordingly to read a test setting and call job_done_hook, e.g. just in line https://github.com/os-autoinst/openQA/blob/9313003e11f0dbeaa29e1754536dcaa09f0f259c/lib/OpenQA/Task/Job/FinalizeResults.pm#L41 one more condition from job settings
- Ensure that the openQA configuration triggered job_done_hooks still work
Updated by okurz over 2 years ago
- Copied from action #98862: Comment about intermittent/sporadic test issues on original job if openqa-investigate retry job passes size:M added
Updated by okurz over 2 years ago
- Related to action #95783: Provide support for multi-machine scenarios handled by openqa-investigate size:M added
Updated by okurz over 2 years ago
- Copied to action #110530: Do NOT call job_done_hooks if requested by test setting added
Updated by okurz over 2 years ago
We currently have the configuration for the actual job done hooks to be called within the config variable itself which is mostly duplicated already anyway. So we could
- Simply ask the user to specify the complete configuration string in the test variable
- Or we just reference another hook by name that we call itself, e.g.
_TRIGGER_JOB_DONE_HOOK=failed
meaning to trigger the hook defined in the config key "job_done_hook" - Or we define a generic config string and only enable/disable them for each result and enable in the test with the boolean test setting
_TRIGGER_JOB_DONE_HOOK=1
. Example config:
job_done_hook = env enable_force_result=true from_email=…@suse.de notification_address=…@suse.slack.com host=openqa.suse.de exclude_group_regex='.*(Development|Public Cloud|Released|Others|Kernel|Virtualization).*' grep_timeout=60 nice ionice -c idle /opt/os-autoinst-scripts/openqa-label-known-issues-and-investigate-hook
# just "1" to enable hooks based on the generic
job_done_hook_enable_failed = 1
job_done_hook_enable_incomplete = 1
# still a custom hook for timeout_exceeded, automatically enabled if defined
job_done_hook_timeout_exceeded = env … /opt/os-autoinst-scripts/openqa-handle-timeout-hook
Updated by livdywan over 2 years ago
- Related to action #111314: _SECRET_ variables are exposed in vars.json when the job is not completed added
Updated by mkittler over 2 years ago
- Status changed from Workable to In Progress
Updated by openqa_review over 2 years ago
- Due date set to 2022-06-07
Setting due date based on mean cycle time of SUSE QE Tools
Updated by mkittler over 2 years ago
- Status changed from In Progress to Feedback
Updated by mkittler over 2 years ago
- Due date deleted (
2022-06-07) - Status changed from Feedback to Resolved
The PR has been merged