Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
初めてrails/railsにバグレポートを出してみた
Search
Shintani Teppei
October 17, 2023
Technology
0
210
初めて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
850
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
160
rbs-inlineを導入してYARDからRBSに移行する
euglena1215
1
490
Ruby の型に関する活動をやっている話 / Activities related to Ruby types
euglena1215
3
270
そろそろ理解する includes / Understanding includes
euglena1215
1
850
習うより慣れる Ruby AST / Ruby AST is better to get used to than to learn.
euglena1215
2
430
Railsでエンドポイントごとのテストカバレッジを測定する / Measuring Test Coverage per Endpoint in Rails
euglena1215
1
430
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
データ基盤の負債解消のためのリプレイス
livesense
PRO
0
160
店舗向けSaaSにおける 顧客要望活用の実践アプローチ(20241205_pmconf)
yujirooo
0
2.8k
イベントをどう管理するか
mikanichinose
1
110
多様なロール経験が導いたエンジニアキャリアのナビゲーション
coconala_engineer
1
130
Engineer Recruting Deck
siva_official
PRO
1
3.3k
開志専門職大学特別講義 2024 オープニング
1ftseabass
PRO
0
220
2000年てづくりキーボードの旅
tagomoris
1
160
[GDG DevFest Bangkok 2024] - The Future of Retail E-commerce with Gemini AI
punsiriboo
0
300
Kubernetesを知る
logica0419
17
4.7k
asumikamというカンファレンスオーガナイザの凄さを語る / The Brilliance of Asumikam
tomzoh
1
290
振る舞い駆動開発(BDD)における、テスト自動化の前に大切にしていること #stac2024 / BDD formulation
nihonbuson
2
590
[DevFestTokyo]Accelerating Flutter App Development Using Generative AI
korodroid
1
310
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
Code Review Best Practice
trishagee
64
17k
Music & Morning Musume
bryan
46
6.2k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
18
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
A designer walks into a library…
pauljervisheath
204
24k
Site-Speed That Sticks
csswizardry
1
140
A Modern Web Designer's Workflow
chriscoyier
693
190k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Rails Girls Zürich Keynote
gr2m
94
13k
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ͷόάϨϙʔτ ؤுͬͨΒग़ͤͦ͏ʂ