From 700cc13e3def87b7c93c527b2e95098fd6447462 Mon Sep 17 00:00:00 2001 From: wdrussell2015 <43426024+wdrussell2015@users.noreply.github.com> Date: Tue, 5 Dec 2023 10:50:34 -0500 Subject: [PATCH] docs: updated readme for 2u/release contributions (#3927) docs: add decision record for master branch split --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++ README.rst | 6 ++- docs/decisions/0008-master-branch-split.rst | 52 +++++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 docs/decisions/0008-master-branch-split.rst diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 18f93f3dc5e..9b86d1444f1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,7 @@ +# ⛔️ MAIN BRANCH WARNING! 2U EMPLOYEES must make branches against the 2u/main BRANCH + +- [ ] I have checked the branch to which I would like to merge. + # ⛔️ DEPRECATION WARNING **This repository is deprecated and in maintainence-only operation while we work on a replacement, please see [this announcement](https://discuss.openedx.org/t/deprecation-removal-ecommerce-service-depr-22/6839) for more information.** diff --git a/README.rst b/README.rst index c9e3b80f814..0362f1987fb 100644 --- a/README.rst +++ b/README.rst @@ -30,9 +30,11 @@ The code in this repository is licensed under version 3 of the AGPL unless other How To Contribute ----------------- -Anyone merging to this repository is expected to `release and monitor their changes `__; if you are not able to do this DO NOT MERGE, please coordinate with someone who can to ensure that the changes are released. +Notice: Internal 2U contributions should be made against the ``2u/main`` branch. Open source contributions should continue to be made against the ``master`` branch. -Please also read `How To Contribute `__. +Anyone merging to the ``2u/main`` branch of this repository is expected to `release and monitor their changes `__ (2U-private link); if you are not able to do this DO NOT MERGE, please coordinate with someone who can to ensure that the changes are released. + +Please also read `How To Contribute `__. Even though it was written with ``edx-platform`` in mind, these guidelines should be followed for Open edX code in general. Reporting Security Issues ------------------------- diff --git a/docs/decisions/0008-master-branch-split.rst b/docs/decisions/0008-master-branch-split.rst new file mode 100644 index 00000000000..8c8bcecc0d2 --- /dev/null +++ b/docs/decisions/0008-master-branch-split.rst @@ -0,0 +1,52 @@ +8. Master branch split from 2u/main +------------------------------------------------------------ + +Status +------ + +Accepted + +Context +------- + +Both 2U and the Open edX community use ecommerce's master branch for releases. Occasionally, changes +specific to 2U's business case are merged into code, which also influences the structure +of the code that the community runs, even if the changes are not relevant or beneficial +to the community at large. + +Additionally, 2U has internal compliance checks that can slow the release cycle of +major changes to ecommerce (for example, the upgrade to Django 4.2). This puts the Open edX community at risk of releasing +with deprecated packages. + +Decision +-------- + +A new protected branch will be created named "2u/main", which 2U will continue to use +as its own main branch, while leaving the "master" branch for use by the community. + +Consequences +------------ + +This allows the community to move forward with contributions on "master" without risk of +breaking functionality for 2U or 2U committing changes to "master" that are irrelevant or +otherwise inappropriate for the community's use case. + +Because protected branches in ecommerce require a user with Write access to the repository, +the "master" branch will now require someone from the community to review and manage +code contributions to that branch. + +Rejected Alternatives +--------------------- + +Repo fork +~~~~~~~~~ + +Why not fork the repo entirely? 2U and the community use a shared set of tools for +working in development environments. While working from separate branches and repo +forks are functionally equivalent, working in separate branches allows for +minimal updates to shared tooling to support this change. One can simply checkout a +branch name, without needing the tooling to be updated to know about non-openedx +git remotes. + +This is not a one way door, and if we decide later the a proper repo fork is a better +solution, then we are open to making adjustments.