Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
#merpay_techtalk Feature branchを使わないFeature開発
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
@ku KUMAGAI
March 18, 2021
Technology
740
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
#merpay_techtalk Feature branchを使わないFeature開発
@ku KUMAGAI
March 18, 2021
Transcript
18 slides
1 Feature branchを使わないFeature開発 merpay Tech Talk 2021/03/18 Kentaro Kumagai @ku
2 • メルペイの開発手順のご紹介 • コンフリクトで困っていた • ブランチを作るのをやめてみた • 結果 本日の内容
3 1. Feature frameworkを生成する ./bin/init_framework.sh MerpayFooKit 2. Feature branchを作る git
checkout -b feature/foo 3. デイリーでmainブランチをマージしつつ開発 4. feature/foo ブランチでメルカリアプリをビルドしてQA メルペイでの新機能開発
4 Featureってなに? ひとつの機能のこと ひとつのFeature = ひとつのモジュール = ひとつのframework = ひとつのブランチで開発
5 Featureってなに? ひとつの機能のこと ひとつのFeature = ひとつのモジュール = ひとつのframework = ひとつのブランチで開発
6 各feature frameworkごとにそのfeatureのみ が動く単体のサンプルアプリFooKitSampleを用 意して開発 • 動作確認に必要最低限の依存framework をリンク • ビルド時間が短いので快適
FeatureごとのSampleアプリ
7
8 • コンフリクト ◦ なぜ起きるのか ▪ 共通のenumやLocalizable.stringsへの追加 ▪ 共通のコンポーネントへの機能追加 ◦
30分もかからないが毎日起きるとばかにならない (1日の5% * 開発期間) • リリース時のマージ ◦ Featureのリリースが重なるとコンフリクトの解決が大変 (になる可能性) ◦ 本来はすべてのコードがマージされている状態で QAすべき 問題
9 • 開発中featureのコードもmainのブランチにマージ • リリースビルドにはfeatureのコードを含めない ◦ バイナリサイズ ◦ 機密保持 理想
10 • コンパイル時のフラグ #if ◦ 各featureの #if がたくさんあるとコードが読めなくなりそう ◦ リリース後に取り除くのもめんどくさい
• 実行時のフラグ ◦ 上記の問題+ ◦ リリースの何ヶ月も前からバイナリに featureが含まれてしまう ◦ バイナリサイズ ブランチが嫌ならフラグを使えばいいじゃない
11 GUIのフロントエンドがありプロダクトマネージャー が管理 • Draft作成 → review → 反映 •
中身はgit
12 今回試してみた方法 リンクしなければよくないですか by yusuke0518 • Featureのコードもmainにマージしていく • リリースビルドではfeatureのframeworkをリンクしない ◦
開発はSampleアプリで進められるのでメルカリアプリにリンクしなくて も問題なし
13 1. Foo frameworkがないのを確認 2. strings Mercari 3. nm Mercari
バイナリの検証
14 バイナリ(Mach-O)の文字列定数部分にある文字列を表示 strings
15 バイナリ(Mach-O)のシンボルテーブルを表示 nm
16 Activityの定義上enumに新機能のcaseを追加する必要がある enum Activity { enum Foo { case signup
} case FooActivity } → raw valueがStringでなければ名前自体はバイナリに含まれない merpay固有の事情
17 共通のコンポーネントへの変更が必要にならない限り問題なし • 既存機能に影響が出ない拡張が大半 ◦ 影響がある変更だけこれまでどおりの branch運用 • 既存機能を意図せず変更しないようにスクリプトでチェック https://github.com/ku/warn-if-outside-of
運用してみて
18 ★ 新機能もmainのブランチにマージできてコンフリクトを最小化 ★ リリースビルドにはfeatureのコードは含まれない ◦ バイナリサイズも増えない ◦ 機密も漏れない Frameworkを分離していると可能なのでおすすめです
まとめ
More Decks by @ku KUMAGAI
See All by @ku KUMAGAI
GraphQLとスキーマファーストで切り開く ライドシェアの未来
ku0522a
1
2k
Other Decks in Technology
See All in Technology
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
5.8k
AI対話型分析を作成し、リリースするまでの話 / The Road to Release: Buiding AI Conversational Analytics
yappli_developers
0
170
IoTのデータ保存をSREの観点で考える
grimoh
1
110
個人ASを取得して、自宅Kubernetes上のVMをグローバルIPで公開した話
munenick
0
210
専門家に使ってもらうAIプロダクトをつくる - 病院の医事課向けDPCコーディング支援システムの設計と評価
hagino3000
4
840
人間+AIを「チーム」としてプロセスを再設計する
littlehands
4
3.5k
メール到達性を支える、リンク先URLのドメイン評価の扱い方
wind111
0
160
_マネジメントする人される人ナイト_2026__良いチームを作っていきたい_お気持ち_.pdf
xkxaxkx
0
800
SSFの現在地 ― CAEP/RISCからAI Identityへ
oidfj
0
480
CloudTrail を推したい
kazzpapa3
1
140
MCPでネットワーク障害調査を自動化する前に直すべき3つのこと
yama3133
1
620
gem install とrequire のむこうがわ
ydah
0
220
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
143
7.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Paper Plane
katiecoart
PRO
6
55k
Documentation Writing (for coders)
carmenintech
77
5.6k
Tell your own story through comics
letsgokoyo
1
1.1k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
670
How to train your dragon (web standard)
notwaldorf
96
6.9k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
560