action #69322
closedcoordination #69310: [epic] SUSE QA tools team ticket process helpers
Automatic check for SUSE QA tools WIP-Limit based on tickets
0%
Description
Acceptance criteria¶
- AC1: An alert is raised and members of the team are informed if the global limit from https://progress.opensuse.org/projects/qa/wiki#WIP-limits-reference-Kanban-development is exceeded
- AC2: Not more than one alert per day
Suggestions¶
- Research how https://github.com/os-autoinst/scripts/blob/master/openqa-label-known-issues#L11 queries tickets from our redmine instance progress.opensuse.org
- Find the right query, as needed filter it down further
- Run the query on a continuous base, e.g. travis CI cronjob linked to a project in https://github.com/os-autoinst scope that passes/fails based on query result numbers
- Ensure everyone interested can receive the alert, e.g. we subscribe to the github project where the travis CI results are reported or similar
Updated by okurz about 4 years ago
We can query all issues that "SUSE QA tools" team members are working on:
curl -s -H "X-Redmine-API-Key: $redmine_api_key" "https://progress.opensuse.org/issues.json?query_id=400&project_id=18&limit=200" | jq
with $redmine_api_key
being my personal redmine API key that can be created in each person's profile, query_id=400
is the id for the query "tools team - what members of the team are working on" and project_id=18
is for "openQA". I added limit=200
as otherwise some tickets were not shown and we will filter down later anyway. It should be possible to include a "status" filter in the query directly but did not manage to do that, e.g. with status_id=2
to only return "In Progress" according to https://www.redmine.org/projects/redmine/wiki/Rest_Issues , maybe not for json api, only xml.
So with saving the query result for reuse:
curl -s -H "X-Redmine-API-Key: $redmine_api_key" "https://progress.opensuse.org/issues.json?query_id=400&project_id=18&limit=200" > working_on.json
cat working_on.json | jq -r '.issues | .[] | select(.status.name=="In Progress") | .id' | wc -l
returning correctly 9 tickets as of now.
Updated by okurz about 4 years ago
- Status changed from Workable to In Progress
- Assignee set to okurz
I added the user "openqa_review" to the QA project in https://progress.opensuse.org/projects/qa/settings/members so that the bot can access the internal ticket query. I added the redmine api key of said user as REDMINE_API_KEY in https://github.com/os-autoinst/scripts/settings/secrets/new
Created https://github.com/os-autoinst/scripts/pull/31 with a script and a github actions pipeline.
We have yet to see if the syntax in the workflow file is correct and if it triggers as expected. Another way might be https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/ to trigger manually but I guess I can wait for now :)
Updated by okurz about 4 years ago
- Status changed from In Progress to Resolved
https://github.com/os-autoinst/scripts/actions?query=workflow%3A%22Check+SUSE+QA+Tools+WIP-Limit%22 shows the checks working fine. Created https://github.com/os-autoinst/scripts/pull/33 to show a bit more output but without functional impact.