Skip to content

Conversation

perlpunk
Copy link
Contributor

@perlpunk perlpunk commented Jun 16, 2025

Issue: https://progress.opensuse.org/issues/178105

Summary by Sourcery

Add detailed documentation for the automated OBS submission workflow in the README, outlining the trigger, monitor, and submit/cleanup scripts and the required OBS project setup.

Documentation:

  • Document the three auto submission scripts (trigger-openqa_in_openqa, monitor-openqa_job, os-autoinst-obs-auto-submit/cleanup-obs-project) for devel:openQA
  • Describe the OBS project hierarchy (devel:openQA, devel:openQA:testing, devel:openQA:tested) and linking procedures
  • Explain the job flow: releasing packages to testing, monitoring test results, and submitting packages to openSUSE:Factory

Copy link

sourcery-ai bot commented Jun 16, 2025

Reviewer's Guide

Added a comprehensive ‘Auto submission scripts for devel:openQA’ section to README.md, outlining the three Jenkins‐driven pipelines (trigger, monitor, submit/cleanup), the OBS project workflow, and usage examples.

Flow diagram for auto submission scripts in devel:openQA

flowchart TD
    A[trigger-openqa_in_openqa] -->|If devel:openQA:testing is empty| B[osc release from devel:openQA to devel:openQA:testing]
    B --> C[Trigger os-autoinst-distri-openqa tests using devel:openQA:testing]
    C --> D[monitor-openqa_job]
    D -->|All jobs passed| E[os-autoinst-obs-auto-submit]
    D -->|Jobs failed| F[Delete packages from devel:openQA:testing]
    E --> G[Submit packages from devel:openQA:tested to openSUSE:Factory]
    E --> H[cleanup-obs-project]
    H --> I[Delete all packages in devel:openQA:testing]
Loading

File-Level Changes

Change Details Files
Add overview of auto submission scripts and OBS projects
  • Introduce three scripts/pipelines (trigger, monitor, submit/cleanup)
  • List the three related OBS projects and their roles
  • Explain devel:openQA and devel:openQA:tested linkage and setup
README.md
Document trigger-openqa_in_openqa behavior
  • Describe hourly scheduling of os-autoinst-distri-openqa tests
  • Detail conditional osc release to devel:openQA:testing
  • Explain triggering of tests and logging to job_post_response
README.md
Document monitor-openqa_job behavior
  • Explain monitoring of job_post_response until completion
  • Specify pass/fail branching and cleanup on failure
README.md
Document os-autoinst-obs-auto-submit and cleanup
  • Outline submission of packages to openSUSE:Factory and others
  • Note delay for reviewer window before creating new requests
  • Describe cleanup-obs-project deletion of devel:openQA:testing
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@perlpunk perlpunk force-pushed the autosubmit-docs branch 2 times, most recently from 6ab76e6 to 456d0fb Compare June 18, 2025 12:15
@perlpunk perlpunk changed the title WIP - autosubmit docs Document workflow for auto submission to Factory Jun 18, 2025
@perlpunk perlpunk marked this pull request as ready for review July 3, 2025 15:38
@perlpunk
Copy link
Contributor Author

perlpunk commented Jul 3, 2025

Addressed a couple of comments

### `monitor-openqa_job`

This monitors `job_post_response` until all jobs are finished. If all jobs
passed, the auto submit pipeline will be run.
Copy link
Contributor

Choose a reason for hiding this comment

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

the auto submit pipeline (aka os-autoinst-obs-auto-submit) runs anyway if I am not wrong. it just doesnt do anything. or is it actual skipped if monitoring script failed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the monitoring pipeline fails, the following pipeline is not run


### `os-autoinst-obs-auto-submit`

This script will copy contents from each `devel:openQA` package to
Copy link
Contributor

Choose a reason for hiding this comment

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

It will copy packages from devel:openQA:testing, right? Otherwise we might submit something we haven't tested (as new packages might have already ended up in devel:openQA).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code is really confusing though:

https://github.com/os-autoinst/scripts/blob/master/os-autoinst-obs-auto-submit#L7C1-L7C41

src_project=${src_project:-devel:openQA}

and then only later in the submit function:
https://github.com/os-autoinst/scripts/blob/master/os-autoinst-obs-auto-submit#L231

    if [[ -n $staging_project && $staging_project != none && $staging_project != "$src_project" ]]; then
        src_project=$staging_project
        must_cleanup_staging=1
    fi

If you only look at this line:
https://github.com/os-autoinst/scripts/blob/master/os-autoinst-obs-auto-submit#L202

cp -v "$src_project"/"$package"/* "$dst_project"/"$package"/

then you would think it copies from devel:openQA.

I wonder why it was done this way.

Copy link
Contributor

@Martchus Martchus Jul 5, 2025

Choose a reason for hiding this comment

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

I think it was done this way (probably initially by myself even though the code seems to have gone through quite some changes) because this way I didn't have to change all the lines where src_project is used.


[devel:openQA](https://build.opensuse.org/project/show/devel:openQA) is the
project where the packages are automatically updated with every commit in git.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe an explanation of devel:openQA:testing here in the middle would be good:

Suggested change
[devel:openQA:testing](https://build.opensuse.org/project/show/devel:openQA:testing) contains
packages currently being tested for submission to `openSUSE:Factory` and potentially other targets
(via `devel:openQA:tested`, see next paragraph). It is only updated by the submission scripts themselves
to remain otherwise unchanged while tests are running and a submission is prepared. (If we would
submit directly from `devel:openQA` we might submit packages that have already changed since tests
were executed so we would not necessarily submit what we have tested.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Something like that would be also nice 👍

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.

4 participants