Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Ensure the change is already merged to master and released to PyPI/NPM.

  2. Identify the top-level repository(s) that install this library – searching the package name in GitHub search can help. We’ll call these the dependent repositories.

  3. Determine whether you should upgrade the named release to the latest library version or cut a backports release. If you’re unsure, the latter is always safer.

    1. Check whether the library already has a backports branch for this release: git log XXX-backports (where XXX is the release name). If so, you should use this branch. Jump directly to Cutting a backports release.

    2. For each dependent repository, identify the version of the library that is used on open-release/XXX.master – we’ll call that version A. If different versions of the library are used across top-level repositories, take the smallest A.

    3. Identify the latest version of the library, which should have your change on it. Let’s call it B.

    4. Look at the changeset between A and B. You can do this with GitHub: https://github.com/openedx/<library_repo>/compare/<A>...<B>.

    5. Do you feel comfortable backporting that entire changeset to each dependent repository in the named release?

      1. If so, jump to Upgrade the named release to the latest library version.

      2. If not, continue on to Cut a backports release.

  4. Upgrade the named release to the latest library version:

    1. Open a PR in each dependent repository to upgrade the library to the latest version.

    2. Tag people for review & merge your PR(s).

    3. You’re all set!

  5. Cut a backports release:

    1. Check Does the library have a backports branch already?

      1. If so, check it out and update it:

        $ git switch XXX-backports && git pull

      2. If not, check out a version of the library that is similar to what dependent repositories are using for this named release.

      We’ll call this the base version.In the library repository, check out or create the backports branch:
      $ git switch XXX-backports && git pull # if the branch already exists
      1. From that version, create a named release branch: $ git switch -c XXX-backports && git push -u origin XXX-backports

      # if it doesn't
    2. Create your own branch, based on the backports branch:
      $ git switch -x <YOURNAME>/<BRANCHNAME>

    3. Cherry-pick the commits onto your branch. Do this for all your commits:
      $ git cherry-pick -x <COMMITHASH> ...

    4. Update the version number to one that is similar to the base current version on the backports branch, but not already taken by another release of the library. It should not exceed the latest library version number, because that would be confusing. Bumping the patch version is generally appropriate. Use your best judgement. We’ll call this the latest backports version.

    5. Push your branch:
      $ git push -u origin HEAD

    6. Make a pull request from your branch, using XXX-backports as the base. In your pull request description, mention the original pull request on master that you are copying, if you can.

    7. Tag people for review & merge your PR.

    8. Open a PR in each dependent repository to upgrade the library to the latest backports version. Tag people for review & merge your PR(s).

    9. You’re all set!

...