[openstack-dev] Navigating the ever changing OpenStack codebase
Ronald Bradford
me at ronaldbradford.com
Mon Apr 27 21:07:56 UTC 2015
Hi All,
I have recently become involved in OpenStack development. After installing
a few devstacks (and buying some H/W for my own physical cloud) I settled
into learning, reviewing and debugging the Python OpenStack Client (seemed
an easy access point). I even published a blog post just 7 days ago on my
experiences of Python Virtual Environments (something I was not yet
familiar with. Python being about 10+ on my list of known languages) at
http://ronaldbradford.com/blog/inconsistent-messaging-for-openstackclient-2015-04-20/.
Since then I've been debugging the code and preparing to write some test
cases for what I consider is a small bug, and understand how to work on
making a contribution to that.
Specifically, the following two code snippets have become SOP (Standard
Operating Procedure) jumping around VMs and projects and I suspect if you
are a developer of this project, something you are very familiar with.
git clone git://git.openstack.org/openstack/python-openstackclient
cd python-openstackclient
python tools/install_venv.py
source .venv/bin/activate
./run_tests.sh
Today I went to pickup where I left off last week and I find with an
updated code base and run_tests.sh didn't work. Infact it not longer exists
in this project. See https://review.openstack.org/#/c/177066/
I also found that tools/install_venv.py also gone, see
https://review.openstack.org/#/c/177086/
So, I'm back to knowing almost nil about running tests and debugging my own
code in under a week.
While I appreciate the OpenStack codebase is a growing and evolving project
and I'm still a relative newbie, I'm a little lost in the traceability and
the audibility of a structural change (in other words, how you run unit
tests and setup virtual environments). I suspect I'm missing something in
the information flow.
I'm on a few mailing lists, in a few IRC rooms, but I found this out by
looking at commit messages at
https://git.openstack.org/cgit/openstack/python-openstackclient/. I am
unfamiliar with what is the best place for looking at information to remain
informed.
run_tests.sh is a great example where there was no deprecation message and
there is indeed no backward compatibility. i.e. a run_test.sh that states:
"Run tox instead". This would at least not catch newbies off guard as much
when reading various documentation.
I also am lead to believe each project is self-governed (which is great as
it doesn't hobble projects by decision making) but that also leads to
different approaches on different projects. You don't want each project to
become siloed and difficult to navigate between them. There was a choice
many years ago to standardize on Python. There are choices on coding
standards. Does this exist for testing too?
As somebody new to OpenStack code base and willing to contribute, even the
"How to Contribute" (https://wiki.openstack.org/wiki/How_To_Contribute
) while helpful is a lot to tackle. This next step to getting to know the
code, and I've not found a great source for this. I found it better to just
get stuck in downloading, reading and running it. I looked back and came
across this link I did read some time ago --
http://docs.openstack.org/developer/cinder/devref/development.environment.html
Anybody able to provide recommendations for the new developer in the OS
space I would greatly appreciate it.
Having written this email draft I have delved into reading more about
testing. I started with the projects HACKING.rst which lead to
https://wiki.openstack.org/wiki/Testr and now
https://wiki.openstack.org/wiki/Testing. I should point out the last link
specifically states.
run_tests.sh
There is an older convention, as follows. Most projects have a shell
script, named "run_tests.sh", that runs the unit tests of that project. ...
So I've solved how to run tests the new way, took longer to write this
email. Still none the wiser how to run my code in a developer virtual
environment.
Regards
Ronald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150427/0d4aa3df/attachment.html>
More information about the OpenStack-dev
mailing list