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
Just a Rails Patch Update
Search
hatsu
September 12, 2024
Programming
2
480
Just a Rails Patch Update
hatsu
September 12, 2024
Tweet
Share
More Decks by hatsu
See All by hatsu
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
24
13k
Dive into MaintenanceTasks
hatsu38
1
92
GitHub Actions is Fun
hatsu38
1
110
Other Decks in Programming
See All in Programming
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
950
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
190
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Featured
See All Featured
For a Future-Friendly Web
brad_frost
175
9.4k
Side Projects
sachag
452
42k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Ruby is Unlike a Banana
tanoku
97
11k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Building Your Own Lightsaber
phodgson
103
6.1k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Documentation Writing (for coders)
carmenintech
65
4.4k
Transcript
RailsͷpatchύʔδϣϯΛ ্͚͛ͨͩͳͷʹ🤕 Roppongi.rb #22 @hatsu_38 2024/09/12
RailsͷύονόʔδϣϯΛ͋͛ͨͱ͖ʹ ى͖ͨΤϥʔʹ͍ͭͯͷݴ͍༁ղઆͰ͢💬
ࣗݾհ • Rubyྺ 5 = ΤϯδχΞྺ • SHE Inc. •
React.js / TypeScript / GitHub Actions • Ruby͕Ұ൪͖
ٕज़ελοΫ • Backend: Ruby, Ruby on Rails, GraphQL, Sidekiq •
Frontend: React.js, TypeScript, Next.js • CI: GitHub Actions • Infrastructure: Kubernetes
ฐࣾͰͷϦϦʔεϑϩʔ(ͬ͘͟Γ) 1. Pull RequestΛग़͢ `gh pr create -t “bundle update
rails —patch” ` 2. ApproveΒ͏ `gh pr review 9999 —approve` 3. MasterʹϚʔδ `gh pr merge 9999 -m -d` 4. εςʔδϯά ϦϦʔε `gh pr create -t “release 2024-09-05” -H master -B release` 5. εςʔδϯά֬ೝ 6. ຊ൪ϦϦʔε `gh pr merge 10000 -m -d`
202408݄09ʹ Rails 7.2.0͕ϦϦʔε͞Ε·ͨ͠🎉
202408݄22ʹ Rails 7.2.1, 7.1.4ͷύονόʔδϣϯ ͕ϦϦʔε͞Ε·ͨ͠🎉
RailsͷύονόʔδϣϯΛߋ৽(2024.09.03) 📝 gem data_migrate 9.4.2(࣌࠷৽)Λར༻
εςʔδϯά֬ೝ (2024.09.05) ɾgemͷupdateҎ֎ʹϓϧϦΫΤετ͕͋Δ ɾDBͷmigrationগ͋͠Δ ɾಈ࡞֬ೝͳ͠👌 📝 2024.09.04 gem data_migrate 11.0.0͕ϦϦʔε͞Ε͍ͯͨ
ຊ൪ϦϦʔε🚀 (2024.09.05)
ϦϦʔεྃ🌈 (2024.09.05)
Τϥʔݕ💥 (2024.09.05)
͑ʁʁʁ💫
ௐࠪ🔍
migration͞Ε͍ͯͳ͍!?🤔
• ΄ͱΜͲͷςʔϒϧͰ·ͩNJHSBUJPOʹ͔͔࣌ؒΔͱ͔ͳ͍ • data_migrateͱ͍͏gemΛར༻͍ͯ͠Δ • data_migrateͷbundle exec rails db:migrate:with_dataίϚϯυΛར༻ •
Rails7.1.4ʹόʔδϣϯΞοϓ࣌(2024.09.03)Ͱ࠷৽ͷ data_migrate 9.4.2Λར༻͍ͯͨ͠ • 2024.09.04ʹEBUB_migrate 11.0.0όʔδϣϯ͕ग़͍ͯͨ ฐࣾͷmigrationࣄ
• ΄ͱΜͲͷςʔϒϧͰ·ͩNJHSBUJPOʹ͔͔࣌ؒΔͱ͔ͳ͍ • data_migrateͱ͍͏gemΛར༻͍ͯ͠Δ • data_migrateͷbundle exec rails db:migrate:with_dataίϚϯυΛར༻ •
Rails7.1.4ʹόʔδϣϯΞοϓ࣌(2024.09.03)Ͱ࠷৽ͷ data_migrate 9.4.2Λར༻͍ͯͨ͠ • 2024.09.04ʹEBUB_migrate 11.0.0όʔδϣϯ͕ग़͍ͯͨ ฐࣾͷmigrationࣄ 3BJMTºEBUB@NJHSBUF PS 3BJMTºEBUB@NJHSBUF ͰNJHSBUJPO͕ಈ͔ͳ͍ͱൃ֮😵 ᠘͗͢Δ…
• ΄ͱΜͲͷςʔϒϧͰ·ͩNJHSBUJPOʹ͔͔࣌ؒΔͱ͔ͳ͍ • data_migrateͱ͍͏gemΛར༻͍ͯ͠Δ • data_migrateͷbundle exec rails db:migrate:with_dataίϚϯυΛར༻ •
Rails7.1.4ʹόʔδϣϯΞοϓ࣌(2024.09.03)Ͱ࠷৽ͷ data_migrate 9.4.2Λར༻͍ͯͨ͠ • 2024.09.04ʹEBUB_migrate 11.0.0όʔδϣϯ͕ग़͍ͯͨ ฐࣾͷmigrationࣄ 3BJMTºEBUB@NJHSBUF PS 3BJMTºEBUB@NJHSBUF ͰNJHSBUJPO͕ಈ͔ͳ͍ͱൃ֮😵 εςʔδϯάͰɺDBͷmigration͕ྃޙʹɺRails7.1.4ʹόʔδϣϯΞοϓ͞Εͨ →͏·͍λΠϛϯάͰɺൃ֮͠ͳ͔ͬͨ💡 ᠘͗͢Δ…
ৄ͘͠ݟͯΈΔ🔬
ϩʔΧϧͰ࠶ݱͯ͠ΈΔ (Rails 7.1.4 × data_migrate 9.4.2) bundle exec rails db:migrate:with_data
bundle exec rails db:migrate →migrate͕ಈ͍ͯͳ͍ →migrate͕ಈ͍͍ͯΔ
Rails 7.1.4Ͱͷมߋ͕data_migrateʹӨڹ͍ͯͨ͠ 3BJMT ˠNJHSBUF͞Ε͍ͯͳ͍όʔδϣϯͷใ͕ฦΔ 3BJMT ˠNJHSBUF͞Ε͍ͯͳ͍όʔδϣϯͷใ͕ฦΒͳ͍
Rails 7.1.4Ͱͷมߋ͕data_migrateʹӨڹ͍ͯͨ͠ 3BJMT ˠNJHSBUF͞Ε͍ͯͳ͍όʔδϣϯͷใ͕ฦΔ 3BJMT ˠNJHSBUF͞Ε͍ͯͳ͍όʔδϣϯͷใ͕ฦΒͳ͍ NJHSBUF͞Ε͍ͯͳ͍όʔδϣϯͷใ͕ฦΒͳ͍ ˠͯ͢NJHSBUJPOࡁΈʜͱͳ͍ͬͯͨ🫠
Rails 7.1.4ͰͷมߋՕॴ ActiveRecord::Tasks::DatabaseTasks.db_con fi gs_with_versions Rails 7.1.3 Rails 7.1.4 →ҾDBͷcon
fi gใ →ҾDBͷڥ໊
Rails 7.1.4ͰͷมߋՕॴ ActiveRecord::Tasks::DatabaseTasks.db_con fi gs_with_versions Rails 7.1.3 Rails 7.1.4 →Ҿdbͷcon
fi gใ →Ҿdbͷڥ໊ 3BJMTºEBUB@NJHSBUFͰ%#ͷDPO fi HใΛ͍ͯͨ͠ ˠ֘ͷڥͷNJHSBUJPOใ͕ͳ͍ ˠNJHSBUF͞Ε͍ͯͳ͍όʔδϣϯͷใ͕ฦΒͳ͍ ˠNJHSBUF͞Εͳ͍
Rails 7.1.4 × data_migrate 11.0.0 ͷར༻ͰͱΓ͋͑ͣղܾ👋 (Rails 7.1.3 × data_migrate
11.0.0ಈ͔ͳ͍)
Patchόʔδϣϯͷߋ৽Ͱ ͘Ε͙Ε͝ҙ͍ͩ͘͞👾