Project

General

Profile

Actions

action #180812

open

openQA Project (public) - coordination #180626: [saga][epic] Support switch to gitea for openSUSE/SUSE based products, e.g. SLE16

qem-bot+qem-dashboard reading from/writing to gitea instead of IBS

Added by okurz about 2 months ago. Updated about 12 hours ago.

Status:
In Progress
Priority:
Normal
Assignee:
Start date:
2025-04-10
Due date:
% Done:

0%

Estimated time:

Description

Motivation

As explained in the parent #180806 new maintenance workflows are planned based on Gitea. SMELT is planned to be adapted right now it is not yet there, see https://gitlab.suse.de/tools/smash/-/issues/1458.

https://gitlab.suse.de/tools/smelt/-/issues/1147, still the plan exists to have a first "dry run" of the SLE 16 maintenance workflow ready by 2025-07-08 as decided as part of #180602. As QE engineers so far rely on features like "approvable_for" comments we should find out if and how feasible an adaptation of qem-bot+qem-dashboard to such workflow is.

Acceptance criteria

  • AC1: qem-bot+qem-dashboard is used to trigger+monitor+approve SLE 16 maintenance updates based on src.suse.de (can be separate instances)

Suggestions

Note that I highlighted open "TODOs" from previous spikes in bold. This doesn't mean we need to do them as long as ACs are fulfilled. I just want to highlight what next steps we should at least consider.

  • DONE: Await and incorporate results from spikes #180809 and #182591 and if we can rely on SMELT https://gitlab.suse.de/tools/smash/-/issues/1458
    • We clarified in a meeting that reading data from SMELT is not wanted. We should use Gitea directly.
    • Results from #182591 have been incorporated into the subsequent suggestions.
    • The following change for the dashboard has already been merged: https://github.com/openSUSE/qem-dashboard/pull/2482
    • Subsequent suggestions refer to https://github.com/openSUSE/qem-bot/pull/195 as "draft PR" so check it out. It makes probably most sense to base further development on that PR.
      • The draft PR adds fake responses in the "responses" directory which are used by dry runs and the extended test suite. The --dry flag will prevent modifications to the dashboard. The --fake-data flag will prevent querying live data from Gitea.
      • Checkout #182591#note-15 for how the draft PR was/is tested and deployed.
  • After #180809#note-14 and discussions on Slack and #182591#note-15 we established the following:
    • qem-bot should check PRs on Gitea like this dummy PR using the Gitea API to list PRs and then do the subsequent actions for each PR.
      • The draft PR already does this. It goes through all open PRs as there doesn't seem to exist an API parameter for server-side filtering of PRs by requested reviewer. The team products/qam-openqa e.g. on https://src.suse.de/products/SLFO/pulls/120 doesn't even show up in the immediate response from querying PRs. So the draft PR requests reviews for each and every open PR and only decides then whether it is relevant based on whether a review from products/qam-openqa is requested. This might also need tweaking to consider already approved PRs as such. (The approval will probably be done by a concrete user and not a team and so far the logic doesn't take that into account.)
    • So far the draft PR reads the relevant OBS projects from a comment of an OBS bot. However, the staging.config file and the PR number could also be used to determine the project on OBS instead of parsing "human readable" comments. (It is going to be :SLES instead of :SLES-15.99 as in the linked example which was from an old config.)
      • The staging project can be composed via <StagingProject>:<PR>.
      • The test productbuilds are in <StagingProject>:<PR>:<QA.Name>.
        • "IIRC you wanted to test only these (basically the binaries filtered by the list of packages which are delivered for the product)."
      • Additional remarks by Adrian:
        • The main project is also publishing, but these are the in filtered rpms.
        • IIRC you wanted to have the filtered repos for each product in addition.
        • Similar to what we had with channels before. Just that we organize it in subprojects now. This allows use to test current product source against it or even prepare changes in the product, eg. when a package split happened or packages got added which requires also an adaption in the produtcompose files.
    • The OBS-API http://api.suse.de/build/$PROJECT/_result can then be used to determine the build status and affected packages and archs.
    • If the OBS build status looks good qem-bot can trigger tests.
      • This is already done by the draft PR.
        • The draft PR also introduces the flag --allow-build-failures because at this point I haven't found a PR with OBS project where all builds are successful and all repos are published. This also means the logic for determining whether the build results on OBS look good might still need further tweaking.
        • The draft PR just schedules dummy tests (see next open point). For these dummy tests I created meta-data you can find on #182591#note-15. It also contains a remark on the versioning I'm not sure about.
      • How it knows what tests to trigger still needs clarification.
        • We could reuse the existing meta-data approach as done by the draft PR.
        • From OBS we know affected packages/archs so we could base the decision on that.
          • "yes, that's the updateinfo file, that should be enough for us to know which packages are under test, we just need to parse the xml"
    • qem-bot can approve/reject a change by creating a review on the PR.
    • We should try to keep features mentioned at the end of #180809#note-11 working.
    • There will be "staging triggered tests" and "product increment triggered tests", see https://jira.suse.com/browse/MSQA-949. We need to figure out how those match with the current "incidents" and "aggregates". So this still needs clarification. So far the draft PR only cares about "incidents".
    • We could check whether the updateinfo.xml.gz file exists in the OBS repo and if not we can stop processing (probably we should still dismiss the pending review via https://src.suse.de/api/swagger#/repository/repoDismissPullReview so the PR is not stuck). (This idea came up in one of the meetings and hasn't been implemented in the draft PR.)

Related issues 2 (0 open2 closed)

Blocked by QA (public) - action #182591: [spike][timeboxed:20h] qem-bot+qem-dashboard reading from/writing to gitea instead of smelt/IBS - take 2 size:MResolvedmkittler2025-04-102025-06-03

Actions
Copied from QA (public) - action #180809: [spike][timeboxed:20h] qem-bot+qem-dashboard reading from/writing to gitea instead of smelt/IBS size:MResolvedmkittler2025-04-10

Actions
Actions #1

Updated by okurz about 2 months ago

  • Copied from action #180809: [spike][timeboxed:20h] qem-bot+qem-dashboard reading from/writing to gitea instead of smelt/IBS size:M added
Actions #2

Updated by okurz about 2 months ago

  • Subject changed from qem-bot+qem-dashboard reading from/writing to gitea instead of smelt/IBS to qem-bot+qem-dashboard reading from/writing to gitea instead of IBS
  • Description updated (diff)
  • Status changed from New to Blocked
Actions #3

Updated by okurz about 2 months ago

  • Target version changed from future to Tools - Next

This is now a blocking ticket for https://jira.suse.com/browse/MSQA-960

Actions #4

Updated by mkittler 25 days ago

  • Description updated (diff)
Actions #5

Updated by mkittler 25 days ago

  • Description updated (diff)

I tried to restore motivation and acceptance criteria after accidentally removing them.

Actions #6

Updated by mkittler 22 days ago

  • Description updated (diff)
Actions #7

Updated by mkittler 22 days ago

  • Description updated (diff)
Actions #8

Updated by mkittler 22 days ago

  • Status changed from Blocked to Workable

This ticket is no longer blocked by #180809. This would leave https://gitlab.suse.de/tools/smash/-/issues/1458 as blocker but I don't think we should wait for that at this point.

Actions #9

Updated by okurz 20 days ago

  • Status changed from Workable to New
  • Assignee deleted (okurz)
Actions #10

Updated by okurz 14 days ago

  • Target version changed from Tools - Next to Ready
Actions #11

Updated by okurz 12 days ago

  • Related to action #182591: [spike][timeboxed:20h] qem-bot+qem-dashboard reading from/writing to gitea instead of smelt/IBS - take 2 size:M added
Actions #12

Updated by okurz 12 days ago

  • Related to deleted (action #182591: [spike][timeboxed:20h] qem-bot+qem-dashboard reading from/writing to gitea instead of smelt/IBS - take 2 size:M)
Actions #13

Updated by okurz 12 days ago

  • Blocked by action #182591: [spike][timeboxed:20h] qem-bot+qem-dashboard reading from/writing to gitea instead of smelt/IBS - take 2 size:M added
Actions #14

Updated by okurz 12 days ago

  • Description updated (diff)
  • Status changed from New to Blocked
  • Assignee set to mkittler
Actions #15

Updated by mkittler 7 days ago

  • Description updated (diff)
  • Status changed from Blocked to Workable
Actions #16

Updated by mkittler 6 days ago

  • Assignee deleted (mkittler)

Looks like I was actually assigned to this but right now I want to work on something else.

I will probably continue with this unless someone else chimes in - which you're welcome to do :-)

Actions #17

Updated by mkittler 6 days ago

  • Description updated (diff)
Actions #18

Updated by okurz 6 days ago

  • Description updated (diff)
Actions #19

Updated by okurz 3 days ago

  • Status changed from Workable to New
Actions #20

Updated by mkittler about 14 hours ago

  • Assignee set to mkittler
Actions #21

Updated by mkittler about 12 hours ago

  • Status changed from New to In Progress
Actions #22

Updated by mkittler about 12 hours ago ยท Edited

I guess as next step it makes sense to bring what I have so far closer to production and see what's missing from there. So I created:

  1. A dashboard deployment: http://10.168.194.29:3000/
  2. A job group on OSD: https://openqa.suse.de/admin/job_templates/654 using a dedicated medium type (search for "Foo-Bar-Incidents" on https://openqa.suse.de/admin/products)
  3. Meta-data to use on GitLab pipelines: https://progress.opensuse.org/attachments/download/20567/slfo.yml
  4. Adjustments to pipelines so we can add pipeline schedules for Gitea: https://gitlab.suse.de/qa-maintenance/bot-ng/-/merge_requests/85
  5. A pipline schedule on my fork to test the gitea-sync comment against my dashboard deployment: https://gitlab.suse.de/mkittler/bot-ng/-/pipeline_schedules
Actions

Also available in: Atom PDF