blob: f1ff497aa185cff7a129267c76e6d8e604e9a812 [file] [log] [blame]
Paul Belanger82595102013-04-08 11:30:51 -04001Zuul
2====
James E. Blaird65e22d2012-06-01 13:50:21 -07003
James E. Blair4c3e0a32016-10-12 14:15:20 -07004Zuul is a project gating system developed for the OpenStack Project.
James E. Blaird65e22d2012-06-01 13:50:21 -07005
James E. Blair75260742016-10-12 15:12:06 -07006We are currently engaged in a significant development effort in
7preparation for the third major version of Zuul. We call this effort
8`Zuul v3`_ and it is described in more detail below.
9
Paul Belanger82595102013-04-08 11:30:51 -040010Contributing
11------------
James E. Blaird65e22d2012-06-01 13:50:21 -070012
Anita Kuno84ed8cd2013-12-17 10:14:45 -050013To browse the latest code, see: https://git.openstack.org/cgit/openstack-infra/zuul/tree/
14To clone the latest code, use `git clone git://git.openstack.org/openstack-infra/zuul`
James E. Blaird65e22d2012-06-01 13:50:21 -070015
Michael Krotscheck8c81dc32014-11-11 15:59:06 -080016Bugs are handled at: https://storyboard.openstack.org/#!/project/679
James E. Blaird65e22d2012-06-01 13:50:21 -070017
James E. Blair4c3e0a32016-10-12 14:15:20 -070018Code reviews are, as you might expect, handled by gerrit at
19https://review.openstack.org
James E. Blaird65e22d2012-06-01 13:50:21 -070020
James E. Blair4c3e0a32016-10-12 14:15:20 -070021Use `git review` to submit patches (after creating a Gerrit account
22that links to your launchpad account). Example::
James E. Blaird65e22d2012-06-01 13:50:21 -070023
24 # Do your commits
Paul Belanger82595102013-04-08 11:30:51 -040025 $ git review
Ori Livneh7191ee82013-05-02 19:13:53 -070026 # Enter your username if prompted
James E. Blair75260742016-10-12 15:12:06 -070027
28Zuul v3
29-------
30
31The Zuul v3 effort involves significant changes to Zuul, and its
32companion program, Nodepool. The intent is for Zuul to become more
33generally useful outside of the OpenStack community. This is the best
34way to get started with this effort:
35
361) Read the Zuul v3 spec: http://specs.openstack.org/openstack-infra/infra-specs/specs/zuulv3.html
37
38 We use specification documents like this to describe large efforts
39 where we want to make sure that all the participants are in
40 agreement about what will happen and generally how before starting
41 development. These specs should contain enough information for
42 people to evaluate the proposal generally, and sometimes include
43 specific details that need to be agreed upon in advance. They are
44 living documents which can change as work gets underway. However,
45 every change or detail does not need to be reflected in the spec --
46 most work is simply done with patches (and revised if necessary in
47 code review).
48
492) Read the Nodepool build-workers spec: http://specs.openstack.org/openstack-infra/infra-specs/specs/nodepool-zookeeper-workers.html
50
513) Review any proposed updates to these specs: https://review.openstack.org/#/q/status:open+project:openstack-infra/infra-specs+topic:zuulv3
52
53 Some of the information in the specs may be effectively superceded
54 by changes here, which are still undergoing review.
55
564) Read documentation on the internal data model and testing: http://docs.openstack.org/infra/zuul/feature/zuulv3/internals.html
57
58 The general philosophy for Zuul tests is to perform functional
59 testing of either the individual component or the entire end-to-end
60 system with external systems (such as Gerrit) replaced with fakes.
61 Before adding additional unit tests with a narrower focus, consider
62 whether they add value to this system or are merely duplicative of
63 functional tests.
64
655) Review open changes: https://review.openstack.org/#/q/status:open+branch:feature/zuulv3
66
67 We find that the most valuable code reviews are ones that spot
68 problems with the proposed change, or raise questions about how
69 that might affect other systems or subsequent work. It is also a
70 great way to stay involved as a team in work performed by others
71 (for instance, by observing and asking questions about development
72 while it is in progress). We try not to sweat the small things and
73 don't worry too much about style suggestions or other nitpicky
74 things (unless they are relevant -- for instance, a -1 vote on a
75 change that introduces a yaml change out of character with existing
76 conventions is useful because it makes the system more
77 user-friendly; a -1 vote on a change which uses a sub-optimal line
78 breaking strategy is probably not the best use of anyone's time).
79
806) Join #zuul on Freenode. Let others (especially jeblair who is
81 trying to coordinate and prioritize work) know what you would like
82 to work on.
83
847) TODOv3(jeblair): Coming soon: check storyboard for status of
85 current work items. We do not have a list of work items yet, but
86 we will soon.
87
88Once you are up to speed on those items, it will be helpful to know
89the following:
90
91* Zuul v3 includes some substantial changes to Zuul, and in order to
92 implement them quickly and simultaneously, we temporarily disabled
93 most of the test suite. That test suite still has relevance, but
94 tests are likely to need updating individually, with reasons ranging
95 from something simple such as a test-framework method changing its
96 name, to more substantial issues, such as a feature being removed as
97 part of the v3 work. Each test will need to be evaluated
98 individually. Feel free to, at any time, claim a test name on this
99 etherpad and work on re-enabling it:
100 https://etherpad.openstack.org/p/zuulv3
101
102* Because of the importance of external systems, as well as the number
103 of internal Zuul components, actually running Zuul in a development
104 mode quickly becomes unweildy (imagine uploading changes to Gerrit
105 repeatedly while altering Zuul source code). Instead, the best way
106 to develop with Zuul is in fact to write a functional test.
107 Construct a test to fully simulate the series of events you want to
108 see, then run it in the foreground. For example::
109
110 .tox/py27/bin/python -m testtools.run tests.test_scheduler.TestScheduler.test_jobs_launched
111
112 See TESTING.rst for more information.
113
114* There are many occasions, when working on sweeping changes to Zuul
115 v3, we left notes for future work items in the code marked with
116 "TODOv3". These represent potentially serious missing functionality
117 or other issues which must be resolved before an initial v3 release
118 (unlike a more conventional TODO note, these really can not be left
119 indefinitely). These present an opportunity to identify work items
120 not otherwise tracked. The names associated with TODO or TODOv3
121 items do not mean that only that person can address them -- they
122 simply reflect who to ask to explain the item in more detail if it
123 is too cryptic. In your own work, feel free to leave TODOv3 notes
124 if a change would otherwise become too large or unweildy.