Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Commit 091f7a9

Browse files
committed
Update README.md
1 parent 8020a61 commit 091f7a9

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Branch versions(Part 1)
1+
## Branch versions(Part 1)
22

3-
This article introduces a software development paradigm, which has been implemented and used on Verizon Media Group's Video syndication teams for the past 3 years.
3+
This article introduces a software development paradigm, which has been implemented and used on Verizon Media Group's Video syndication teams for the past 3 years.
44

5-
The 'Branch versions' concept allows stakeholders to test and verify different code variants without affecting production.
5+
_Branch versions_ allow stakeholders to test and verify different code variants without affecting production.
66

77
On our teams, every code change, creates a branch version which allows product managers, QA teams and different customers to test and verify changes, without merging it to master.
88

@@ -14,35 +14,37 @@ Serving a branch version to a group of users with a POC can contribute ideas for
1414
2. A bug is reported - use branch versions to inspect, and before deploying the fix, assign the branch version to a user/PM/QA to verify the fix.
1515
Only then, you update your tests, submit a PR and merge to master.
1616

17-
3. Easy rollback - A critical bug was deployed, requiring a fast rollback. Now, thanks to branch versions, we're storing every version created by every branch, including master branch, which allows you to easily transition all of your users to a specific version in a matter of seconds.
17+
3. Easy rollback - A critical bug was deployed, requiring a fast rollback. Now, thanks to branch versions, we're storing every version created by every branch, including master branch, which allows you to easily transition all of your users to a specific version in a matter of seconds.
1818

1919
(TBH - Scenario 3 never happened. avg. 90% unit tests coverage and branch versions)
2020

21-
So, what defines a branch version?
21+
## So, what defines a branch version?
2222

2323
1. Isolation - The modified code is not part of master branch.
2424
2. Debug - Branch versions contain sourcemaps, debug info developers can inspect the code on multiple environments(extremely useful for cross-browser issues)
2525
3. Protected - A branch version can be used only by specific people. (recommended)
2626

2727
The core concept is that a branch version simply represents a different deployment path.
2828

29-
Let's dig deeper and see what it means...
29+
Let's dig deeper and see what it means...
3030

31-
Webpack
31+
### Webpack
3232

33-
Let's examine [this simple React application](https://github.com/eranshapira/webpack-branch-versions).
33+
Let's examine [this simple React application](https://github.com/eranshapira/webpack-branch-versions).
3434

3535
The key concepts we use in webpack are the following features:
3636

3737
1. [dynamic imports](https://webpack.js.org/guides/code-splitting/#dynamic-imports) - each webpack entry point dynamically imports the rest of the bundle. ([js](https://github.com/eranshapira/webpack-branch-versions/blob/master/src/index.js) dynamically loads [js](https://github.com/eranshapira/webpack-branch-versions/blob/master/src/app.js))
3838
2. [output.publicPath](https://webpack.js.org/configuration/output/#outputpublicpath) - define an absolute path for bundles, which instructs webpack to load any asset without any relative path issues.
3939

40-
CI/CD
40+
### CI/CD
4141

42-
There is only one concept that we need to maintain in our CI/CD process - Deployment must be performed to the same path specified in webpack's config.output.publicPath.
42+
There is only one concept that we need to maintain in our CI/CD process - Deployment must be performed to the same path specified in webpack's config.output.publicPath.
4343

44-
Server endpoint
44+
### Backend
4545

4646
Now that we have an infrastructure to deploy different branch versions, we need to provide a way to use these versions.
4747

4848
Examine [this very-basic-never-to-be-used server](https://github.com/eranshapira/webpack-branch-versions/blob/master/server/index.js), In our code, the html served in the response is changing the folder from which it loads main.js.
49+
50+
##

0 commit comments

Comments
 (0)