[ovirt] #104: accept only backports into stable branches

#104: accept only backports into stable branches ----------------------+----------------------- Reporter: danken | Owner: infra@… Type: task | Status: new Priority: major | Milestone: oVirt 3.4 Component: Jenkins | Version: Severity: High | Keywords: Blocked By: | Blocking: ----------------------+----------------------- A stable branch, such as ovirt-3.3, should only carry code from the master branch, unless we have a very good reason. Please add a bot verifying that. Each branch should have its "controller" branch defined. The "controller" branch of ovirt-3.3 is "master". If we create an ovirt-3.3.4 branch, its controller is ovirt.3.3. When a patch is submitted to a branch, its Change-Id is to be checked. The same Change-Id should exist in the controller branch. There should be an exception to this general rule: if a patch is submitted to the ovirt-3.3.4 branch and its commit message has a line saying Label: ovirt-3.3.4-only we should not require that it exists on the controller branch. This is useful for cases where the specific branch is broken. -- Ticket URL: <https://fedorahosted.org/ovirt/ticket/104> ovirt <http://www.ovirt.org/> oVirt - virtualization made easy.

#104: accept only backports into stable branches ---------------------+------------------------ Reporter: danken | Owner: infra@… Type: task | Status: new Priority: major | Milestone: oVirt 3.4 Component: Jenkins | Version: Severity: High | Resolution: Keywords: | Blocked By: Blocking: | ---------------------+------------------------ Comment (by ekohl): It is slightly inconvenient that at least for ovirt-engine there are branches and tags with the same name. That said, a start: {{{ #!sh CHANGE_ID=$(git show | awk '/Change-Id:/ { print $2 }') if [ -n "$CHANGE_ID" ] ; then CONTROLLER=$(git symbolic-ref --short HEAD | sed 's|^heads/\(.\+\)\.[0-9]\+|\1|') CONTROLLER_BRANCH=$(git rev-parse --verify --verify origin/$CONTROLLER 2> /dev/null) OUTPUT=$(git log ${CONTROLLER_BRANCH:-master} --oneline --grep ="Change-Id: $CHANGE_ID") if [ -n "$OUTPUT" ] ; then echo "Change-Id $CHANGE_ID found in $OUTPUT" else echo "Change-Id $CHANGE_ID not found in ${CONTROLLER_BRANCH:-master}!" exit 1 fi else echo "No Change-Id found" fi }}} It needs a check for {{{Label: $BRANCH-only}}} and I'm not yet sure how we reliably check all commits are valid without checking all commits every time. Maybe we can use {{{git log master..HEAD}}}, or was it {{{...}}} for the strictly only in HEAD but not in master? -- Ticket URL: <https://fedorahosted.org/ovirt/ticket/104#comment:1> ovirt <http://www.ovirt.org/> oVirt - virtualization made easy.

#104: accept only backports into stable branches ---------------------+------------------------ Reporter: danken | Owner: infra@… Type: task | Status: new Priority: major | Milestone: oVirt 3.4 Component: Jenkins | Version: Severity: High | Resolution: Keywords: | Blocked By: Blocking: | ---------------------+------------------------ Comment (by danken): Replying to [comment:1 ekohl]:
It needs a check for {{{Label: $BRANCH-only}}} and I'm not yet sure how
we reliably check all commits are valid without checking all commits every time. Maybe we can use {{{git log master..HEAD}}}, or was it {{{...}}} for the strictly only in HEAD but not in master? Why do we need to check all commits? If the current commit message has "Label: $BRANCH-only", it should have a free pass into $BRANCH. {{{ git show | grep -q -e "^ Label: $BRANCH-only\$" }}} should be enough. -- Ticket URL: <https://fedorahosted.org/ovirt/ticket/104#comment:2> ovirt <http://www.ovirt.org/> oVirt - virtualization made easy.

#104: accept only backports into stable branches ---------------------+------------------------ Reporter: danken | Owner: infra@… Type: task | Status: new Priority: major | Milestone: oVirt 3.4 Component: Jenkins | Version: Severity: High | Resolution: Keywords: | Blocked By: Blocking: | ---------------------+------------------------ Comment (by ekohl): Replying to [comment:2 danken]:
Replying to [comment:1 ekohl]:
It needs a check for {{{Label: $BRANCH-only}}} and I'm not yet sure
how we reliably check all commits are valid without checking all commits every time. Maybe we can use {{{git log master..HEAD}}}, or was it {{{...}}} for the strictly only in HEAD but not in master?
Why do we need to check all commits?
You're right, if the job runs per-change before merging the only the last commit is sufficient. That makes it a lot easier.
If the current commit message has "Label: $BRANCH-only", it should have a free pass into $BRANCH.
{{{ git show | grep -q -e "^ Label: $BRANCH-only\$" }}}
should be enough. I never said it was hard :)
-- Ticket URL: <https://fedorahosted.org/ovirt/ticket/104#comment:3> ovirt <http://www.ovirt.org/> oVirt - virtualization made easy.
participants (1)
-
ovirt