ray/doc/dev/RELEASE_PROCESS.rst

179 lines
8.4 KiB
ReStructuredText
Raw Normal View History

2018-08-29 00:06:33 -07:00
Release Process
===============
This document describes the process for creating new releases.
2019-09-26 10:30:37 -07:00
1. **Create a release branch:** Create the branch from the desired commit on master
In order to create the branch, locally checkout the commit ID i.e.,
``git checkout <hash>``. Then checkout a new branch of the format
``releases/<release-version>``. Then push that branch to the ray repo:
``git push upstream releases/<release-version>``.
2018-08-29 00:06:33 -07:00
2. **Update the release branch version:** Push a commit directly to the
newly-created release branch that increments the Python package version in
python/ray/__init__.py and src/ray/raylet/main.cc. See this
`sample commit for bumping the release branch version`_.
2019-09-26 10:30:37 -07:00
3. **Update the master branch version:**
For a new minor release (e.g., 0.7.0): Create a pull request to
increment the dev version in of the master branch. See this
`sample PR for bumping a minor release version`_. **NOTE:** Not all of
the version numbers should be replaced. For example, ``0.7.0`` appears in
this file but should not be updated.
For a new micro release (e.g., 0.7.1): No action is required.
4. **Testing:** Before releasing, the following sets of tests should be run.
The results of each of these tests for previous releases are checked in
under ``doc/dev/release_tests``, and should be compared against to identify
any regressions.
1. Long-running tests
.. code-block:: bash
ray/ci/long_running_tests/README.rst
Follow the instructions to kick off the tests and check the status of the workloads
These tests should run for at least 24 hours (printing new iterations and CPU load
stable in the AWS console).
2. Multi-node regression tests
Follow the same instruction as long running stress tests. The large scale distributed
regression tests identify potential performance regression in distributed environment.
The following test should be ran:
- ``ci/regression_test/rllib_regression-tests`` run the compact regression test for rllib.
- ``ci/regression_test/rllib_stress_tests`` run multinode 8hr IMPALA trial.
- ``ci/regression_test/stress_tests`` contains two tests: ``many_tasks`` and ``dead_actors``.
Each of the test runs on 105 spot instances.
Make sure that these pass. For the RLlib regression tests, see the comment on the
file for the pass criteria. For the rest, it will be obvious if they passed.
This will use the autoscaler to start a bunch of machines and run some tests.
2019-07-15 14:46:54 -07:00
**Caution!**: By default, the stress tests will require expensive GPU instances.
The summaries printed by each test should be checked in under
``doc/dev/release_logs/<version>``.
2019-09-26 10:30:37 -07:00
3. Microbenchmarks
2019-09-26 10:30:37 -07:00
Run the ``ci/microbenchmark`` with the commit. Under the hood, the session will
run `ray microbenchmark` on an `m4.16xl` instance running `Ubuntu 18.04` with `Python 3`
to get the latest microbenchmark numbers.
2019-12-17 15:56:50 -08:00
The results should be checked in under ``doc/dev/release_logs/<version>``.
2019-09-26 10:30:37 -07:00
5. **Resolve release-blockers:** If a release blocking issue arises, there are
two ways the issue can be resolved: 1) Fix the issue on the master branch and
cherry-pick the relevant commit (using ``git cherry-pick``) onto the release
branch (recommended). 2) Revert the commit that introduced the bug on the
release branch (using ``git revert``), but not on the master (not recommended).
These changes should then be pushed directly to the release branch.
6. **Create a GitHub release:** Create a `GitHub release`_. This should include
**release notes**. Copy the style and formatting used by previous releases.
Create a draft of the release notes containing information about substantial
changes/updates/bugfixes and their PR numbers. Once you have a draft, send it
out to other Ray developers (especially those who contributed heavily during
this release) for feedback. At the end of the release note, you should also
add a list of contributors. Make sure Ray, Tune, RLLib, Autoscaler are
capitalized correctly.
Run ``doc/dev/get_contributors.py`` to generate the list of commits corresponding
to this release and the formatted list of contributors.
You will need to provide a GitHub personal access token
(github.com -> settings -> developer settings -> personal access tokens).
.. code-block:: bash
# Must be run from inside the Ray repository.
pip install PyGitHub tqdm
python get_contributors.py --help
python get_contributors.py \
--access-token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--prev-release-commit="<COMMIT_SHA>" \
--curr-release-commit="<COMMIT_SHA>"
7. **Download all the wheels:** Now the release is ready to begin final
testing. The wheels are automatically uploaded to S3, even on the release
branch. To test, ``pip install`` from the following URLs:
2019-01-30 19:37:48 -08:00
.. code-block:: bash
export RAY_HASH=... # e.g., 618147f57fb40368448da3b2fb4fd213828fa12b
export RAY_VERSION=... # e.g., 0.7.0
# Linux Wheels
pip install -U https://s3-us-west-2.amazonaws.com/ray-wheels/releases/$RAY_VERSION/$RAY_HASH/ray-$RAY_VERSION-cp35-cp35m-manylinux1_x86_64.whl
pip install -U https://s3-us-west-2.amazonaws.com/ray-wheels/releases/$RAY_VERSION/$RAY_HASH/ray-$RAY_VERSION-cp36-cp36m-manylinux1_x86_64.whl
pip install -U https://s3-us-west-2.amazonaws.com/ray-wheels/releases/$RAY_VERSION/$RAY_HASH/ray-$RAY_VERSION-cp37-cp37m-manylinux1_x86_64.whl
# Mac Wheels
pip install -U https://s3-us-west-2.amazonaws.com/ray-wheels/releases/$RAY_VERSION/$RAY_HASH/ray-$RAY_VERSION-cp35-cp35m-macosx_10_13_intel.whl
pip install -U https://s3-us-west-2.amazonaws.com/ray-wheels/releases/$RAY_VERSION/$RAY_HASH/ray-$RAY_VERSION-cp36-cp36m-macosx_10_13_intel.whl
pip install -U https://s3-us-west-2.amazonaws.com/ray-wheels/releases/$RAY_VERSION/$RAY_HASH/ray-$RAY_VERSION-cp37-cp37m-macosx_10_13_intel.whl
8. **Upload to PyPI Test:** Upload the wheels to the PyPI test site using
``twine``.
2018-08-29 00:06:33 -07:00
.. code-block:: bash
# Downloads all of the wheels to the current directory.
2020-03-27 11:14:15 -07:00
RAY_VERSION=<version> RAY_HASH=<commit_sha> bash download_wheels.sh
2018-08-29 00:06:33 -07:00
# Will ask for your PyPI test credentials and require that you're a maintainer
# on PyPI test. If you are not, ask @robertnishihara to add you.
pip install twine
twine upload --repository-url https://test.pypi.org/legacy/ *.whl
2018-08-29 00:06:33 -07:00
Test that you can install the wheels with pip from the PyPI test repository:
2018-08-29 00:06:33 -07:00
.. code-block:: bash
# First install ray normally because installing from test.pypi.org won't
# be able to install some of the other dependencies.
pip install ray
pip uninstall ray
2018-08-29 00:06:33 -07:00
pip install --index-url https://test.pypi.org/simple/ ray
Then start Python, make sure you can ``import ray`` and run some simple Ray
scripts. Make sure that it is finding the version of Ray that you just
installed by checking ``ray.__version__`` and ``ray.__file__``.
2020-01-28 14:14:33 -08:00
Do this at least for MacOS and Linux.
2018-08-29 00:06:33 -07:00
9. **Upload to PyPI:** Now that you've tested the wheels on the PyPI test
2018-08-29 00:06:33 -07:00
repository, they can be uploaded to the main PyPI repository. Be careful,
**it will not be possible to modify wheels once you upload them**, so any
mistake will require a new release.
2018-08-29 00:06:33 -07:00
.. code-block:: bash
# Will ask for your real PyPI credentials and require that you're a maintainer
# on real PyPI. If you are not, ask @robertnishihara to add you.
twine upload --repository-url https://upload.pypi.org/legacy/ *.whl
2018-08-29 00:06:33 -07:00
Now, try installing from the real PyPI mirror. Verify that the correct version is
installed and that you can run some simple scripts.
2018-08-29 00:06:33 -07:00
.. code-block:: bash
pip install -U ray
10. **Create a point release on readthedocs page:** In the `read the docs project page`_,
mark the release branch as "active" so there is a point release for the documentation.
Add @richardliaw to add you if you don't have access.
11. **Improve the release process:** Find some way to improve the release
process so that whoever manages the release next will have an easier time.
.. _`sample PR for bumping a minor release version`: https://github.com/ray-project/ray/pull/6303
.. _`sample commit for bumping the release branch version`: https://github.com/ray-project/ray/commit/a39325d818339970e51677708d5596f4b8f790ce
.. _`GitHub release`: https://github.com/ray-project/ray/releases
.. _`read the docs project page`: https://readthedocs.org/projects/ray/