These are the considerations and steps for a new scriptworker release.
Ideally, code changes should follow clean architecture best practices
When adding new functions, classes, or files, or when changing function arguments, please add or modify the docstrings.
Tests and test coverage¶
Scriptworker has 100% test coverage, and we’d like to keep it that way.
Run tests locally via tox to make sure the tests pass, and we still have 100% coverage.
Scriptworker follows semver. Essentially, increment the
- MAJOR version when you make incompatible API changes,
- MINOR version when you add API functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
If you’re changing any dependencies, please update
If you add change the list of files that need to be packaged (either adding new files, or removing previous packaged files), modify
It’s good practice to keep
requirements-test-prod.txt up to date. To do so:
# Using the local venv python>=3.5, pip install dephash dephash gen requirements-dev.txt > requirements-prod.txt dephash gen requirements-test-dev.txt > requirements-test-prod.txt
git diff will then show what has changed in the scriptworker dependencies since the last time dephash was run. Assuming we only add the new dependencies when tox is green, we have a last-known-good set of dependencies. Add these to the list of changes to commit.
scriptworker/version.py to set the
__version__ to the appropriate tuple. This is either a 3- or 4-part tuple, e.g.
# 0.10.0a1 __version__ = (0, 10, 0, "alpha1") # 1.0.0b2 __version__ = (1, 0, 0, "beta2") # 0.9.3 __version__ = (0, 9, 3)
# Using the local venv python>=3.5, python scriptworker/version.py
This will update
version.json. Verify both files look correct.
To enable gpg signing in git,
- you need a gpg keypair
- you need to set your
- If you want to specify a specific gpg executable, specify your
Tag and sign!
# make sure you've committed your changes first! VERSION=0.9.0 git tag -s $VERSION -m"$VERSION"
# By default this will push the new tag to origin; make sure the tag gets pushed to # mozilla-releng/scriptworker git push --tags
Someone with access to the scriptworker package on
pypi.python.org needs to do the following:
# You may hit problems with this using py>=35? python setup.py register sdist upload
That creates the new version in pypi, creates the source tarball, and uploads it.
Connect to Releng VPN.
Copy the tarball from
scp dist/scriptworker-$VERSION.tar.gz releng-puppet2.srv.releng.scl3.mozilla.com: ssh releng-puppet2.srv.releng.scl3.mozilla.com cd /data/python/packages-3.5 sudo mv ~/scriptworker-$VERSION.tar.gz .
Bump the scriptworker version in the appropriate scriptworker instance puppet configs.
If desired, test in your user environment first. Otherwise, get review, land, and merge to production.