[openstack-dev] A question about atomicity of repository commits

Robert Collins robertc at robertcollins.net
Thu Oct 31 20:51:33 UTC 2013


On 1 November 2013 09:20, Birdsall, Dave <dave.birdsall at hp.com> wrote:
> Hi,
>
> I'm new to the Openstack community. I have what is probably a naïve question.
>
> Suppose source code for a project is in Git repository A, while the Jenkins test suite for it is in Git repository B.
>
> First question: Does this happen in Openstack? (For example, are there nova tests in the tempest repository that get executed in Jenkins when nova is changed?)

Yes, in the devstack-gate-*-tempest jobs.

> Given my assumption above, suppose I'm a contributor and I want to change some source in repository A. However, my source change affects the test results of a test in repository B. So I want to change that as well.
>
> My understanding is that I'd clone both repositories, and commit changes to each independently, and each would go to Gerrit as a separate change.

Yes.

> Second question: How does one handle the chicken-and-egg problem? If the source change to A goes through Jenkins first, the automated tests would fail. But if the test change to B goes through Jenkins first, it would also fail because the old code in A has the old behavior.

There are a few nuances here.

Firstly, tests in separate repositories are usually loosely coupled,
so most such changes should not need changes to tests in concert with
the code in the other repo.

Secondly, we hold backwards compatibility as an important value, so
where such changes might need changes in concert, we often will choose
to make the change backwards compatible, avoiding any issue.

In the rare care where we can't make it backwards compatible, and the
test will be broken, we can disable the test, land the new change,
enable the test, or - better - make the test handle both behaviours,
land the new change, make the test only handle the new behaviour.

> Thanks and kind regards,
>
> Dave
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



-- 
Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Converged Cloud



More information about the OpenStack-dev mailing list