-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflow.drawio
More file actions
150 lines (150 loc) · 19.8 KB
/
flow.drawio
File metadata and controls
150 lines (150 loc) · 19.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<mxfile host="app.diagrams.net" modified="2020-10-28T03:02:53.902Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36" etag="tDQ6z3m-iwHd1ASbI0JU" version="13.8.3" type="github">
<diagram id="jeHmpw0TtRaYDynAjy10" name="Page-1">
<mxGraphModel dx="1298" dy="727" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="1654" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="oKsZvAFN4aBbrpxNf6T7-8" value="master" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="970" y="350" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="oKsZvAFN4aBbrpxNf6T7-9" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="970" y="380" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" source="oKsZvAFN4aBbrpxNf6T7-9" target="oKsZvAFN4aBbrpxNf6T7-12" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-9" value="release_20201012<br>部署预发" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="740" y="350" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-10" value="test分支<br>测试环境测试" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="100" y="460" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-11" value="dev分支<br>开发环境测试" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="100" y="230" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="oKsZvAFN4aBbrpxNf6T7-12" target="oKsZvAFN4aBbrpxNf6T7-11" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-24" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="oKsZvAFN4aBbrpxNf6T7-12" target="oKsZvAFN4aBbrpxNf6T7-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="oKsZvAFN4aBbrpxNf6T7-12" target="oKsZvAFN4aBbrpxNf6T7-9" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="800" y="260" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-12" value="<span style="color: rgb(36 , 41 , 46) ; font-family: , , &#34;segoe ui&#34; , &#34;helvetica&#34; , &#34;arial&#34; , sans-serif , &#34;apple color emoji&#34; , &#34;segoe ui emoji&#34; ; font-size: 16px ; text-align: left ; background-color: rgb(255 , 255 , 255)">从master拉出feature_1</span>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="400" y="230" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="oKsZvAFN4aBbrpxNf6T7-13" target="oKsZvAFN4aBbrpxNf6T7-11" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="305" y="230" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="oKsZvAFN4aBbrpxNf6T7-13" target="oKsZvAFN4aBbrpxNf6T7-9" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-13" value="<span style="color: rgb(36 , 41 , 46) ; font-size: 16px ; text-align: left ; background-color: rgb(255 , 255 , 255)">从master拉出</span><span style="color: rgb(36 , 41 , 46) ; font-family: , , &#34;segoe ui&#34; , &#34;helvetica&#34; , &#34;arial&#34; , sans-serif , &#34;apple color emoji&#34; , &#34;segoe ui emoji&#34; ; font-size: 16px ; text-align: left ; background-color: rgb(255 , 255 , 255)">feature_2</span>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="400" y="460" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-16" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="oKsZvAFN4aBbrpxNf6T7-14" target="oKsZvAFN4aBbrpxNf6T7-12" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-14" value="local_1" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="370" y="400" width="70" height="20" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="oKsZvAFN4aBbrpxNf6T7-15" target="oKsZvAFN4aBbrpxNf6T7-12" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-15" value="local_2" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="480" y="400" width="70" height="20" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-18" value="多人合作本地<br>分支rebase -i<br>整理commit" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="320" y="345" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-19" value="rebase" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="520" y="360" width="50" height="20" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-31" value="<font color="#ff0000">* 通过<span>revert删除该需求<br>* 通过cherry-pick或者再次<br>&nbsp; &nbsp;revert重新添加该需求<br><br><br></span></font>" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="600" y="395" width="150" height="80" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-32" value="<font color="#3333ff">提MR合并,同时code review(可选)</font>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="560" y="230" width="220" height="20" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-33" value="<font color="#3333ff">提MR合并,同时code review</font>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="570" y="510" width="170" height="20" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-36" value="发布生产完成<br>合并到master<br>并打tag" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="870" y="394" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-41" value="<font style="font-size: 16px">仍存在的问题:<br>1. 假设feature_1与feature_2有冲突,并且同一个版本上线,会导致每当合并到一个环境分支去测试时(dev \ test \ pre)<br>&nbsp; &nbsp; 都需要解决一次冲突,核心影响是,每次合并分支解决冲突,有可能导致代码不一致。<br>* 方案一:<br>&nbsp; 确定同版本上线,合并的时候可以cherry-pick之前解决冲突的commit,最大程度避免由于解决冲突而带来的代码不一致问题<br>* 方案二:<br>&nbsp; 每个分支都有独立的测试环境,那就不会存在分支竞争测试环境的问题,如果两个分支同期上线且有冲突部分,<br>&nbsp; 要么cherry-pick过来测试,要么等到部署预发的时候再集成测试</font>" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="80" y="1140" width="890" height="130" as="geometry" />
</mxCell>
<mxCell id="oKsZvAFN4aBbrpxNf6T7-42" value="<font style="font-size: 16px">核心解决的问题:<br>1.&nbsp;需要手动整理代码,对比代码时,如果大家都对同一个文件进行修改,容易把不是自己的代码覆盖或者无意中整理上线,因为可能自己这个需求<br>已经隔了很长时间才上线,<span>自己都记不清哪些是自己写的哪些是别人写的,本质是因为没有进行不同版本的代码隔离,需要手工凭记忆挑选。&nbsp;</span><br></font><div style="font-size: 16px"><font style="font-size: 16px"><font color="#00994d" style="font-size: 16px">解决方法:使用feature分支隔离代码</font><br><br></font></div><div style="font-size: 16px"><font style="font-size: 16px">2.&nbsp;<span>整理代码时要进行多轮手动对比,第一次跟线上对比,第二次还要跟整理进去的目录进行对比,以防覆盖了别人的代码,而这些手工都很容易出错。&nbsp;<br></span><span style="color: rgb(0 , 153 , 77)">解决方法:与线上对比参考图上预发自动化发布。由于分支合并时有冲突会暴露,所以不用担心覆盖别人的代码。</span><span><br></span></font></div><div style="font-size: 16px"><span style="color: rgb(0 , 153 , 77)"><font style="font-size: 16px"><br></font></span></div><div style="font-size: 16px"><font style="font-size: 16px">3.&nbsp;<span>上预发时整理代码后,由于目录并不是完整代码,所以要到部署到了预发才知道整理的代码有没有问题</span></font></div><div style="font-size: 16px"><font color="#00994d" style="font-size: 16px"><span>解决方法:</span><span>分支合并到release,可以本地跑一下这条分支有没有问题先,最后再自动化diff出svn目录。</span></font></div><div style="font-size: 16px"><span><font style="font-size: 16px"><br></font></span></div><div style="font-size: 16px"><font style="font-size: 16px"><span>4.&nbsp;</span><span>只有自己清楚自己的改动,假设你需要帮你的同事整理代码,根本不知道哪些是这次需要整理的&nbsp;</span></font></div><div style="font-size: 16px"><font style="font-size: 16px"><span><font color="#00994d" style="font-size: 16px">解决方法:分支合并,分支已经集成了改动的代码</font><br></span><span>&nbsp;</span></font></div>" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="80" y="805" width="1080" height="200" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-1" value="自动同步" style="swimlane;" vertex="1" parent="1">
<mxGeometry x="70" y="70" width="205" height="110" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-2" value="1. feature分支存在周期过长需要定<br>时同步master。" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;" vertex="1" parent="3LTDyEU9GOF3wHU3nfaB-1">
<mxGeometry x="5" y="30" width="200" height="30" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-4" value="2. 开发、测试分支需要在版本上线<br>后及时进行同步。" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;" vertex="1" parent="3LTDyEU9GOF3wHU3nfaB-1">
<mxGeometry x="5" y="70" width="200" height="30" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-5" value="部署自动化" style="swimlane;" vertex="1" parent="1">
<mxGeometry x="620" y="70" width="230" height="110" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-6" value="各环境统一机器打包,部署自动化。<br>预发部署应该不再需要整理diff代码?" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;" vertex="1" parent="3LTDyEU9GOF3wHU3nfaB-5">
<mxGeometry x="10" y="50" width="210" height="30" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-8" value="回滚" style="swimlane;" vertex="1" parent="1">
<mxGeometry x="900" y="70" width="220" height="110" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-9" value="代码回滚到某tag版本,不过我们应该<br>不会这样操作。<br>出问题直接hotfix。" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;" vertex="1" parent="3LTDyEU9GOF3wHU3nfaB-8">
<mxGeometry x="10" y="40" width="210" height="50" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-10" value="与易协作打通" style="swimlane;" vertex="1" parent="1">
<mxGeometry x="330" y="70" width="230" height="110" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-11" value="借助易协作api,实现类似根据单子状<br>态增删、上下车feature分支等操作,拓<br>展起来会非常丰富。" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;" vertex="1" parent="3LTDyEU9GOF3wHU3nfaB-10">
<mxGeometry x="10" y="40" width="220" height="50" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-14" value="<blockquote style="margin: 0 0 0 40px ; border: none ; padding: 0px"></blockquote><blockquote style="margin: 0px 0px 0px 40px ; border: none ; padding: 0px ; font-size: 16px"><b>if (toggleA) {<br></b><b>&nbsp; showA New<br></b><b>} else {<br></b><b>&nbsp; showA Old<br></b><font style="font-size: 16px"><b>}</b></font></blockquote><blockquote style="margin: 0 0 0 40px ; border: none ; padding: 0px"></blockquote><blockquote style="margin: 0 0 0 40px ; border: none ; padding: 0px"></blockquote><blockquote style="margin: 0 0 0 40px ; border: none ; padding: 0px"></blockquote>" style="rounded=1;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=2;align=left;" vertex="1" parent="1">
<mxGeometry x="440" y="1380" width="180" height="130" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-16" value="" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;" vertex="1" parent="1">
<mxGeometry x="700" y="1370" width="75" height="150" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="3LTDyEU9GOF3wHU3nfaB-14" target="3LTDyEU9GOF3wHU3nfaB-16">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-18" value="A New" style="swimlane;fontSize=14;startSize=23;" vertex="1" parent="1">
<mxGeometry x="775" y="1320" width="135" height="100" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-19" value="<span style="font-weight: 700"><font style="font-size: 16px">新页面/功能</font></span>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" vertex="1" parent="3LTDyEU9GOF3wHU3nfaB-18">
<mxGeometry x="15" y="50" width="100" height="20" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-20" value="A Old" style="swimlane;fontSize=14;startSize=23;" vertex="1" parent="1">
<mxGeometry x="775" y="1460" width="135" height="100" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-21" value="<span style="font-weight: 700"><font style="font-size: 16px">旧页面/功能</font></span>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" vertex="1" parent="3LTDyEU9GOF3wHU3nfaB-20">
<mxGeometry x="17.5" y="50" width="100" height="20" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=16;" edge="1" parent="1" source="3LTDyEU9GOF3wHU3nfaB-40" target="3LTDyEU9GOF3wHU3nfaB-14">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-40" value="Toggle Config" style="swimlane;fontSize=14;startSize=23;" vertex="1" parent="1">
<mxGeometry x="140" y="1380" width="150" height="130" as="geometry" />
</mxCell>
<mxCell id="3LTDyEU9GOF3wHU3nfaB-41" value="<span style="font-size: 16px ; font-weight: 700 ; text-align: left">toggleA: Boolean<br><br></span><span style="font-size: 16px ; font-weight: 700 ; text-align: left">toggleB: Boolean<br></span><span style="font-size: 16px ; font-weight: 700 ; text-align: left"><br></span><span style="font-size: 16px ; font-weight: 700 ; text-align: left">toggleC: Boolean</span><span style="font-size: 16px ; font-weight: 700 ; text-align: left"><br></span>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" vertex="1" parent="3LTDyEU9GOF3wHU3nfaB-40">
<mxGeometry y="40" width="150" height="80" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>