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
初めてrails/railsにバグレポートを出してみた
Search
Shintani Teppei
October 17, 2023
Technology
0
200
初めてrails/railsにバグレポートを出してみた
初めてrails/rails にバグレポートを出したのでその流れをまとめました。
https://github.com/rails/rails/issues/49457
Shintani Teppei
October 17, 2023
Tweet
Share
More Decks by Shintani Teppei
See All by Shintani Teppei
モジュラモノリス、その前に / Modular monolith, before that
euglena1215
8
820
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
160
rbs-inlineを導入してYARDからRBSに移行する
euglena1215
1
450
Ruby の型に関する活動をやっている話 / Activities related to Ruby types
euglena1215
3
260
そろそろ理解する includes / Understanding includes
euglena1215
1
830
習うより慣れる Ruby AST / Ruby AST is better to get used to than to learn.
euglena1215
2
420
Railsでエンドポイントごとのテストカバレッジを測定する / Measuring Test Coverage per Endpoint in Rails
euglena1215
1
420
XXXSerializer#to_json を地道に置き換えている話
euglena1215
0
150
GitHub Copilot を使って自作ライブラリを作ってみよう/ Let's create your own library using GitHub Copilot!
euglena1215
0
310
Other Decks in Technology
See All in Technology
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
SSMRunbook作成の勘所_20241120
koichiotomo
3
160
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
600
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
540
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
13k
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
430
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
How to Ace a Technical Interview
jacobian
276
23k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Raft: Consensus for Rubyists
vanstee
136
6.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
99
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Done Done
chrislema
181
16k
Transcript
גࣜձࣾλΠϛʔɹShintani Teppei ॳΊͯrails/railsʹ όάϨϙʔτΛग़ͯ͠Έͨ @euglena1215 Reject on Rails2023 @Gotanda
ࣗݾհ ৽୩ ฏʢ@euglena1215ʣ • גࣜձࣾλΠϛʔ • όοΫΤϯυΤϯδχΞ • ϦδΣΫτ͞Εͨϓϩϙʔβϧ ◦
࠶ݱੑ͋Δ Rails ΞοϓάϨʔυͷಓ • εΠΧήʔϜ ϋΠείΞɿ3099 εΠΧΛ2ݸ࡞Δํ๏ͬͯΔํ͍ͨΒ #rejectonrailsΛ͚ͭͯڭ͍͑ͯͩ͘͞
3
એ λΠϛʔ Kaigi on Rails ΛԠԉ͍ͯ͠·͢ 🥈🥈🥈
גࣜձࣾλΠϛʔɹShintani Teppei ॳΊͯrails/railsʹ όάϨϙʔτΛग़ͯ͠Έͨ @euglena1215 Reject on Rails2023 @Gotanda
ൃදͷഎܠ • Rails͕ݪҼͬΆ͍όάʹૺ۰ͯ͠ॳΊͯrails/railsʹόάϨϙʔτΛग़ͨ͠ɻ • ͲΜͳྲྀΕͰૺ۰͠ɺௐࠪͯ͠όάϨϙʔτΛग़ͨ͠ͷ͔Λ ڞ༗͢Δ͜ͱͰrails/railsʹόάϨϙʔτΛग़͢͜ͱͷ ৺ཧతϋʔυϧΛԼ͍͛ͨɻ • rails/railsόάϨϙʔτΛग़ͨ͜͠ͱ͕ͳ͍ਓ͚ͷൃදͰ͢ɻ
ൃදΛฉ͘લ rails/railsͷόάϨϙʔτ ؤுͬͯग़͢ͷͦ͠͏...
ൃදΛฉ͍ͨޙ rails/railsͷόάϨϙʔτ ؤுͬͨΒग़ͤͦ͏ʂ
࣍ 1. όάͱͷૺ۰ 2. ࠷খͷ࠶ݱํ๏ͷཱ֬ 3. όάϨϙʔτΛग़͢
1 όάͱͷૺ۰
όάͱͷૺ۰ ʲલఏʳλΠϛʔͰRailsͷmain branch ΛͬͨςετΛCIͰ࣮ߦ ͍ͯ͠·͢ɻ ઃఆํ๏ʮrails edgeʯͰݕࡧ 🔍
όάͱͷૺ۰ Rails 7.1.0.rc1 ͕ϦϦʔε͞ΕΔલCI͕௨͍ͬͯͨͷͷɺϦϦʔε͞Ε͔ͯ Βશͯͷςετ͕ࣦഊ͢ΔΑ͏ʹɻ ͓ʁͱࢥ͍ௐࠪΛ։࢝ɻ
όάͷௐࠪ ελοΫτϨʔεΛோΊ͍ͯΔͱActiveAdminͷϖʔδΛཧ͢ΔσΟϨΫτϦͷ app/admin/* ͰΤϥʔʹͳ͍ͬͯΔ͜ͱ͕͔ͬͨɻ ActiveAdmin ϧʔςΟϯάΛࣗಈੜ͢ΔͨΊʹ app/admin/* ΛಡΈࠐΈ࣌ʹධՁ ͍ͯ͠ΔɻධՁ࣌ʹಛఆϞσϧΛಡΈࠐΜͩλΠϛϯάͰΤϥʔʹͳ͍ͬͯΔ͜ͱ͕
໌ɻ
όάͷௐࠪ ελοΫτϨʔεΛோΊ͍ͯΔͱ app/admin/* (ActiveAdminͷϖʔδ Λཧ͢ΔσΟϨΫτϦ) ͰΤϥʔʹͳ͍ͬͯΔ͜ͱ͕͔ͬͨɻ ActiveAdmin ϧʔςΟϯάΛࣗಈੜ͢ΔͨΊʹ app/admin/* Λಡ
ΈࠐΈ࣌ʹධՁ͍ͯ͠ΔɻධՁ࣌ʹಛఆΛϞσϧΛಡΈࠐΜͩλΠϛ ϯάͰΤϥʔʹͳ͍ͬͯΔ͜ͱ͕໌ɻ ActiveRecordͷvalidateϝιουʹpresenceΦϓγϣϯΛͯ͠Δͱ ղऍ͞Εͯͦ͏🤔 ͦΜͳ࣮Ͳ͜ʹͳ͍ͣ...ʁ
2 ࠷খͷ࠶ݱํ๏ͷཱ֬
1. ActiveAdminͱΓ͢ ݱঢ়ಡΈࠐΈ࣌ʹࣦഊ͢ΔͷͰ rails c ىಈ͠ͳ͍ঢ়ଶɻ ActiveAdmin ͕ѱ͍ͷ͔ɺActiveAdmin ಡΈࠐΜͰΔ͚ͩͰͦͷଞ͕ ѱ͍ͷ͔۠ผͰ͖ͳ͔ͬͨͷͰΓ͢ํ๏Λߟ͑ͨɻ
1. ActiveAdminͱΓ͢ ݱঢ়ಡΈࠐΈ࣌ʹࣦഊ͢ΔͷͰ rails c ىಈ͠ͳ͍ঢ়ଶɻ ActiveAdmin ͕ѱ͍ͷ͔ɺActiveAdmin ಡΈࠐΜͰΔ͚ͩͰͦͷଞ͕ ѱ͍ͷ͔۠ผͰ͖ͳ͔ͬͨͷͰΓ͢ํ๏Λߟ͑ͨɻ
ରॲɿapp/admin/* Λશ෦আ͢Δ ✂
1. ActiveAdminͱΓ͢ ݱঢ়ಡΈࠐΈ࣌ʹࣦഊ͢ΔͷͰ rails c ىಈ͠ͳ͍ঢ়ଶɻ ActiveAdmin ͕ѱ͍ͷ͔ɺActiveAdmin ಡΈࠐΜͰΔ͚ͩͰͦͷଞ͕ ѱ͍ͷ͔۠ผͰ͖ͳ͔ͬͨͷͰΓ͢ํ๏Λߟ͑ͨɻ
ରॲɿapp/admin/* Λશ෦আ͢Δ ✂ ݁Ռɿ ಡΈࠐΈ࣌ʹࣦഊ͢Δ͜ͱͳ͘ͳͬͯ rails c ىಈ͢ΔΑ͏ʹ 🎉
1. ActiveAdminͱΓ͢ rails c Ͱ֘ϞσϧΛධՁ͢Δ͜ͱͰΤϥʔΛىͤ͜ΔΑ͏ʹɻ ActiveAdminແ࣮ͩͬͨ͜ͱ͕͔ͬͨɻ
2. ͕ى͖͍ͯΔΫϥεΛখ͘͢͞Δ ͕ى͖͍ͯΔϞσϧͱ֘ߦಛఆͰ͖ͨͷͷɺ͕ى͖ͯ ͍ͨΫϥε࣮͕ଟ͘Կ͕ݪҼͳͷ͔அͰ͖ͣɻ
2. ͕ى͖͍ͯΔΫϥεΛখ͘͢͞Δ ͕ى͖͍ͯΔϞσϧͱ֘ߦಛఆͰ͖ͨͷͷɺ͕ى͖ͯ ͍ͨΫϥε࣮͕ଟ͘Կ͕ݪҼͳͷ͔அͰ͖ͣɻ ରॲɿ֘Ϟσϧͷ࣮Λย͔ͬΒআ͢Δ ✂
2. ͕ى͖͍ͯΔΫϥεΛখ͘͢͞Δ ͕ى͖͍ͯΔϞσϧͱ֘ߦಛఆͰ͖ͨͷͷɺ͕ى͖ͯ ͍ͨΫϥε࣮͕ଟ͘Կ͕ݪҼͳͷ͔அͰ͖ͣɻ ରॲɿ֘Ϟσϧͷ࣮Λย͔ͬΒআ͢Δ ✂ ݁Ռɿ ͕ى͖͍ͯͨߦΛғΉ with_options ϒϩοΫҎ֎શͯͷ࣮Λ
ফͯ͠࠶ݱͨ͠ͷͰ with_options ͕ո͍͜͠ͱ͕͔ͬͨ 🎉
2. ͕ى͖͍ͯΔΫϥεΛখ͘͢͞Δ ͕ى͖͍ͯΔϞσϧͱ֘ߦಛఆͰ͖ͨͷͷɺ͕ى͖ͯ ͍ͨΫϥε࣮͕ଟ͘Կ͕ݪҼͳͷ͔அͰ͖ͣɻ ରॲɿ֘Ϟσϧͷ࣮Λย͔ͬΒআ͢Δ ✂ ݁Ռɿ ͕ى͖͍ͯͨߦΛғΉ with_options Ҏ֎શͯͷ࣮Λফͯ͠࠶ݱͨ͠
ͷͰ with_options ͕ո͍͜͠ͱ͕͔ͬͨ 🎉
2. ͕ى͖͍ͯΔΫϥεΛখ͘͢͞Δ ͕ى͖͍ͯΔϞσϧͱ֘ߦಛఆͰ͖ͨͷͷɺ͕ى͖ͯ ͍ͨΫϥε࣮͕ଟ͘Կ͕ݪҼͳͷ͔அͰ͖ͣɻ ରॲɿ֘Ϟσϧͷ࣮Λย͔ͬΒআ͢Δ ✂ ݁Ռɿ ͕ى͖͍ͯͨߦΛғΉ with_options Ҏ֎શͯͷ࣮Λফͯ͠࠶ݱͨ͠
ͷͰ with_options ͕ո͍͜͠ͱ͕͔ͬͨ 🎉 ͖ͪΜͱ validates ϝιουʹ presence ΦϓγϣϯΛ͍ͯ͠Δͷʹ validate ϝιουʹͨ͜͠ͱʹͳ͍ͬͯΔɻԿ͕ى͖͍ͯΔΜͩ...
3. 1ϑΝΠϧͷ࠶ݱεΫϦϓτͰ࠶ݱ͢Δ͔Λ֬ೝ with_options ͷϒϩοΫҎ֎ͷϞσϧͷ࣮Λશͯআͯ͠ Τϥʔܧଓͯ͠ൃੜ͍ͯ͠Δɻ ͜Εͩͱશͯͷ Rails ΞϓϦέʔγϣϯͰൃੜ͢ΔՄೳੑ͋ΔͷͰ ʁͱࢥ͍ɺ࠷γϯϓϧͳܗͰ͕࠶ݱ͢Δ͔֬ೝ͢Δ͜ͱʹɻ
3. 1ϑΝΠϧͷ࠶ݱεΫϦϓτͰ࠶ݱ͢Δ͔Λ֬ೝ rails/railsʹActiveRecordͷόάΛใࠂ͢ΔͨΊʹ1ϑΝΠϧͰ ActiveRecordͷςετΛ࣮ߦ͢ΔςϯϓϨʔτ͕͋Δɻ https://github.com/rails/rails/blob/main/guides/bug_report_templates/ active_record_main.rb
None
1. Gemfile
2. DBεΩʔϚ
3. Ϟσϧ
4. ςετ
3. 1ϑΝΠϧͷ࠶ݱεΫϦϓτͰ࠶ݱ͢Δ͔Λ֬ೝ ରॲɿςϯϓϨʔτͷϞσϧͷఆٛʹ with_options ΛՃ͠ɺRails όʔδϣϯΛ 7.1.0.rc1 ʹࢦఆͯ͠Τϥʔ͕ൃੜ͢Δ͔Λ֬ೝɻ
with_options ΛՃ͢Δɿมߋલ
with_options ΛՃ͢Δɿมߋޙ
3. 1ϑΝΠϧͷ࠶ݱεΫϦϓτͰ࠶ݱ͢Δ͔Λ֬ೝ ରॲɿςϯϓϨʔτͷϞσϧͷఆٛʹ with_options ΛՃ͠ɺRails όʔδϣϯΛ 7.1.0.rc1 ʹࢦఆͯ͠Τϥʔ͕ൃੜ͢Δ͔Λ֬ೝɻ ݁ՌɿಡΈࠐΈ࣌ʹΤϥʔൃੜͤͣ 😢
3. 1ϑΝΠϧͷ࠶ݱεΫϦϓτͰ࠶ݱ͢Δ͔Λ֬ೝ ରॲɿςϯϓϨʔτͷϞσϧͷఆٛʹ with_options ΛՃ͠ɺRails όʔδϣϯΛ 7.1.0.rc1 ʹࢦఆͯ͠Τϥʔ͕ൃੜ͢Δ͔Λ֬ೝɻ ݁ՌɿಡΈࠐΈ࣌ʹΤϥʔൃੜͤͣ 😢
ଞʹԿ͔ݟམͱͯ͠ΔཁҼ͕͋Γͦ͏ 🤔
4. ݟམͱ͍ͯ͠ΔཁҼΛߟ͑Δ
4. ݟམͱ͍ͯ͠ΔཁҼΛߟ͑Δ Ұݟ͢ΔͱӨڹΛ༩͑ͯͳͦ͞͏͚ͩͲɺڍಈʹӨڹΛ༩͑ͦ͏ͳ ͷͬͯͳΜͩΖ͏ʁ
4. ݟམͱ͍ͯ͠ΔཁҼΛߟ͑Δ Ұݟ͢ΔͱӨڹΛ༩͑ͯͳͦ͞͏͚ͩͲɺڍಈʹӨڹΛ༩͑ͦ͏ͳ ͷͬͯͳΜͩΖ͏ʁ ܦݧ্ͦ͏͍ͬͨ͜ͱΛ͢Δͷ͍͍ͩͨGemɻ
4. ݟམͱ͍ͯ͠ΔཁҼΛߟ͑Δ Ұݟ͢ΔͱӨڹΛ༩͑ͯͳͦ͞͏͚ͩͲɺڍಈʹӨڹΛ༩͑ͦ͏ͳ ͷͬͯͳΜͩΖ͏ʁ ܦݧ্ͦ͏͍ͬͨ͜ͱΛ͢Δͷ͍͍ͩͨGemɻ ରॲɿGemfileʹએݴ͞Ε͍ͯΔGemΛย͔ͬΒফ͍ͯ͘͠ ✂
4. ݟམͱ͍ͯ͠ΔཁҼΛߟ͑Δ Ұݟ͢ΔͱӨڹΛ༩͑ͯͳͦ͞͏͚ͩͲɺڍಈʹӨڹΛ༩͑ͦ͏ͳ ͷͬͯͳΜͩΖ͏ʁ ܦݧ্ͦ͏͍ͬͨ͜ͱΛ͢Δͷ͍͍ͩͨGemɻ ରॲɿGemfileʹએݴ͞Ε͍ͯΔGemΛย͔ͬΒফ͍ͯ͘͠ ✂ ݁Ռɿ ͍Α͘ফ͍ͯ͠Δͱ͕࠶ݱ͠ͳ͘ͳΔλΠϛϯάʹૺ۰ 🎉🎉
4. ݟམͱ͍ͯ͠ΔཁҼΛߟ͑Δ Ұݟ͢ΔͱӨڹΛ༩͑ͯͳͦ͞͏͚ͩͲɺڍಈʹӨڹΛ༩͑ͦ͏ͳ ͷͬͯͳΜͩΖ͏ʁ ܦݧ্ͦ͏͍ͬͨ͜ͱΛ͢Δͷ͍͍ͩͨGemɻ ରॲɿGemfileʹએݴ͞Ε͍ͯΔGemΛย͔ͬΒফ͍ͯ͘͠ ✂ ݁Ռɿ ͍Α͘ফ͍ͯ͠Δͱ͕࠶ݱ͠ͳ͘ͳΔλΠϛϯάʹૺ۰ 🎉🎉
→ config gemΛফ͢ͱ͕࠶ݱ͠ͳ͘ͳΔ͜ͱ͕͔ͬͨ 💯
5. ࠶ݱεΫϦϓτͰ࠶ݱ͢Δ͔νΣοΫ͢Δ config gemͷ༗ແͰ͕ى͖Δ͜ͱ͕͔ͬͨͷͰ3.Ͱ༻ҙͨ͠࠶ ݱεΫϦϓτΛ͕ͬͯ࠶ݱ͢Δ͔ͷνΣοΫ͢Δɻ
config gemΛՃ͢Δɿมߋલ
config gemΛՃ͢Δɿมߋޙ
config gemΛՃ͢Δɿมߋޙ ແࣄΤϥʔ͕ൃੜ 💥 ࠷খͷ࠶ݱํ๏ͷཱ֬ʹޭʂ
3 όάϨϙʔτΛग़͢
όάϨϙʔτΛग़͢ config gemͷґଘʹΑΔͰ͋Δ͜ͱ͔ͬͨͷͷɺRailsͷ ͳͷ͔config gemͷͳͷ͔ͷΓ͚͕Ͱ͖ͳ͔ͬͨɻ ͳͷͰRailsʹৄ͍͠ਓʹฉ͚அͰ͖ΔͩΖ͏ͱࢥ͍ɺrails/rails ʹόάϨϙʔτΛग़͢͜ͱʹɻ
όάϨϙʔτΛग़͢ rails/railsͷόάϨϙʔτʹඞཁͳ߲ • ࠶ݱεΫϦϓτ • ظ͢Δڍಈ • ࣮ࡍͷڍಈ • Ruby/Railsͷόʔδϣϯ
όάϨϙʔτΛग़͢ rails/railsͷόάϨϙʔτʹඞཁͳ߲ • ࠶ݱεΫϦϓτ • ظ͢Δڍಈ • ࣮ࡍͷڍಈ • Ruby/Railsͷόʔδϣϯ
࠶ݱεΫϦϓτ͑͋͞Ε͋ͱ͙͢ʹຒΊΒΕΔɻ ӳޠͰڍಈΛ͑ͳ͍͍ͯ͘ͷ͕خ͍͠ϙΠϯτ 🤝
όάϨϙʔτΛग़͢ ग़ͯ͠Έͨ https://github.com/rails/rails/issues/49457
όάϨϙʔτͷԠ issueΛ࡞ޙ30΄ͲͰݪҼΛಛఆͨ͠ࢫͷίϝϯτΛΒ͍ config gemଆͷमਖ਼͕ඞཁͳ͜ͱ͕໌ɻ 4࣌ؒ΄ͲͰconfig gemʹमਖ਼Pull RequestΛ࡞ͯ͠Βͬͨ 🎉
όάϨϙʔτͷԠ ॾࣄʹΑΓमਖ਼Pull Request·ͩmerge͞Ε͍ͯͳ͍ͷͰɺ config gemΛRails 7.1Ͱಈ͔͍ͨ͠ํ࠙ձͰํΛ૬ஊͤͯ͘͞ ͍ͩ͞ 🙏
·ͱΊ 1. Rails EdgeͰͷςετΛCIͰ࣮ߦ͍ͯͨ͜͠ͱʹΑΓɺյΕ͍ͯ Δ͜ͱʹؾ͘ɻ 2. ৭ΜͳϑΝΠϧΛফ͠ͳ͕Β࠷খͰͷ࠶ݱํ๏Λཱ֬͠ɺݪҼͱ ͳΔGemΛಛఆɻ 3. όάϨϙʔτΛग़ͯ͠30ޙʹݪҼ͕ಛఆ͞Ε4࣌ؒޙʹमਖ਼
PR͕࡞ΒΕεϐʔυղܾ 🚀ʢະϚʔδʣ
͓ΘΓ rails/railsͷόάϨϙʔτ ؤுͬͨΒग़ͤͦ͏ʂ