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
1
340
Just a Rails Patch Update
hatsu
September 12, 2024
Tweet
Share
More Decks by hatsu
See All by hatsu
Dive into MaintenanceTasks
hatsu38
0
67
GitHub Actions is Fun
hatsu38
0
89
Other Decks in Programming
See All in Programming
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
1.2k
M5Stack に色々な M5ユニットをつないで扱う為の新たなアプローチ
gob
0
210
Делим тесты между QA и разработчиком
mariyasaygina
0
540
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
370
Cloud Adoption Framework にみる組織とクラウド導入戦略
tomokusaba
2
440
DjangoNinjaで高速なAPI開発を実現する
masaya00
0
500
個人開発で使ってるやつを紹介する回
yohfee
1
690
Beyond Laravel Octane - Hyperf for Laravel Artisans
albertcht
1
130
CSC509 Lecture 03
javiergs
PRO
0
140
(Deep|Web) Link support with expo-router
mrtry
0
170
色んなオートローダーを覗き見る #phpcon_okinawa
o0h
PRO
5
380
NEWTにおけるiOS18対応の進め方
ryu1sazae
0
230
Featured
See All Featured
Bash Introduction
62gerente
608
210k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Fireside Chat
paigeccino
32
3k
Optimizing for Happiness
mojombo
375
69k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
How to Think Like a Performance Engineer
csswizardry
16
1k
Documentation Writing (for coders)
carmenintech
65
4.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
7
290
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
45
2k
A better future with KSS
kneath
237
17k
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όʔδϣϯͷߋ৽Ͱ ͘Ε͙Ε͝ҙ͍ͩ͘͞👾