Update depends-on syntax

We now support a new URL-based depends-on syntax, and the old
syntax is deprecated.

Change-Id: I6b4230dd189ab4b63e19c99f356ce031decaad98
This commit is contained in:
James E. Blair 2018-01-24 08:40:52 -08:00
parent eece5f491e
commit e1d2ea7c72
2 changed files with 24 additions and 29 deletions

View File

@ -674,13 +674,13 @@ When writing the commit message for this change, make this change
depend on the project creation change by including a link to its
Change-ID (from the previous step)::
Depends-On: <Gerrit Change-Id of project-config change>
Depends-On: <Gerrit URL of project-config change>
Then, go back to the project-config change and add a link to the
Change-ID of the governance change in the project-config commit
message::
Needed-By: <Gerrit Change-Id of governance change>
Needed-By: <Gerrit URL of governance change>
so that reviewers know that the governance change has been created.
@ -1392,12 +1392,13 @@ The first step of doing a rename is understanding the required
governance changes needed by the rename. You can use the following
criteria:
For a project being added to existing official OpenStack project: Create an
``openstack/governance`` change and add a "Depends-On: project-changeID" of the
change you make in the following steps to the commit message, and add a comment
in the ``openstack-infra/project-config`` change that references the governance
change. You will also make sure the PTL has expressed approval for the addition
in some way.
For a project being added to existing official OpenStack project:
Create an ``openstack/governance`` change and add a "Depends-On:
project-change-url" of the change you make in the following steps to
the commit message, and add a comment in the
``openstack-infra/project-config`` change that references the
governance change. You will also make sure the PTL has expressed
approval for the addition in some way.
When preparing to rename a project, begin by making changes to the
files in the ``openstack-infra/project-config`` repository related

View File

@ -662,10 +662,13 @@ does not get merged accidentally before the manual setup is done.
If your change has a dependency on a change in another repository,
you can use cross-repo dependencies (CRD) in Zuul:
* To use them, include "Depends-On: <gerrit-change-id>" in the footer
of your commit message. Use the full Change-ID ('I' + 40
characters). A patch can also depend on multiple changes as
explained in :ref:`multiple_changes`.
* To use them, include "Depends-On: <gerrit-change-url>" in the footer
of your commit message. Use the permalink of the change. This is
output by Gerrit when running git-review on the change, or you can
find it in the top-left corner of the Gerrit web interface. Where
it says "Change ###### - Needs ..." the number is the link to the
change; you can copy and paste that URL. A patch can also depend on
multiple changes as explained in :ref:`multiple_changes`.
* These are one-way dependencies only -- do not create a cycle.
@ -713,18 +716,11 @@ its own red or green dot for its test.
Multiple Changes
^^^^^^^^^^^^^^^^
A Gerrit change ID may refer to multiple changes (on multiple branches
of the same project, or even multiple projects). In these cases, Zuul
will treat all of the changes with that change ID as dependencies. So
if you say that a tempest change Depends-On a change ID that has
changes in nova master and nova stable/juno, then when testing the
tempest change, both nova changes will be applied, and when deciding
whether the tempest change can merge, both changes must merge ahead of
it.
A change may depend on more than one Gerrit change ID as well. So it is
possible for a change in tempest to depend on a change in devstack and a
change in nova. Simply add more "Depends-On:" lines to the footer.
A Gerrit URL refers to a single change on a single branch, so if your
change depends on multiple changes, or the same change on multiple
branches of a project, you will need to explicitly list each URL.
Simply add another "Depends-On:" line to the footer for each
additional change.
Cycles
^^^^^^
@ -766,11 +762,9 @@ is not visible otherwise especially in these cases:
Do not add a Depends-On an abandoned change, your change will never
merge.
If you backport a change to another branch, the gerrit change ID stays
the same. If you add a Depends-On using the Gerrit change ID of the
patch that subsequently was backported, the patch with the Depends-On
is now also dependent on the backported change. This might be
desirable for some changes and a surprise for others.
If you backport a change to another branch, it will recieve a new URL.
If you need to additionally depend on the backported change, you will
need to amend the commit message to add another Depends-On footer.
A change that is dependent on another can be approved before the
dependent change merges. If the repositories share the gate queue, it