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

Enable triggering an individual rebuild of a failed build for package maintainers #108

Open
Olf0 opened this issue Mar 28, 2023 · 6 comments
Labels
question Further information is requested

Comments

@Olf0
Copy link
Collaborator

Olf0 commented Mar 28, 2023

QUESTION

Is there a way to configure the OBS running SailfishOS-OBS to allow for triggering an individual rebuild of a failed build for package maintainers?

STEPS TO REPRODUCE

A package maintainer (i.e., without admin privileges) is allowed to trigger building all versions (i.e., all combinations of CPU-architectures and SailfishOS releases) by altering the _service file or hitting the "Trigger services" button. But when a build fails for a specific combination of CPU-architecture and SailfishOS release, one is not able to retrigger this failed build individually via the "Trigger rebuild" button atop of the build log: OBS explicitly notifies one about lacking the right to do that.

ADDITIONAL INFORMATION

As single packages regularly fail to build as the SailfishOS-OBS with the build log showing that the build process simply stalled at some point (i.e., the build process "hangs" until a timeout hits and the state of the package built for a specific combination of CPU-architecture and SailfishOS release is switched from building to failed) a package maintainer at SailfishOS:Chum:Testing currently has no choice but to retrigger building all combinations of CPU-architectures and SailfishOS releases for this package in order to have none of them in failed state; sometimes even multiple times until all variants of a package are successfully built. Actually not being able to rebuild individual variants of a package vastly increases the probability of this happening multiple times in a row, each time with a different variant of the package failing to build, usually. This results in a massive waste of resources: technical ones, but also the the maintainer having to watch the build results regularly in approx. 15 minutes intervals and then to retrigger a mass rebuild (all combinations of CPU-architectures and SailfishOS releases), again.

Suggestion

Evaluate, e.g. by the technical maintainers of the SailfishOS-OBS (currently @lbt and @mlehtima AFAICS), if there is a way to configure the OBS version in use to allow maintainers to trigger rebuilds of individual package variants, as admins are already allowed to.

@Olf0 Olf0 added the question Further information is requested label Mar 28, 2023
@Olf0
Copy link
Collaborator Author

Olf0 commented Mar 22, 2024

Actually this issue is filed incorrectly here, but only due to the apparent lack of a specific place to file issues for the SailfishOS-OBS.

@nephros
Copy link

nephros commented May 29, 2024

I think this is possible via a careful incantation of osc:

usage: osc [global opts] wipebinaries [-h] [-a ARCH] [-M FLAVOR] [-r REPO] [--build-disabled] [--build-failed] [--broken] [--unresolvable] [--all]

With the optional argument <package> you can specify a certain package
otherwise all binary packages in the project will be deleted.

usage:
    osc wipebinaries OPTS                       # works in checked out project dir
    osc wipebinaries OPTS PROJECT [PACKAGE[:FLAVOR]]
    osc unpublish OPTS                       # works in checked out project dir
    osc unpublish OPTS PROJECT [PACKAGE[:FLAVOR]]

optional arguments:
  -h, --help            show this help message and exit
  -a ARCH, --arch ARCH  Delete all binary packages for a specific architecture
  -M FLAVOR, --multibuild-package FLAVOR
                        Only work with the specified flavors of a multibuild package. Globs are resolved according to _multibuild file from server. Empty string is resolved to a package
                        without a flavor.
  -r REPO, --repo REPO  Delete all binary packages for a specific repository
  --build-disabled      Delete all binaries of packages for which the build is disabled
  --build-failed        Delete all binaries of packages for which the build failed
  --broken              Delete all binaries of packages for which the package source is bad
  --unresolvable        Delete all binaries of packages which have dependency errors
  --all                 Delete all binaries regardless of the package status (previously default)

So e.g. osc wipebinaries sailfishos:chum:testing patchmanager -r 3.4.0.24_armv7hl -a armv8el

@mlehtima
Copy link

@nephros "osc rebuild" should be better for that use

@nephros
Copy link

nephros commented May 29, 2024

@nephros "osc rebuild" should be better for that use

Ah yes, thanks.

osc rebuild sailfishos:chum:testing patchmanager -r 3.4.0.24_armv7hl -a armv8el then.

@mlehtima
Copy link

mlehtima commented May 29, 2024

There is even a "--failed" option for "osc rebuild"

@nephros
Copy link

nephros commented May 29, 2024

... and osc being a front-end to the web API, this can also be done using a HTTP request.

But that needs the password encoded in a specific way to be added as an authentication header, and I'm not going to document here how. Seekers will find. (hint: it's bzip2).

Shameless plug: My unpublished and terrible app "obs-master" can do that from a GUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants