Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
トランクベース開発のすすめ
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Taiga Sakaguchi
January 30, 2023
Programming
0
130
トランクベース開発のすすめ
Taiga Sakaguchi
January 30, 2023
Tweet
Share
More Decks by Taiga Sakaguchi
See All by Taiga Sakaguchi
gRPC入門
taigaskg
0
260
クリーンアーキテクチャのすすめ
taigaskg
0
330
Other Decks in Programming
See All in Programming
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
120
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
120
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
150
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
990
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
240
組織で育むオブザーバビリティ
ryota_hnk
0
170
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
110
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
HDC tutorial
michielstock
1
350
The Limits of Empathy - UXLibs8
cassininazir
1
210
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
48
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
240
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Six Lessons from altMBA
skipperchong
29
4.1k
エンジニアに許された特別な時間の終わり
watany
106
230k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
76
Transcript
トランクベース開発のすすめ Taiga Sakaguchi 1
Taiga 教員→Web エンジニア 歴3 年 バックエンドエンジニア 都内メガベンチャーに勤務 2
みなさん爆速開発できていますか? 3
テーマ : 『変更点を小さくする』 4
こんな辛みありませんか? PR の差分が大きくコンフリクトしてしまう 変更点が多くレビューアーの負担が大きい main ブランチへのマージの変更が大きくリリースが怖い ブランチのパターンが複雑で運用が辛い バグが起きた際の原因特定に時間がかかってしまう レビュー待ちが長い 5
そう、「トランクベース開発」ならね 6
トランクベース開発とは、変更点を小 さくすることで生産性を高める手法 7
機能ブランチを使った手法 機能ごとにブランチを作成し実装完了後トランク (*1) にマージする手 法 例えば、 git-flow github-flow 実装完了しマージできるまでに数日から数週間かかる *(1)
トランクとは、いわゆるmain ブランチのことです 8
機能ブランチの例 出典: https://trunkbaseddevelopment.com 9
トランクベース開発 小さな単位に分割して実装し、1 日に1 回以上トランクにマージする 手法 実装は数時間から数日以内で完了し個々の変更を頻繁にトランクに マージする。 1 日に複数回のリリース 10
トランクベース開発のブランチ 11
Four Keys ソフトウェア開発チームのパフォーマンスを示す4 つの指標 デプロイの頻度 組織による正常な本番環境へのリリースの頻度 変更のリードタイム commit から本番環境稼働までの所要時間 変更障害率
デプロイが原因で本番環境で障害が発生する割合(% ) サービス復元時間 組織が本番環境での障害から回復するのにかかる時間 12
出典: https://cloud.google.com/blog/ja/products/gcp/using-the-four-keys-to-measure-your-devops-performance 13
実現するためのポイント コードレビュー プロセスを簡略化 同期的なレビュー コーディングルール テスト&ビルド 自動テストの実行 ビルドを迅速に行う 14
トランクベース開発の Pros & Cons Pros 新機能をいち早く提供できる レビュアーの負担が軽くなる コンフリクトを抑えられる コードフリーズのような統合期 間が不要
バグの原因を特定しやすい Cons デプロイ可能な単位に作業を分 割する必要がある CI/CD 環境の整備が必要(自動 テスト・ビルド) 15
生産性 vs. 信頼性 16
生産性 with 信頼性 17
とは言っても本番に出したくないときもある 18
フィーチャーフラグ コードを書き換えることなく、動的に機能のON/OFF を切り替えシス テムの振る舞いを変更することができる手法 if featureFlg { // Do something
} else { // Do something else } 19
トランクベース開発が向いていないケ ース 明確にバージョンごとにリリースしたい場合 20
おまけ 21
Progressive Delivery Canary Release に加えて、SLO などのメトリクスを閾値として分析 しデプロイする手法 分析に通らなければ自動でロールバック 22
出典: https://static.sched.com/hosted_files/kccncna19/f2/Progressive Delivery %26 Argo Rollouts.pdf 23
出典: https://static.sched.com/hosted_files/kccncna19/f2/Progressive Delivery %26 Argo Rollouts.pdf 24
Four Keys デプロイの頻度 組織による正常な本番環境へのリリースの頻度 変更のリードタイム commit から本番環境稼働までの所要時間 変更障害率 デプロイが原因で本番環境で障害が発生する割合(% )
サービス復元時間 組織が本番環境での障害から回復するのにかかる時間 25
出典: https://cloud.google.com/blog/ja/products/gcp/using-the-four-keys-to-measure-your-devops-performance 26
参考 https://cloud.google.com/architecture/devops/devops-tech-trunk- based-development?hl=ja https://cloud.google.com/blog/ja/products/gcp/using-the-four- keys-to-measure-your-devops-performance https://ca-base-next.cyberagent.co.jp/2022/sessions/developer- productivity/ https://rheb.hatenablog.com/entry/2021/08/24/ トランクベース開 発について
27