-
Notifications
You must be signed in to change notification settings - Fork 8
docs: Add frontend branching strategy ADR #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
arbrandes
wants to merge
1
commit into
openedx:main
Choose a base branch
from
arbrandes:frontend-branching-strategy-adr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| ########################################### | ||
| Frontend Branching and Publication Strategy | ||
| ########################################### | ||
|
|
||
| Status | ||
| ====== | ||
|
|
||
| Proposed | ||
|
|
||
| Context | ||
| ======= | ||
|
|
||
| Developers need a rallying point for integration of new, untested features. | ||
| Consider design tokens being developed concurrently with frontend-base. It | ||
| would've been desirable to have a public, protected branch that evolved | ||
| linearly (no rebases) and included the latest version of both features not only | ||
| so their developers could have the time to make them work well with each other, | ||
| but where they had enough leeway to push the envelope and fix bugs without | ||
| having to immediately ship the code to thousands of users. | ||
|
|
||
| This branch is commonly called "master" or "main" for repositories that follow | ||
| the "main is unstable" development strategy, but this is not universal: many | ||
| projects call this branch "next", "develop", or "alpha". What is almost | ||
| universal, however, is the existence of at least one branch that serves this | ||
| purpose. | ||
|
|
||
| In the Open edX org, main branches have been, historically, deemed stable: | ||
| every single commit that lands has to be deemed production ready. This is | ||
| counter to the "main is unstable" strategy. Furthermore, there is no "next" | ||
| branch in most projects, either. This needs to be addressed. | ||
|
|
||
| Decisions and Consequences | ||
| ========================== | ||
|
|
||
| 1. "main is unstable" | ||
| --------------------- | ||
|
|
||
| From this point onwards, frontend repositories' default branches (main or | ||
| master) are deemed unstable. This has two major consequences: | ||
|
|
||
| 1. Using the main branch in production is not supported. In fact, we recommend against it! | ||
| 2. The DEPR process, fast or slow, does not apply to it; breaking changes can | ||
| and will land with no warning. | ||
|
|
||
| Notably, though, the main branch retains the following properties: | ||
|
|
||
| 1. New features should be developed for and merge to it before any other | ||
| branches; | ||
| 2. To facilitate collaboration, the branch is never rebased. | ||
|
|
||
|
|
||
| 2. Publication of the "main" branch | ||
| ----------------------------------- | ||
|
|
||
| A repository's main branch will be published semantically to NPM with on an | ||
| "alpha" prerelease tag, with a monotonically incremented version number. For | ||
| instance: | ||
|
|
||
| frontend-base@2.0.0-alpha4 | ||
| frontend-app-authn@2.0.0-alpha2 | ||
|
|
||
|
|
||
| 3. Creation and publication of release branches | ||
| ----------------------------------------------- | ||
|
|
||
| When the main branch of a given frontend repository is deemed ready for | ||
| widespread use, a new "n.x" branch is cut from it, where "n" is the next major | ||
| version of the package. The ".x" is literal. For instance: | ||
|
|
||
| 1.x | ||
| 2.x | ||
|
|
||
| These branches are also published to NPM semantically, with no breaking changes | ||
| being introduced: | ||
|
|
||
| frontend-base@1.0.5 | ||
| frontend-app-authn@1.4.3 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not married to "alpha". It could be "main", or "next", or anything else, really (as long as every frontend app repo follows the same pattern, of course).