ReleaseEngineering/How To/Update RelengAPI

From MozillaWiki
< ReleaseEngineering‎ | How To
Revision as of 15:10, 30 September 2014 by Callek (talk | contribs) (→‎Shipping It: new tag scheme since we're not overlapping packages and repos now)
Jump to navigation Jump to search

RelengAPI is composed of a bunch of different Python distributions. You can see the current versions at https://api.pub.build.mozilla.org/versions.

So, how do you update one of those?

Cautions

Will your change

require a DB change
If so, you probably want to make that change beforehand, especially if it's as simple as `relengapi createdb`. If the change is incompatible, you'll probably need a change window.
make an incompatible API change
If so, you should endeavor to make it non-incompatible, and otherwise announce the change to any users beforehand.

Shipping It

In whatever distribution you're working on, bump the version number (in `setup.py`), git tag it with the version, e.g., `2.3.4`, and push.

Build an sdist tarball:

python setup.py sdist

Upload the resulting tarball (in `dist/`) to relengapi:

scp dist/relengapi-mapper-2.3.4.tar.gz <your user>@relengwebadm.private.scl3.mozilla.com:/tmp

and put it in place on relengwebadm as root

mv /tmp/relengapi-mapper-2.3.4.tar.gz /mnt/netapp/relengweb/pypi/pub

Please note the files will still be owned by your user, so you should make it universally readable:

chmod a+r /mnt/netapp/relengweb/pypi/pub/relengapi-mapper-2.3.4.tar.gz

Also on relengwebadm, cd to the source directory for staging or production

cd /data/releng-stage/src/relengapi
cd /data/releng/src/relengapi

and edit requirements.txt to specify the new version. Then

./update

will upgrade the packages, build the docs, and deploy to the webheads.