Build Service/Concepts/Submit Request
From openSUSE
Contents |
Submit Request
This page discusses the way how a user can request to submit changes from a package into another package (most likely in a different project). One of the most expected use of this are community contributions into the Factory distribution that need review. Note that this only applies if the user does not have write permissions in the target project.
The user story
Mary finds a package that she finds not optimal and she wants to improve it. She checks out project and package and works on it. Her change builds nicely on her local system and she find the change very usefull.
She types in osc commit (or similar for other clients). This succeeds on her own projects but would fail on a project where she has no write permission.
Instead of failing the client asks if she wants to create a submit request that asks the owner of the patched package to consider her changes. She can answer yes or no, if yes, a copy of the checked out package is created and a submit request is generated. It is up to the maintainer of the source package to accept or decline the request.
After the request is accepted, Mary's branch package disappears automatically because it now lives in the source package.
Under the hood
In client, on the API and/or the backend the following steps are performed:
On checkout of the source package, a potentially existing package in a development project is considered (API/Backend).
On save (or commit in osc terminology) the API checks write permission in the source package. If there is no write permission, user intervention is needed to decide if a submit request should be created. If so, the API creates a branch project in the home project of the user:
home:mary:branches
A project according to the source project is created and the needed repos are added. The client copies the changed sources into the package in the branch project. The project starts to build on the server.
Additionally the API creates a submit request automatically according to the specification below.
API call definition
In case the user decides to propose his changed branch project to be merged into the original package a Submit Request needs to be created by the client in
/request/
The Submit Request extends the generic Request with the following information element in front of the general information:
<submit>
<source project=<project> package=<package> />
<target project=<package> package=<package> />
</submit>
These information provides information about the source- and target package. It means that the source is the package which was changed by the user and target is the project that is asked to take the patch.
A submit request must be POSTed to /request on the API. All other mechanisms are as described on the generic Request page.

