Testing cross project related patches in gate before merging!

A few months back I was working on a blueprint with Dan Smith which required changes to be made to three different projects (neutron, nova, and python-novaclient). One of the tricks that we came up with was modifying devstack in order to run all of our patches through the gate to test the cross project integration before the patches merged. We found this to be super helpful and allowed us to shake out several bugs pretty quickly that we wouldn’t have found until we started merging some of the patches. I’ve also found it useful a number of other times so I figured it would be good to share this tip in case others find it helpful. ¬†Here’s the patch set that we used to test the cross project related patches before merging https://review.openstack.org/#/c/78052/ ¬†(diff below).

diff --git a/stackrc b/stackrc
index 6bb6f37..21bfb8c 100644
--- a/stackrc
+++ b/stackrc
@@ -152,11 +152,11 @@ KEYSTONECLIENT_BRANCH=${KEYSTONECLIENT_BRANCH:-master}

# compute service
NOVA_REPO=${NOVA_REPO:-${GIT_BASE}/openstack/nova.git}
-NOVA_BRANCH=${NOVA_BRANCH:-master}
+NOVA_BRANCH=${NOVA_BRANCH:-"refs/changes/32/74832/23"}

# python client library to nova that horizon (and others) use
NOVACLIENT_REPO=${NOVACLIENT_REPO:-${GIT_BASE}/openstack/python-novaclient.git}
-NOVACLIENT_BRANCH=${NOVACLIENT_BRANCH:-master}
+NOVACLIENT_BRANCH=${NOVACLIENT_BRANCH:-"refs/changes/63/74763/8"}

# consolidated openstack python client
OPENSTACKCLIENT_REPO=${OPENSTACKCLIENT_REPO:-${GIT_BASE}/openstack/python-openstackclient.git}
@@ -200,7 +200,7 @@ PBR_BRANCH=${PBR_BRANCH:-master}

# neutron service
NEUTRON_REPO=${NEUTRON_REPO:-${GIT_BASE}/openstack/neutron.git}
-NEUTRON_BRANCH=${NEUTRON_BRANCH:-master}
+NEUTRON_BRANCH=${NEUTRON_BRANCH:-"refs/changes/41/78041/6"}

# neutron client
NEUTRONCLIENT_REPO=${NEUTRONCLIENT_REPO:-${GIT_BASE}/openstack/python-neutronclient.git}

As you can see above, devstack has a feature which allows you to set the branch that you want it to use which you can update to be the ref change from gerrit in order for it to pull your patch in.

Another place I used this this trick was here (https://review.openstack.org/#/c/94462/) which allowed me to test a tempest related change in conjunction with a glance change to confirm that they are working together before the tempest change is merged. Hopefully someone else finds this useful as well!

This entry was posted in openstack, Uncategorized. Bookmark the permalink.

One Response to Testing cross project related patches in gate before merging!

  1. Pingback: Dell Open Source Ecosystem Digest #49 - Dell TechCenter - TechCenter - Dell Community

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>